OgcMapLayer class
Renders raster tiled images on top of the map tiles from an OGC Web Mapping Service (WMS or WMTS).
- Extends
-
TileLayer
Constructors
| Ogc |
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. |
| on |
Methods
| get |
Gets the capabilities of the underlying WMTS service. |
| get |
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. |
| get |
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. |
| get |
Gets the id of the layer |
| get |
Gets the map that the layer is currently added to, or null. |
| get |
Gets the options of the WMS layer. |
| on |
Initialization method for the layer which is called when added to the map. |
| on |
Method that is called when the layer is removed from the map. Should perform any necessary cleanup for the layer. |
| set |
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
Promise<OgcMapLayerCapabilities>
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()
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.