Class TileServer
java.lang.Object
org.eclipse.nebula.widgets.geomap.internal.URLService
org.eclipse.nebula.widgets.geomap.TileServer
- Direct Known Subclasses:
GoogleTileServer
,OsmTileServer
public class TileServer extends URLService
This class encapsulates a tileserver, which has the concept of a baseurl and
a distinct range of zoom levels.
-
Constructor Summary
Constructors Constructor Description TileServer(java.lang.String url, int maxZoom)
Initializes a TileServer using the default slippy formatTileServer(java.lang.String url, int minZoom, int maxZoom, java.lang.String urlFormat)
Initializes a TileServer -
Method Summary
Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.String>
createZXYMap(TileRef tile, java.lang.String zKey, java.lang.String xKey, java.lang.String yKey)
int
getMaxZoom()
Gets the max zoom level supported by this TileServerint
getMinZoom()
Gets the min zoom level supported by this TileServerjava.lang.String
getTileURL(TileRef tile)
protected java.lang.String
getTileURL(TileRef tile, java.lang.String urlFormat, java.lang.Object[] formatArguments)
protected java.lang.String
getTileURL(TileRef tile, java.lang.String urlFormat, java.util.Map<java.lang.String,java.lang.String> formatMap)
protected java.lang.Object[]
getURLFormatArguments(java.lang.Object ref)
protected java.util.Map<java.lang.String,java.lang.String>
getURLFormatMap(TileRef tile)
java.lang.String
toString()
Methods inherited from class org.eclipse.nebula.widgets.geomap.internal.URLService
getServiceURL, getServiceURL, getURL, parseUrl
-
Constructor Details
-
TileServer
public TileServer(java.lang.String url, int minZoom, int maxZoom, java.lang.String urlFormat)Initializes a TileServer- Parameters:
url
- the base url of the TileServerminZoom
- the min zoom level supported by this TileServermaxZoom
- the max zoom level supported by this TileServerurlFormat
- the format of the url parameters that are appended to the base url
-
TileServer
public TileServer(java.lang.String url, int maxZoom)Initializes a TileServer using the default slippy format- Parameters:
url
- the base url of the TileServermaxZoom
- the max zoom level supported by this TileServer
-
-
Method Details
-
getURLFormatArguments
protected java.lang.Object[] getURLFormatArguments(java.lang.Object ref)- Specified by:
getURLFormatArguments
in classURLService
-
createZXYMap
protected java.util.Map<java.lang.String,java.lang.String> createZXYMap(TileRef tile, java.lang.String zKey, java.lang.String xKey, java.lang.String yKey) -
getURLFormatMap
-
getTileURL
protected java.lang.String getTileURL(TileRef tile, java.lang.String urlFormat, java.lang.Object[] formatArguments) -
getTileURL
protected java.lang.String getTileURL(TileRef tile, java.lang.String urlFormat, java.util.Map<java.lang.String,java.lang.String> formatMap) -
getTileURL
-
toString
public java.lang.String toString()- Overrides:
toString
in classURLService
-
getMinZoom
public int getMinZoom()Gets the min zoom level supported by this TileServer- Returns:
- the min zoom level
-
getMaxZoom
public int getMaxZoom()Gets the max zoom level supported by this TileServer- Returns:
- the max zoom level
-