Package org.mapfish.print.map.tiled.wmts
Class WMTSLayerParam
- java.lang.Object
-
- org.mapfish.print.map.AbstractLayerParams
-
- org.mapfish.print.map.tiled.AbstractTiledLayerParams
-
- org.mapfish.print.map.tiled.AbstractWMXLayerParams
-
- org.mapfish.print.map.tiled.wmts.WMTSLayerParam
-
public final class WMTSLayerParam extends AbstractWMXLayerParams
The parameters for configuration a WMTS layer.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
baseURL
The ‘ResourceURL’ available in the WMTS capabilities.PObject
dimensionParams
Dictionary of dimensions name (Must be uppercase) => value.java.lang.String[]
dimensions
The "sample" dimensions or image color bands to retrieve.java.lang.String
imageFormat
The format of the image.java.lang.String
layer
The layer name.Matrix[]
matrices
Array of matrix ids.java.lang.String
matrixSet
Reference/Identifier to a tileMatrixSet and limits.RequestEncoding
requestEncoding
The way to make the requests.java.lang.String
style
The style name (for styles on the WMTS server).java.lang.String
version
The WMTS protocol version to use.-
Fields inherited from class org.mapfish.print.map.tiled.AbstractWMXLayerParams
customParams, mergeableParams
-
Fields inherited from class org.mapfish.print.map.tiled.AbstractTiledLayerParams
rasterStyle
-
Fields inherited from class org.mapfish.print.map.AbstractLayerParams
failOnError, name, opacity
-
-
Constructor Summary
Constructors Constructor Description WMTSLayerParam()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createCommonUrl()
Create a URL that is common to all image requests for this layer.java.lang.String
getBaseUrl()
Get the base url for all tile requests.void
postConstruct()
Validate some of the properties of this layer.boolean
validateBaseUrl()
Validates the provided base url.-
Methods inherited from class org.mapfish.print.map.tiled.AbstractWMXLayerParams
getCustomParams, getMergeableParams, setCustomParam
-
-
-
-
Field Detail
-
baseURL
public java.lang.String baseURL
The ‘ResourceURL’ available in the WMTS capabilities.Example (for
requestEncoding: "KVP"
):
Example (forbaseUrl: "http://domain.com/wmts"
requestEncoding: "REST"
):
The following URL template variables are replaced:baseUrl: "http://domain.com/wmts/roads/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png"
- {Layer}
- {style}
- {TileMatrixSet}
- {TileMatrix}
- {TileRow}
- {TileCol}
- {[DIMENSION.IDENTIFIER]}
-
layer
public java.lang.String layer
The layer name.
-
version
public java.lang.String version
The WMTS protocol version to use.
-
requestEncoding
public RequestEncoding requestEncoding
The way to make the requests. EitherKVP
orREST
(default).
-
style
public java.lang.String style
The style name (for styles on the WMTS server).
-
dimensions
public java.lang.String[] dimensions
The "sample" dimensions or image color bands to retrieve.This can be null, if so then the default dimensions will be returned. If specified they must be dimensions supported by the server.
These are keys to the
dimensionParams
.
-
dimensionParams
public PObject dimensionParams
Dictionary of dimensions name (Must be uppercase) => value.
-
imageFormat
public java.lang.String imageFormat
The format of the image. for example image/png, image/jpeg, etc...
-
matrixSet
public java.lang.String matrixSet
Reference/Identifier to a tileMatrixSet and limits.
-
matrices
public Matrix[] matrices
Array of matrix ids.Example:
[{ "identifier": "0", "matrixSize": [1, 1], "scaleDenominator": 4000, "tileSize": [256, 256], "topLeftCorner": [420000, 350000] }, ...]
-
-
Method Detail
-
getBaseUrl
public java.lang.String getBaseUrl()
Description copied from class:AbstractTiledLayerParams
Get the base url for all tile requests. For example it might be 'http://server .com/geoserver/gwc/service/wmts'.- Specified by:
getBaseUrl
in classAbstractTiledLayerParams
-
postConstruct
public void postConstruct()
Validate some of the properties of this layer.
-
createCommonUrl
public java.lang.String createCommonUrl() throws java.net.URISyntaxException
Description copied from class:AbstractTiledLayerParams
Create a URL that is common to all image requests for this layer. It will take the base url and append all mergeable and custom params to the base url.- Overrides:
createCommonUrl
in classAbstractWMXLayerParams
- Throws:
java.net.URISyntaxException
-
validateBaseUrl
public boolean validateBaseUrl()
Description copied from class:AbstractTiledLayerParams
Validates the provided base url.- Overrides:
validateBaseUrl
in classAbstractWMXLayerParams
- Returns:
- True, if the url is valid.
-
-