OgcMapLayer class

Renders raster tiled images on top of the map tiles from an OGC Web Mapping Service (WMS or WMTS).

Extends

TileLayer

Constructors

OgcMapLayer(OgcMapLayerOptions)

Renders raster images on top of the map tiles from an OGC Web Mapping Service (WMS or WMTS).

Properties

metadata

A property for associating custom data with the layer.

onActiveLayersChanged

Methods

getCapabilities()

Gets the capabilities of the underlying WMTS service.

getFeatureInfo(azmaps.data.Position)

Retrieves an array of WMS feature info objects at a point on the map. If the service does not return a geometry, a Point feature for the specified position will be returned.

getFeatureInfoHtml(azmaps.data.Position)

Gets feature info for the WMS layer as a HTML string. The result will be a HTML document string and should be added to an IFrame when adding to an existing page. Returns null if no feature is found. Requires the service to support 'text/html' format.

getId()

Gets the id of the layer

getMap()

Gets the map that the layer is currently added to, or null.

getOptions()

Gets the options of the WMS layer.

onAdd(azmaps.Map)

Initialization method for the layer which is called when added to the map.

onRemove()

Method that is called when the layer is removed from the map. Should perform any necessary cleanup for the layer.

setOptions(OgcMapLayerOptions)

Sets the options of the WMS layer.

Constructor Details

OgcMapLayer(OgcMapLayerOptions)

Renders raster images on top of the map tiles from an OGC Web Mapping Service (WMS or WMTS).

new OgcMapLayer(options: OgcMapLayerOptions)

Parameters

options
OgcMapLayerOptions

Options for rendering the WMS layer.

Property Details

metadata

A property for associating custom data with the layer.

metadata?: any

Property Value

any

onActiveLayersChanged

onActiveLayersChanged: (layer: OgcMapLayer) => void

Property Value

(layer: OgcMapLayer) => void

Method Details

getCapabilities()

Gets the capabilities of the underlying WMTS service.

function getCapabilities()

Returns

getFeatureInfo(azmaps.data.Position)

Retrieves an array of WMS feature info objects at a point on the map. If the service does not return a geometry, a Point feature for the specified position will be returned.

function getFeatureInfo(position: azmaps.data.Position)

Parameters

position
azmaps.data.Position

The position on the map to request feature info for.

Returns

Promise<azmaps.data.FeatureCollection>

getFeatureInfoHtml(azmaps.data.Position)

Gets feature info for the WMS layer as a HTML string. The result will be a HTML document string and should be added to an IFrame when adding to an existing page. Returns null if no feature is found. Requires the service to support 'text/html' format.

function getFeatureInfoHtml(position: azmaps.data.Position)

Parameters

position
azmaps.data.Position

The position on the map to request feature info for.

Returns

Promise<string>

getId()

Gets the id of the layer

function getId()

Returns

string

getMap()

Gets the map that the layer is currently added to, or null.

function getMap()

Returns

Map

getOptions()

Gets the options of the WMS layer.

function getOptions()

Returns

onAdd(azmaps.Map)

Initialization method for the layer which is called when added to the map.

function onAdd(map: azmaps.Map)

Parameters

map
azmaps.Map

The map the layer has been added to.

onRemove()

Method that is called when the layer is removed from the map. Should perform any necessary cleanup for the layer.

function onRemove()

setOptions(OgcMapLayerOptions)

Sets the options of the WMS layer.

function setOptions(options: OgcMapLayerOptions)

Parameters

options
OgcMapLayerOptions

The options.