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, toStringprotected 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 TileServiceprotected 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 TileServicepublic 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()
TileServiceArray index: zoom-level Value at index: map scale High zoom-level -> more detailed map Low zoom-level -> less detailed map
getScaleList in class TileServicepublic ReferencedEnvelope getBounds()
getBounds in class TileServicepublic CoordinateReferenceSystem getProjectedTileCrs()
TileServicegetProjectedTileCrs in class TileServicepublic TileFactory getTileFactory()
TileServicegetTileFactory in class TileServicepublic 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.