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.LocationEvent
All Implemented Interfaces:
Serializable

@DomEvent("locationfound") public class LocationEvent extends LeafletEvent
Represents the leaflet LocationEvent
Since:
2020-03-11
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
See Also:
  • Field Summary

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocationEvent(LeafletMap source, boolean fromClient, String layerId, double latitude, double longitude, double northEastLatitude, double northEastLongitude, double southWestLatitude, double southWestLongitude, double accuracy, double altitude, double altitudeAccuracy, double heading, double speed, double timestamp)
    Creates a new location event carrying the located position and its accuracy details.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Accuracy of location in meters.
    double
    Height of the position above the WGS84 ellipsoid in meters.
    double
    Accuracy of altitude in meters.
    Geographical bounds of the area user is located in (with respect to the accuracy of location).
    double
    The direction of travel in degrees counting clockwise from true North.
    Detected geographical location of the user.
    double
    Current velocity in meters per second.
    double
    The time when the position was acquired.
     

    Methods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.events.LeafletEvent

    getLayerId, getType

    Methods inherited from class com.vaadin.flow.component.ComponentEvent

    getSource, getUI, isFromClient, unregisterListener

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LocationEvent

      public LocationEvent(LeafletMap source, boolean fromClient, @EventData("event.detail.target.options.uuid") String layerId, @EventData("event.detail.latlng.lat") double latitude, @EventData("event.detail.latlng.lng") double longitude, @EventData("event.detail.bounds._northEast.lat") double northEastLatitude, @EventData("event.detail.bounds._northEast.lng") double northEastLongitude, @EventData("event.detail.bounds._southWest.lat") double southWestLatitude, @EventData("event.detail.bounds._southWest.lng") double southWestLongitude, @EventData("event.detail.accuracy") double accuracy, @EventData("event.detail.altitude") double altitude, @EventData("event.detail.altitudeAccuracy") double altitudeAccuracy, @EventData("event.detail.heading") double heading, @EventData("event.detail.speed") double speed, @EventData("event.detail.timestamp") double timestamp)
      Creates a new location event carrying the located position and its accuracy details.
      Parameters:
      source - the source component
      fromClient - true if the event originated on the client side
      layerId - the identifier of the layer the event relates to
      latitude - the latitude of the detected location
      longitude - the longitude of the detected location
      northEastLatitude - the latitude of the north-east corner of the location bounds
      northEastLongitude - the longitude of the north-east corner of the location bounds
      southWestLatitude - the latitude of the south-west corner of the location bounds
      southWestLongitude - the longitude of the south-west corner of the location bounds
      accuracy - the accuracy of the location in meters
      altitude - the height of the position above the WGS84 ellipsoid in meters
      altitudeAccuracy - the accuracy of the altitude in meters
      heading - the direction of travel in degrees counting clockwise from true North
      speed - the current velocity in meters per second
      timestamp - the time when the position was acquired
  • Method Details

    • getLatlng

      public LatLng getLatlng()
      Detected geographical location of the user.
      Returns:
      the latlng
    • getBounds

      public LatLngBounds getBounds()
      Geographical bounds of the area user is located in (with respect to the accuracy of location).
      Returns:
      the bounds
    • getAccuracy

      public double getAccuracy()
      Accuracy of location in meters.
      Returns:
      the accuracy
    • getAltitude

      public double getAltitude()
      Height of the position above the WGS84 ellipsoid in meters.
      Returns:
      the altitude
    • getAltitudeAccuracy

      public double getAltitudeAccuracy()
      Accuracy of altitude in meters.
      Returns:
      the altitudeAccuracy
    • getHeading

      public double getHeading()
      The direction of travel in degrees counting clockwise from true North.
      Returns:
      the heading
    • getSpeed

      public double getSpeed()
      Current velocity in meters per second.
      Returns:
      the speed
    • getTimestamp

      public double getTimestamp()
      The time when the position was acquired.
      Returns:
      the timestamp
    • toString

      public String toString()
      Overrides:
      toString in class LeafletEvent