Instances of the WMTS class allow viewing of tiles from a service that implements the OGC WMTS specification version 1.0.0.
OpenLayers.
|
Instances of the WMTS class allow viewing of tiles from a service that implements the OGC WMTS specification version 1.0.0. |
Properties | |
isBaseLayer | {Boolean} The layer will be considered a base layer. |
requestEncoding | {String} Request encoding. |
url | {String|Array(String)} The base URL or request URL template for the WMTS service. |
layer | {String} The layer identifier advertised by the WMTS service. |
matrixSet | {String} One of the advertised matrix set identifiers. |
style | {String} One of the advertised layer styles. |
format | {String} The image MIME type. |
tileOrigin | {OpenLayers.LonLat} The top-left corner of the tile matrix in map units. |
tileFullExtent | {OpenLayers.Bounds} The full extent of the tile set. |
formatSuffix | {String} For REST request encoding, an image format suffix must be included in the request. |
matrixIds | {Array} A list of tile matrix identifiers. |
dimensions | {Array} For RESTful request encoding, extra dimensions may be specified. |
params | {Object} Extra parameters to include in tile requests. |
zoomOffset | {Number} If your cache has more levels than you want to provide access to with this layer, supply a zoomOffset. |
serverResolutions | {Array} A list of all resolutions available on the server. |
Constructor | |
OpenLayers.
|
Create a new WMTS layer. |
Functions | |
clone | |
mergeNewParams | Extend the existing layer params with new properties. |
{String|Array(String)} The base URL or request URL template for the WMTS service. Must be provided. Array is only supported for base URLs, not for request URL templates. URL templates are only supported for REST requestEncoding.
{OpenLayers.LonLat} The top-left corner of the tile matrix in map units. If the tile origin for each matrix in a set is different, the matrixIds should include a topLeftCorner property. If not provided, the tile origin will default to the top left corner of the layer maxExtent.
{OpenLayers.Bounds} The full extent of the tile set. If not supplied, the layer’s maxExtent property will be used.
{String} For REST request encoding, an image format suffix must be included in the request. If not provided, the suffix will be derived from the format property.
{Array} A list of tile matrix identifiers. If not provided, the matrix identifiers will be assumed to be integers corresponding to the map zoom level. If a list of strings is provided, each item should be the matrix identifier that corresponds to the map zoom level. Additionally, a list of objects can be provided. Each object should describe the matrix as presented in the WMTS capabilities. These objects should have the propertes shown below.
identifier | {String} The matrix identifier (required). |
scaleDenominator | {Number} The matrix scale denominator. |
topLeftCorner | {OpenLayers.LonLat} The top left corner of the matrix. Must be provided if different than the layer tileOrigin. |
tileWidth | {Number} The tile width for the matrix. Must be provided if different than the width given in the layer tileSize. |
tileHeight | {Number} The tile height for the matrix. Must be provided if different than the height given in the layer tileSize. |
{Object} Extra parameters to include in tile requests. For KVP requestEncoding, these properties will be encoded in the request query string. For REST requestEncoding, these properties will become part of the request path, with order determined by the dimensions list.
{Number} If your cache has more levels than you want to provide access to with this layer, supply a zoomOffset. This zoom offset is added to the current map zoom level to determine the level for a requested tile. For example, if you supply a zoomOffset of 3, when the map is at the zoom 0, tiles will be requested from level 3 of your cache. Default is 0 (assumes cache level and map zoom are equivalent). Additionally, if this layer is to be used as an overlay and the cache has fewer zoom levels than the base layer, you can supply a negative zoomOffset. For example, if a map zoom level of 1 corresponds to your cache level zero, you would supply a -1 zoomOffset (and set the maxResolution of the layer appropriately). The zoomOffset value has no effect if complete matrix definitions (including scaleDenominator) are supplied in the matrixIds property. Defaults to 0 (no zoom offset).
{Array} A list of all resolutions available on the server. Only set this property if the map resolutions differ from the server. This property serves two purposes. (a) serverResolutions can include resolutions that the server supports and that you don’t want to provide with this layer; you can also look at zoomOffset, which is an alternative to serverResolutions for that specific purpose. (b) The map can work with resolutions that aren’t supported by the server, i.e. that aren’t in serverResolutions. When the map is displayed in such a resolution data for the closest server-supported resolution is loaded and the layer div is stretched as necessary.
Create a new WMTS layer.
var wmts = new OpenLayers.Layer.WMTS({ name: "My WMTS Layer", url: "http://example.com/wmts", layer: "layer_id", style: "default", matrixSet: "matrix_id" });
config | {Object} Configuration properties for the layer. |
url | {String} The base url for the service. See the url property. |
layer | {String} The layer identifier. See the layer property. |
style | {String} The layer style identifier. See the style property. |
matrixSet | {String} The tile matrix set identifier. See the matrixSet property. |
Any other documented layer properties can be provided in the config object.
clone: function( obj )
obj | {Object} |
{OpenLayers.Layer.WMTS} An exact clone of this OpenLayers.Layer.WMTS
clone: function( obj )
Extend the existing layer params with new properties.
mergeNewParams: function( newParams )