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 aMapPointconverted from the given coordinates and zoom level.mapPointToCoordinates(MapPoint mapPoint, double zoom) ReturnsMapCoordinatesconverted from the point coordinates and zoom level.doublemetersPerPixel(MapCoordinates coordinates, double zoom) Returns the map scale (expressed in meters per pixel) at the given zoom level.
-
Method Details
-
coordinatesToMapPoint
Returns aMapPointconverted from the given coordinates and zoom level..- Parameters:
coordinates- the coordinates to convertzoom- the zoom level- Returns:
- a
MapPointconverted from the given coordinates and zoom level
-
mapPointToCoordinates
ReturnsMapCoordinatesconverted from the point coordinates and zoom level..- Parameters:
mapPoint- the pointzoom- the zoom level- Returns:
MapCoordinatesconverted 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
-