All Superinterfaces:
Evented
All Known Implementing Classes:
LeafletMap

public interface SupportsMapEvents extends Evented
Mixin interface adding default methods to register listeners for map level Leaflet events such as load, move, zoom and resize on the implementing component.
  • Method Details

    • onZoomLevelsChange

      default void onZoomLevelsChange(LeafletEventListener<LeafletEvent> listener)
      Fired when the number of zoomlevels on the map is changed due to adding or removing a layer.
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onResize

      default void onResize(LeafletEventListener<ResizeEvent> listener)
      Fired when the map is resized.
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onUnload

      default void onUnload(LeafletEventListener<LeafletEvent> listener)
      Fired when the map is destroyed with remove method.
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onViewReset

      default void onViewReset(LeafletEventListener<LeafletEvent> listener)
      Fired when the map needs to redraw its content (this usually happens on map zoom or load). Very useful for creating custom overlays.
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onLoad

      default void onLoad(LeafletEventListener<LeafletEvent> listener)
      Fired when the map is initialized (when its center and zoom are set for the first time).
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onZoomStart

      default void onZoomStart(LeafletEventListener<LeafletEvent> listener)
      Fired when the map zoom is about to change (e.g. before zoom animation).
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onMoveStart

      default void onMoveStart(LeafletEventListener<LeafletEvent> listener)
      Fired when the view of the map starts changing (e.g. user starts dragging the map).
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onZoom

      default void onZoom(LeafletEventListener<LeafletEvent> listener)
      Fired repeatedly during any change in zoom level, including zoom and fly animations.
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onMove

      default void onMove(LeafletEventListener<LeafletEvent> listener)
      Fired repeatedly during any movement of the map, including pan and fly animations.
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onZoomEnd

      default void onZoomEnd(LeafletEventListener<LeafletEvent> listener)
      Fired when the map has changed, after any animations.
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onMoveEnd

      default void onMoveEnd(LeafletEventListener<LeafletEvent> listener)
      Fired when the center of the map stops changing (e.g. user stopped dragging the map).
      Parameters:
      listener - the listener to call when the event occurs, not null
    • onZoomAnim

      default void onZoomAnim(LeafletEventListener<ZoomAnimEvent> listener)
      Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom.
      Parameters:
      listener - the listener to call when the event occurs, not null