Package xyz.jpenilla.squaremap.api
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 TypeMethodDescriptiondefault booleanWhether this layer is hidden by default in the control boxgetLabel()Get the label of this LayerProvider, shown in the control boxGet the markers to displayint0-indexed order for this layer in the control boxdefault booleanWhether to show this layer in the control boxdefault intzIndex()0-indexed z-index for this layer.
-
Method Details
-
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 boxDefault implementation always returns
true- Returns:
- boolean
-
defaultHidden
default boolean defaultHidden()Whether this layer is hidden by default in the control boxDefault implementation always returns
false- Returns:
- boolean
-
layerPriority
int layerPriority()0-indexed order for this layer in the control boxFalls 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
-