Interface LayerProvider

All Known Implementing Classes:
SimpleLayerProvider

public interface LayerProvider
Provides Markers and other metadata which make up a layer. LayerProviders are called on each update of a layer.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Whether this layer is hidden by default in the control box
    Get the label of this LayerProvider, shown in the control box
    Get the markers to display
    int
    0-indexed order for this layer in the control box
    default boolean
    Whether to show this layer in the control box
    default int
    0-indexed z-index for this layer.
  • Method Details

    • getLabel

      @NonNull String getLabel()
      Get the label of this LayerProvider, shown in the control box
      Returns:
      label
    • showControls

      default boolean showControls()
      Whether to show this layer in the control box

      Default implementation always returns true

      Returns:
      boolean
    • defaultHidden

      default boolean defaultHidden()
      Whether this layer is hidden by default in the control box

      Default implementation always returns false

      Returns:
      boolean
    • layerPriority

      int layerPriority()
      0-indexed order for this layer in the control box

      Falls back to alpha-numeric ordering based on name if there are order conflicts

      Returns:
      arbitrary number
    • zIndex

      default int zIndex()
      0-indexed z-index for this layer. Used in determining what layers are visually on top of other layers.

      Falls back to alpha-numeric ordering based on name if there are order conflicts

      Default implementation returns layerPriority()

      Returns:
      arbitrary number
    • getMarkers

      @NonNull Collection<Marker> getMarkers()
      Get the markers to display
      Returns:
      markers