Package org.mapsforge.map.util
Class MapViewProjection
java.lang.Object
org.mapsforge.map.util.MapViewProjection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mapsforge.core.model.LatLongfromPixels(double x, double y) Computes the geographic coordinates of a screen point.doubleComputes vertical extend of the map view.doubleComputes 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.org.mapsforge.core.model.PointtoPixels(org.mapsforge.core.model.LatLong in, boolean withRotation) Converts geographic coordinates to view x/y coordinates in the map view.
-
Constructor Details
-
MapViewProjection
-
-
Method Details
-
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
-
toPixels
public org.mapsforge.core.model.Point toPixels(org.mapsforge.core.model.LatLong in, boolean withRotation) Converts geographic coordinates to view x/y coordinates in the map view. Optionally using the map rotation and map view center.- Parameters:
in- the geographic coordinateswithRotation- post process with map rotation and map view center- Returns:
- x/y view coordinates for the given location
-