public class WMTSTileService extends TileService
This is tied to a single layer, style and matrixset.
Modifier and Type | Field and Description |
---|---|
static String |
DIMENSION_ELEVATION |
static String |
DIMENSION_TIME |
static String |
EXTRA_HEADERS |
protected static Logger |
LOGGER |
Constructor and Description |
---|
WMTSTileService(String templateURL,
WMTSServiceType type,
WMTSLayer layer,
String styleName,
TileMatrixSet tileMatrixSet)
create a service directly with out parsing the capabilties again.
|
createSafeEnvelopeInWGS84, getBaseUrl, getMaxZoomLevel, getMinZoomLevel, getName, getTileCrs, getTileHeight, getTileWidth, getZoomLevelFromMapScale, getZoomLevelToUse, toString
protected static final Logger LOGGER
public static final String DIMENSION_TIME
public static final String DIMENSION_ELEVATION
public static final String EXTRA_HEADERS
public WMTSTileService(String templateURL, WMTSServiceType type, WMTSLayer layer, String styleName, TileMatrixSet tileMatrixSet)
requestURL
- - where to ask for tilestype
- - KVP or RESTlayerName
- - name of the layer to requeststyleName
- - name of the style to use?tileMatrixSetName
- - matrixset nameprotected ReferencedEnvelope getReqExtentInTileCrs(ReferencedEnvelope requestedExtent)
public Set<Tile> findTilesInExtent(ReferencedEnvelope requestedExtent, int scaleFactor, boolean recommendedZoomLevel, int maxNumberOfTiles)
findTilesInExtent
in class TileService
protected Tile addTileToCache(Tile tile)
At the moment we are delegating the cache to the super class, which handles the cache as a soft cache. The soft cache has an un-controllable time to live, could last a split seconds or 100 years. However, WMTS services normally come with caching headers of some sort, e.g., do not cache, or keep for 1 hour, or 6 months and so on.
TODO: The code should account for that.
addTileToCache
in class TileService
public WMTSServiceType getType()
public void setType(WMTSServiceType type)
type
- the type to setpublic String getLayerName()
public String getStyleName()
public void setStyleName(String styleName)
styleName
- the styleName to setpublic double[] getScaleList()
TileService
Array index: zoom-level Value at index: map scale High zoom-level -> more detailed map Low zoom-level -> less detailed map
getScaleList
in class TileService
public ReferencedEnvelope getBounds()
getBounds
in class TileService
public CoordinateReferenceSystem getProjectedTileCrs()
TileService
getProjectedTileCrs
in class TileService
public TileFactory getTileFactory()
TileService
getTileFactory
in class TileService
public String getTileMatrixSetName()
public void setTileMatrixSetName(String tileMatrixSetName)
tileMatrixSetName
- the tileMatrixSetName to setpublic TileMatrixSetLink getMatrixSetLink()
public String getTemplateURL()
public void setTemplateURL(String templateURL)
templateURL
- the templateURL to setpublic TileMatrix getTileMatrix(int zoomLevel)
zoomLevel
- public TileMatrixSet getMatrixSet()
public void setMatrixSet(TileMatrixSet matrixSet)
matrixSet
- the matrixSet to setpublic String getFormat()
public void setFormat(String format)
format
- the format to setpublic WMTSZoomLevel getZoomLevel(int zoom)
Copyright © 1996–2019 Geotools. All rights reserved.