Class: IWWMTSParser

IWWMTSParser

A parser which reads the capability descriptor of a WMTS service and returns a list of available tile layers.

new IWWMTSParser()

Methods


parse(url, callback)

Parses the provided WMTS capabilities descriptor and returns the layers of that service. The layers object passed to the callback is an array of objects with these propierties:
  • id: The ID of the layer
  • urlTemplate: URL template for the tiles
  • zMin: Minimum zoom level of the layer
  • zMax: Maximum zoom level of the layer
  • zOffset: Offset to z levels of the MapAPI
  • bounds: An IWBounds object representing the bounding box of the layer
  • opacity: Opacity of the layer (0.6 by default, overwrite to change the opacity)
  • title: Title of the layer
  • description: Description of the layer
  • legend: A legend image
Parameters:
Name Type Description
url string the URL of the capabilities descriptor
callback function a callback function which is called with an array of layers
Returns:
Type
void