Package it.tidalwave.mapviewer
Interface Projection
- All Known Subinterfaces:
TileSource
- All Known Implementing Classes:
MercatorProjection
,OpenStreetMapTileSource
,OpenTopoMapTileSource
,TileSourceSupport
public interface Projection
This class is responsible for converting (latitude, longitude) into rectilinear (x,y) coordinates (to be used by a map).
- Author:
- Fabrizio Giudici
-
Method Summary
Modifier and TypeMethodDescriptioncoordinatesToMapPoint
(MapCoordinates coordinates, double zoom) Returns aMapPoint
converted from the given coordinates and zoom level.mapPointToCoordinates
(MapPoint mapPoint, double zoom) ReturnsMapCoordinates
converted from the point coordinates and zoom level.double
metersPerPixel
(MapCoordinates coordinates, double zoom) Returns the map scale (expressed in meters per pixel) at the given zoom level.
-
Method Details
-
coordinatesToMapPoint
Returns aMapPoint
converted from the given coordinates and zoom level..- Parameters:
coordinates
- the coordinates to convertzoom
- the zoom level- Returns:
- a
MapPoint
converted from the given coordinates and zoom level
-
mapPointToCoordinates
ReturnsMapCoordinates
converted from the point coordinates and zoom level..- Parameters:
mapPoint
- the pointzoom
- the zoom level- Returns:
MapCoordinates
converted from the point coordinates and zoom level
-
metersPerPixel
Returns the map scale (expressed in meters per pixel) at the given zoom level..- Parameters:
coordinates
- coordinateszoom
- the zoom level- Returns:
- the map scale (expressed in meters per pixel) at the given zoom level
-