java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<LeafletMap>
org.vaadin.addons.componentfactory.leaflet.layer.events.LeafletEvent
org.vaadin.addons.componentfactory.leaflet.layer.events.BaseMoveEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DragEvent, MoveEvent

public abstract class BaseMoveEvent extends LeafletEvent
Base class for events that report a change of coordinates, carrying both the previous and the new position of a layer.
See Also:
  • Constructor Details

    • BaseMoveEvent

      public BaseMoveEvent(LeafletMap source, boolean fromClient, String layerId, DragEventType eventType, LatLng oldLatLng, LatLng latLng)
      Creates a new move event.
      Parameters:
      source - the component that fired the event
      fromClient - true if the event originated from the client side
      layerId - the identifier of the layer that moved
      eventType - the specific drag event type
      oldLatLng - the coordinates before the move
      latLng - the coordinates after the move
  • Method Details

    • getLatLng

      public LatLng getLatLng()
      Gets the coordinates the layer moved to.
      Returns:
      the new coordinates
    • getOldLatLng

      public LatLng getOldLatLng()
      Gets the coordinates the layer moved from.
      Returns:
      the old coordinates
    • toString

      public String toString()
      Overrides:
      toString in class LeafletEvent