Package org.mapsforge.map.util
Class MapViewProjection
- java.lang.Object
-
- org.mapsforge.map.util.MapViewProjection
-
public class MapViewProjection extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MapViewProjection(MapView mapView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.mapsforge.core.model.LatLongfromPixels(double x, double y)Computes the geographic coordinates of a screen point.doublegetLatitudeSpan()Computes vertical extend of the map view.doublegetLongitudeSpan()Computes horizontal extend of the map view.org.mapsforge.core.model.PointtoPixels(org.mapsforge.core.model.LatLong in)Converts geographic coordinates to view x/y coordinates in the map view.
-
-
-
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
-
-