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 StringThe property name for theLayerEventthat is fired as a result of changing the layer's labeled flag.static final StringThe property name for theLayerEventthat is fired as a result of changing the layer's style.Fields inherited from class com.luciad.layers.Layer
PropertyBusy, PropertyTitle, PropertyVisible -
Method Summary
Modifier and TypeMethodDescriptionReturns a new builder based on this layer instance.voidclose()booleanprotected voidfinalize()getModel()Returns the layer's model, which provides the feature tiles to present.inthashCode()booleanReturns whether this layer displays labels.static MbTilesFeatureLayer.BuilderReturns a new builder for creating aMbTilesFeatureLayer.voidsetLabeled(boolean labeled) Sets whether this layer displays labels.voidSets the style of the layer.Methods inherited from class com.luciad.layers.Layer
addObserver, getId, getTitle, isBusy, isVisible, removeObserver, setTitle, setVisible
-
Field Details
-
PropertyLabeled
The property name for theLayerEventthat is fired as a result of changing the layer's labeled flag.- See Also:
-
PropertyStyle
The property name for theLayerEventthat 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:
closein interfaceAutoCloseable- Overrides:
closein classLayer
-
newBuilder
Returns a new builder for creating aMbTilesFeatureLayer.- Returns:
- a new builder for creating a
MbTilesFeatureLayer.
-
asBuilder
Returns a new builder based on this layer instance.You can use this builder, for example, to create a copy of this layer.
Note that observers will not be transferred to a new layer.
- Returns:
- a new builder based on this layer instance.
- Since:
- 2025.0
-
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
LayerEventis 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:
-
hashCode
public int hashCode() -
equals
-