T
- the type of the provided Leaflet layer componentpublic interface LeafletLayerHolder<T extends LeafletLayer>
LeafletLayer
instance inside it.
The benefit of using this interface instead of simply providing a LeafletLayer
is the ability to preserve some additional information,
which can be used, for example, when receiving UI events from the client side.
Modifier and Type | Method and Description |
---|---|
default void |
activate()
When a layer corresponding to the holder is selected,
this method is invoked in order to switch the holder into an active mode,
which basically means enable listeners and turn on a drawing mode if needed.
|
default void |
deactivate()
This method is invoked when the layer corresponding to the holder is no more active
and it signals the holder to switch off listeners and a drawing mode.
|
T |
getLeafletLayer()
Gets the
LeafletLayer |
default void |
shutdown()
Signals that the holder is no more needed (for example when it is replaced with another holder instance).
|
T getLeafletLayer()
LeafletLayer
default void activate()
default void deactivate()
default void shutdown()