Package com.luciad.layers.mbtiles
Class MbTilesFeatureLayer
java.lang.Object
com.luciad.layers.Layer
com.luciad.layers.mbtiles.MbTilesFeatureLayer
- All Implemented Interfaces:
AutoCloseable
A layer for feature tile models.
Use MbTilesFeatureLayer#newBuilder
to create a feature tile layer instance.
- Since:
- 2024.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Returns the property name for theLayerEvent
that is fired as a result of changing the layer's labeled flag.static final String
Returns the property name for theLayerEvent
that is fired as a result of changing the layer's style.Fields inherited from class com.luciad.layers.Layer
PropertyTitle, PropertyVisible
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
getModel()
Returns the layer's model, which provides the feature tiles to present.boolean
Returns whether this layer displays labels.static MbTilesFeatureLayer.Builder
Returns a new builder for creating aMbTilesFeatureLayer
.void
setLabeled
(boolean labeled) Sets whether this layer displays labels.void
Sets the style of the layer.Methods inherited from class com.luciad.layers.Layer
addObserver, getId, getTitle, isVisible, removeObserver, setTitle, setVisible
-
Field Details
-
PropertyLabeled
Returns the property name for theLayerEvent
that is fired as a result of changing the layer's labeled flag.- See Also:
-
PropertyStyle
Returns the property name for theLayerEvent
that is fired as a result of changing the layer's style.- See Also:
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classLayer
-
newBuilder
Returns a new builder for creating aMbTilesFeatureLayer
.- Returns:
- a new builder for creating a
MbTilesFeatureLayer
.
-
getModel
Returns the layer's model, which provides the feature tiles to present.- Returns:
- the layer's model, which provides the feature tiles to present.
-
isLabeled
public boolean isLabeled()Returns whether this layer displays labels.- Returns:
- whether this layer displays labels.
-
setLabeled
public void setLabeled(boolean labeled) Sets whether this layer displays labels.Note that both icons and text (i.e. Mapbox symbols) are considered labels.
- Parameters:
labeled
- true to enable labels.
-
setStyle
Sets the style of the layer.Calling this method results in new model queries and a full reload of all visible tiles with the new style.
When setting a new style, a
LayerEvent
is delivered to the observers with the property nameMbTilesFeatureLayer#propertyStyle
.- Parameters:
path
- the path to a style file. Can be a URL or a file path to a JSON file.- Throws:
IOException
- If decoding the style fails.- See Also:
-