org.jdesktop.swingx.mapviewer.bmng
Class CylindricalProjectionTileFactory
java.lang.Object
org.jdesktop.swingx.mapviewer.TileFactory
org.jdesktop.swingx.mapviewer.AbstractTileFactory
org.jdesktop.swingx.mapviewer.DefaultTileFactory
org.jdesktop.swingx.mapviewer.bmng.CylindricalProjectionTileFactory
public class CylindricalProjectionTileFactory
- extends DefaultTileFactory
|
Method Summary |
Point2D |
geoToPixel(GeoPosition c,
int zoom)
Convert a GeoPosition to a pixel position in the world bitmap
a the specified zoom level. |
Dimension |
getMapSize(int zoom)
Returns a Dimension containing the width and height of the map,
in tiles at the
current zoom level. |
GeoPosition |
pixelToGeo(Point2D pix,
int zoom)
Convert a pixel in the world bitmap at the specified
zoom level into a GeoPosition |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CylindricalProjectionTileFactory
public CylindricalProjectionTileFactory()
CylindricalProjectionTileFactory
public CylindricalProjectionTileFactory(SLMapServerInfo info)
getMapSize
public Dimension getMapSize(int zoom)
- Description copied from class:
TileFactory
- Returns a Dimension containing the width and height of the map,
in tiles at the
current zoom level.
So a Dimension that returns 10x20 would be 10 tiles wide and 20 tiles
tall. These values can be multipled by getTileSize() to determine the
pixel width/height for the map at the given zoom level
- Overrides:
getMapSize in class TileFactory
- Parameters:
zoom - the current zoom level
- Returns:
- the size of the world bitmap in tiles
geoToPixel
public Point2D geoToPixel(GeoPosition c,
int zoom)
- Description copied from class:
TileFactory
- Convert a GeoPosition to a pixel position in the world bitmap
a the specified zoom level.
- Overrides:
geoToPixel in class TileFactory
- Parameters:
c - a GeoPosition
- Returns:
- the pixel point
pixelToGeo
public GeoPosition pixelToGeo(Point2D pix,
int zoom)
- Description copied from class:
TileFactory
- Convert a pixel in the world bitmap at the specified
zoom level into a GeoPosition
- Overrides:
pixelToGeo in class TileFactory
- Parameters:
pix - a Point2D representing a pixel in the world bitmapzoom - the zoom level of the world bitmap
- Returns:
- the converted GeoPosition