org.jdesktop.swingx.mapviewer.bmng
Class SLMapServerInfo
java.lang.Object
org.jdesktop.swingx.mapviewer.TileFactoryInfo
org.jdesktop.swingx.mapviewer.bmng.SLMapServerInfo
public class SLMapServerInfo
- extends TileFactoryInfo
A TileFactoryInfo subclass which knows how to connect
to the SwingLabs map server. This server contains 2k resolution
Blue Marble data from NASA.
| Methods inherited from class org.jdesktop.swingx.mapviewer.TileFactoryInfo |
getDefaultZoomLevel, getLongitudeDegreeWidthInPixels, getLongitudeRadianWidthInPixels, getMapCenterInPixelsAtZoom, getMaximumZoomLevel, getMinimumZoomLevel, getName, getTotalMapZoom, isXr2l, isYt2b, setDefaultZoomLevel, setXr2l, setYt2b |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SLMapServerInfo
public SLMapServerInfo()
SLMapServerInfo
public SLMapServerInfo(String baseURL)
getMidpoint
public int getMidpoint()
getTileSize
public int getTileSize(int zoom)
- Description copied from class:
TileFactoryInfo
- Get the tile size.
- Overrides:
getTileSize in class TileFactoryInfo
- Returns:
- the tile size
getMapWidthInTilesAtZoom
public int getMapWidthInTilesAtZoom(int zoom)
- Overrides:
getMapWidthInTilesAtZoom in class TileFactoryInfo
- Returns:
getTileUrl
public String getTileUrl(int x,
int y,
int zoom)
- Description copied from class:
TileFactoryInfo
- Returns the tile url for the specified tile at the specified
zoom level. By default it will generate a tile url using the
base url and parameters specified in the constructor. Thus if
baseURl = http://www.myserver.com/maps?version=0.1
xparam = x
yparam = y
zparam = z
tilepoint = [1,2]
zoom level = 3
then the resulting url would be:
http://www.myserver.com/maps?version=0.1&x=1&y=2&z=3
Note that the URL can be a file: url.
- Overrides:
getTileUrl in class TileFactoryInfo
zoom - the zoom level
- Returns:
- a valid url to load the tile