public class TileCoordinateConverter extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private MapView |
mapView |
private TileSourceDisplaySettings |
settings |
private TileSource |
tileSource |
| Constructor and Description |
|---|
TileCoordinateConverter(MapView mapView,
TileSource tileSource,
TileSourceDisplaySettings settings)
Create a new coordinate converter for the map view.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.geom.Point2D |
getPixelForTile(Tile tile)
Gets the top left position of the tile inside the map view.
|
Projecting |
getProjecting()
Gets the projecting instance to use to convert between latlon and eastnorth coordinates.
|
java.awt.geom.Rectangle2D |
getRectangleForTile(Tile tile)
Gets the position of the tile inside the map view.
|
double |
getScaleFactor(int zoom)
Returns average number of screen pixels per tile pixel for current mapview
|
private MapViewState.MapViewPoint |
pos(ICoordinate ll) |
private final TileSourceDisplaySettings settings
private final TileSource tileSource
public TileCoordinateConverter(MapView mapView, TileSource tileSource, TileSourceDisplaySettings settings)
mapView - The map view.tileSource - The tile source to use when converting coordinates.settings - displacement settings.private MapViewState.MapViewPoint pos(ICoordinate ll)
public Projecting getProjecting()
Projecting instance.public java.awt.geom.Point2D getPixelForTile(Tile tile)
tile - The tilepublic java.awt.geom.Rectangle2D getRectangleForTile(Tile tile)
tile - The tilepublic double getScaleFactor(int zoom)
zoom - zoom level