Class SLMapServerInfo
- java.lang.Object
-
- org.meteoinfo.data.mapdata.webmap.TileFactoryInfo
-
- org.meteoinfo.data.mapdata.webmap.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.
-
-
Field Summary
-
Fields inherited from class org.meteoinfo.data.mapdata.webmap.TileFactoryInfo
baseURL, longitudeDegreeWidthInPixels, longitudeRadianWidthInPixels, mapCenterInPixelsAtZoom, mapWidthInTilesAtZoom, maximumZoomLevel, minimumZoomLevel, totalMapZoom
-
-
Constructor Summary
Constructors Constructor Description SLMapServerInfo()SLMapServerInfo(java.lang.String baseURL)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMapWidthInTilesAtZoom(int zoom)Get map width in tiles at zoomintgetMidpoint()intgetTileSize(int zoom)Get the tile size.java.lang.StringgetTileUrl(int x, int y, int zoom)Returns the tile url for the specified tile at the specified zoom level.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.meteoinfo.data.mapdata.webmap.TileFactoryInfo
getDefaultZoomLevel, getLanguage, getLongitudeDegreeWidthInPixels, getLongitudeRadianWidthInPixels, getMapCenterInPixelsAtZoom, getMaximumZoomLevel, getMinimumZoomLevel, getName, getServerNum, getTotalMapZoom, isXr2l, isYt2b, setDefaultZoomLevel, setLanguage, setXr2l, setYt2b
-
-
-
-
Method Detail
-
getMidpoint
public int getMidpoint()
-
getTileSize
public int getTileSize(int zoom)
Description copied from class:TileFactoryInfoGet the tile size.- Overrides:
getTileSizein classTileFactoryInfo- Parameters:
zoom- Zoom- Returns:
- the tile size
-
getMapWidthInTilesAtZoom
public int getMapWidthInTilesAtZoom(int zoom)
Description copied from class:TileFactoryInfoGet map width in tiles at zoom- Overrides:
getMapWidthInTilesAtZoomin classTileFactoryInfo- Parameters:
zoom- The zoom- Returns:
- Map width
-
getTileUrl
public java.lang.String getTileUrl(int x, int y, int zoom)Description copied from class:TileFactoryInfoReturns 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
then the resulting url would be:baseURl = http://www.myserver.com/maps?version=0.1 xparam = x yparam = y zparam = z tilepoint = [1,2] zoom level = 3
Note that the URL can be ahttp://www.myserver.com/maps?version=0.1&x=1&y=2&z=3file:url.- Overrides:
getTileUrlin classTileFactoryInfo- Parameters:
x- Xy- Yzoom- the zoom level- Returns:
- a valid url to load the tile
-
-