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 maximum zoom level.
-
-
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 maxZoom, java.lang.String urlFormat)Initializes a TileServer
-
Method Summary
All Methods Instance Methods Concrete Methods 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)intgetMaxZoom()Gets the max zoom level supported by this TileServerjava.lang.StringgetTileURL(TileRef tile)protected java.lang.StringgetTileURL(TileRef tile, java.lang.String urlFormat, java.lang.Object[] formatArguments)protected java.lang.StringgetTileURL(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.StringtoString()-
Methods inherited from class org.eclipse.nebula.widgets.geomap.internal.URLService
getServiceURL, getServiceURL, getURL, parseUrl
-
-
-
-
Constructor Detail
-
TileServer
public TileServer(java.lang.String url, int maxZoom, java.lang.String urlFormat)Initializes a TileServer- Parameters:
url- the base url of the 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 Detail
-
getURLFormatArguments
protected java.lang.Object[] getURLFormatArguments(java.lang.Object ref)
- Specified by:
getURLFormatArgumentsin 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
protected java.util.Map<java.lang.String,java.lang.String> getURLFormatMap(TileRef tile)
-
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
public java.lang.String getTileURL(TileRef tile)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classURLService
-
getMaxZoom
public int getMaxZoom()
Gets the max zoom level supported by this TileServer- Returns:
- the max zoom level
-
-