Class MapView.OverlayHelper

java.lang.Object
it.tidalwave.mapviewer.javafx.MapView.OverlayHelper
Enclosing class:
MapView

public static class MapView.OverlayHelper extends Object
This helper class provides methods useful for creating map overlays.
  • Constructor Details

    • OverlayHelper

      public OverlayHelper()
  • Method Details

    • add

      public void add(@Nonnull javafx.scene.Node node)
      Adds a Node to the overlay.
      Parameters:
      node - the Node
    • addAll

      public void addAll(@Nonnull Collection<? extends javafx.scene.Node> nodes)
      Adds multiple Nodes to the overlay.
      Parameters:
      nodes - the Nodes
    • toMapViewPoint

      @Nonnull public MapViewPoint toMapViewPoint(@Nonnull MapCoordinates coordinates)
      Returns a map view point corresponding to the given coordinates.. This view point must be used to draw to the overlay.
      Parameters:
      coordinates - the coordinates
      Returns:
      a map view point corresponding to the given coordinates
    • getCenter

      @Nonnull public MapCoordinates getCenter()
      Returns the coordinates corresponding at the center of the map view..
      Returns:
      the coordinates corresponding at the center of the map view
    • getZoom

      public double getZoom()
      Returns the zoom level..
      Returns:
      the zoom level
    • getArea

      @Nonnull public MapArea getArea()
      Returns the area rendered in the map view..
      Returns:
      the area rendered in the map view