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 format
    TileServer​(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 TileServer
    int getMinZoom()
    Gets the min zoom level supported by this TileServer
    java.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 TileServer
      minZoom - the min zoom level supported by this TileServer
      maxZoom - the max zoom level supported by this TileServer
      urlFormat - 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 TileServer
      maxZoom - the max zoom level supported by this TileServer
  • Method Details

    • getURLFormatArguments

      protected java.lang.Object[] getURLFormatArguments​(java.lang.Object ref)
      Specified by:
      getURLFormatArguments in class URLService
    • 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:
      toString in class URLService
    • 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