public final class GeoUtil extends Object
Constructor and Description |
---|
GeoUtil() |
Modifier and Type | Method and Description |
---|---|
static Point2D |
getBitmapCoordinate(double latitude,
double longitude,
int zoomLevel,
TileFactoryInfo info)
Given a position (latitude/longitude pair) and a zoom level, return the appropriate point in pixels.
|
static Point2D |
getBitmapCoordinate(GeoPosition c,
int zoomLevel,
TileFactoryInfo info)
Given a position (latitude/longitude pair) and a zoom level, return the appropriate point in pixels.
|
static GeoBounds |
getMapBounds(JXMapViewer mapViewer)
Gets the map bounds.
|
static Dimension |
getMapSize(int zoom,
TileFactoryInfo info) |
static GeoPosition |
getPosition(Point2D pixelCoordinate,
int zoom,
TileFactoryInfo info)
Convert an on screen pixel coordinate and a zoom level to a geo position
|
static boolean |
isValidTile(int x,
int y,
int zoomLevel,
TileFactoryInfo info) |
public static Dimension getMapSize(int zoom, TileFactoryInfo info)
zoom
- the zoom levelinfo
- the tile factory infopublic static boolean isValidTile(int x, int y, int zoomLevel, TileFactoryInfo info)
x
- the x valuey
- the y valuezoomLevel
- the zoom levelinfo
- the tile factory infopublic static Point2D getBitmapCoordinate(GeoPosition c, int zoomLevel, TileFactoryInfo info)
c
- A lat/lon pairzoomLevel
- the zoom level to extract the pixel coordinate forinfo
- the tile factory infopublic static Point2D getBitmapCoordinate(double latitude, double longitude, int zoomLevel, TileFactoryInfo info)
latitude
- the latitudelongitude
- the longitudezoomLevel
- the zoom level to extract the pixel coordinate forinfo
- the tile factory infopublic static GeoPosition getPosition(Point2D pixelCoordinate, int zoom, TileFactoryInfo info)
pixelCoordinate
- the coordinate in pixelszoom
- the zoom levelinfo
- the tile factory infopublic static GeoBounds getMapBounds(JXMapViewer mapViewer)
mapViewer
- The map viewer.Copyright © 2013. All Rights Reserved.