OpenLayers.Format.WMTSCapabilities

Read WMTS Capabilities.

Inherits from

Summary
OpenLayers.Format.WMTSCapabilitiesRead WMTS Capabilities.
Properties
defaultVersion{String} Version number to assume if none found.
yx{Object} Members in the yx object are used to determine if a CRS URN corresponds to a CRS with y,x axis order.
Constructor
OpenLayers.Format.WMTSCapabilitiesCreate a new parser for WMTS capabilities.
Functions
readRead capabilities data from a string, and return information about the service (offering and observedProperty mostly).
createLayerCreate a WMTS layer given a capabilities object.

Properties

defaultVersion

{String} Version number to assume if none found.  Default is “1.0.0”.

yx

{Object} Members in the yx object are used to determine if a CRS URN corresponds to a CRS with y,x axis order.  Member names are CRS URNs and values are boolean.  By default, the following CRS URN are assumed to correspond to a CRS with y,x axis order:

  • urn:ogc:def:crs:EPSG::4326

Constructor

OpenLayers.Format.WMTSCapabilities

Create a new parser for WMTS capabilities.

Parameters

options{Object} An optional object whose properties will be set on this instance.

Functions

read

Read capabilities data from a string, and return information about the service (offering and observedProperty mostly).

Parameters

data{String} or {DOMElement} data to read/parse.

Returns

{Object} Info about the WMTS Capabilities

createLayer

createLayer: function(capabilities,
config)

Create a WMTS layer given a capabilities object.

Parameters

capabilities{Object} The object returned from a read call to this format.
config{Object} Configuration properties for the layer.  Defaults for the layer will apply if not provided.

Required config properties

layer{String} The layer identifier.

Optional config properties

matrixSet{String} The matrix set identifier, required if there is more than one matrix set in the layer capabilities.
projection{String} The desired CRS when no matrixSet is specified. eg: “EPSG:3857”.  If the desired projection is not available, an error is thrown.
style{String} The name of the style
format{String} Image format for the layer.  Default is the first format returned in the GetCapabilities response.
param{Object} The dimensions values eg: {“Year”: “2012”}

Returns

{OpenLayers.Layer.WMTS} A properly configured WMTS layer.  Throws an error if an incomplete config is provided.  Returns undefined if no layer could be created with the provided config.

createLayer: function(capabilities,
config)
Create a WMTS layer given a capabilities object.
Base class for versioned formats, i.e.
Read capabilities data from a string, and return information about the service (offering and observedProperty mostly).
Instances of the WMTS class allow viewing of tiles from a service that implements the OGC WMTS specification version 1.0.0.
Close