Interface LeafletLayerHolder<T extends LeafletLayer>

Type Parameters:
T - the type of the provided Leaflet layer component
All Known Implementing Classes:
VectorLayerHolder

public interface LeafletLayerHolder<T extends LeafletLayer>
Represents an object that contains a 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.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    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
    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.
    Gets the LeafletLayer
    default void
    Signals that the holder is no more needed (for example when it is replaced with another holder instance).
  • Method Details

    • getLeafletLayer

      T getLeafletLayer()
      Gets the LeafletLayer
      Returns:
      Leaflet layer component
    • activate

      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.
    • deactivate

      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.
    • shutdown

      default void shutdown()
      Signals that the holder is no more needed (for example when it is replaced with another holder instance).