Class MbTilesFeatureLayer

java.lang.Object
com.luciad.layers.Layer
com.luciad.layers.mbtiles.MbTilesFeatureLayer
All Implemented Interfaces:
AutoCloseable

public final class MbTilesFeatureLayer extends Layer implements AutoCloseable
A layer for feature tile models.

Use MbTilesFeatureLayer#newBuilder to create a feature tile layer instance.

Since:
2024.0
  • Field Details

    • PropertyLabeled

      public static final String PropertyLabeled
      Returns the property name for the LayerEvent that is fired as a result of changing the layer's labeled flag.
      See Also:
    • PropertyStyle

      public static final String PropertyStyle
      Returns the property name for the LayerEvent that is fired as a result of changing the layer's style.
      See Also:
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Layer
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class Layer
    • newBuilder

      @NotNull public static MbTilesFeatureLayer.Builder newBuilder()
      Returns a new builder for creating a MbTilesFeatureLayer.
      Returns:
      a new builder for creating a MbTilesFeatureLayer.
    • getModel

      @NotNull public IFeatureTileModel 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

      public void setStyle(@NotNull String path) throws IOException
      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 name MbTilesFeatureLayer#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: