|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.jdesktop.swingx.mapviewer.util.GeoUtil
public final class GeoUtil extends Object
These are math utilities for converting between pixels, tiles, and geographic coordinates. Implements a Google Maps style mercator projection.
| Constructor Summary | |
GeoUtil()
|
|
| Method Summary | |
|---|---|
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 Point2D
|
getBitmapCoordinate(double latitude, double longitude, int zoomLevel, TileFactoryInfo info)
|
static GeoBounds
|
getMapBounds(JXMapViewer mapViewer)
Gets the map bounds. |
private static Set
|
getMapGeoBounds(JXMapViewer mapViewer)
|
static Dimension
|
getMapSize(int zoom, TileFactoryInfo info)
@return the size of the map at the given zoom, in tiles (num tiles tall by num tiles wide) |
static GeoPosition
|
getPosition(Point2D pixelCoordinate, int zoom, TileFactoryInfo info)
|
static GeoPosition
|
getPositionForAddress(String[] fields)
|
static GeoPosition
|
getPositionForAddress(String street, String city, String state)
|
static boolean
|
isValidTile(int x, int y, int zoomLevel, TileFactoryInfo info)
|
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Constructor Detail |
|---|
GeoUtil()
| Method Detail |
|---|
public static Point2D getBitmapCoordinate(GeoPosition c, int zoomLevel, TileFactoryInfo info)
c - A lat/lon pairzoomLevel - the zoom level to extract the pixel coordinate for
public static Point2D getBitmapCoordinate(double latitude, double longitude, int zoomLevel, TileFactoryInfo info)
public static GeoBounds getMapBounds(JXMapViewer mapViewer)
mapViewer
- The map viewer.
private static Set getMapGeoBounds(JXMapViewer mapViewer)
public static Dimension getMapSize(int zoom, TileFactoryInfo info)
public static GeoPosition getPosition(Point2D pixelCoordinate, int zoom, TileFactoryInfo info)
public static GeoPosition getPositionForAddress(String[] fields)
public static GeoPosition getPositionForAddress(String street, String city, String state)
public static boolean isValidTile(int x, int y, int zoomLevel, TileFactoryInfo info)
Groovy Documentation