Class MapViewProjection


  • public class MapViewProjection
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.mapsforge.core.model.LatLong fromPixels​(double x, double y)
      Computes the geographic coordinates of a screen point.
      double getLatitudeSpan()
      Computes vertical extend of the map view.
      double getLongitudeSpan()
      Computes horizontal extend of the map view.
      org.mapsforge.core.model.Point toPixels​(org.mapsforge.core.model.LatLong in)
      Converts geographic coordinates to view x/y coordinates in the map view.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapViewProjection

        public MapViewProjection​(MapView mapView)
    • Method Detail

      • fromPixels

        public org.mapsforge.core.model.LatLong fromPixels​(double x,
                                                           double y)
        Computes the geographic coordinates of a screen point.
        Returns:
        the coordinates of the x/y point
      • getLatitudeSpan

        public double getLatitudeSpan()
        Computes vertical extend of the map view.
        Returns:
        the latitude span of the map in degrees
      • getLongitudeSpan

        public double getLongitudeSpan()
        Computes horizontal extend of the map view.
        Returns:
        the longitude span of the map in degrees
      • toPixels

        public org.mapsforge.core.model.Point toPixels​(org.mapsforge.core.model.LatLong in)
        Converts geographic coordinates to view x/y coordinates in the map view.
        Parameters:
        in - the geographic coordinates
        Returns:
        x/y view coordinates for the given location