M/layer/WMS~WMS


import WMS from 'M/layer/WMS';

Main constructor of the class. Creates a WMS layer with parameters specified by the user*

new WMS(userParameters, options, vendorOptions)

facade/js/layer/WMS.js, line 30
Name Type Description
userParameters string | Mx.parameters.WMS

parameters

options Mx.parameters.LayerOptions

provided by the user

vendorOptions Object

vendor options for the base library

Extends

  • M.Layer

Methods

calculateMaxExtent(){Promise}

facade/js/layer/WMS.js, line 304

Async version of getMaxExtent. Calculates the maxExtent of this layer, being the first value found in this order::

  1. checks if the user specified a maxExtent parameter for the layer.
  2. gets the maxExtent of the layer in the WMC, if any.
  3. gets the maxExtent of the map.
  4. gets the global maxExtent from the WMC.
  5. gets the maxExtent from the layer WMS Capabilities.
  6. gets the maxExtent from the map projection.
Returns:
  • Promise object represents the maxExtent of the layer

equals(){boolean}

facade/js/layer/WMS.js, line 418

This function checks if an object is equals to this layer. Two WMS layers are equal if the are both WMS instances and have the same url, name, cql and version values.

Returns:
True if equal, false otherwise

getCapabilities(){Promise}

facade/js/layer/WMS.js, line 318

Retrieves a Promise which will be resolved when the GetCapabilities request is retrieved by the service and parsed. The returned capabilities is cached in order to prevent successive requests

Returns:
  • Promise object represents the getCapabilities of the layer

getLegendCapabilities(){Promise}

facade/js/layer/WMS.js, line 332

This funcion returns the URL of the legend of GetCapabilities

Returns:
url WMS equivalen service for this layer.

getMaxExtent(callbackFn){Array.<number>}

facade/js/layer/WMS.js, line 240

Calculates the maxExtent of this layer, being the first value found in this order:

  1. checks if the user specified a maxExtent parameter for the layer.
  2. gets the maxExtent of the layer in the WMC, if any.
  3. gets the maxExtent of the map.
  4. gets the global maxExtent from the WMC.
  5. gets the maxExtent from the layer WMS Capabilities.
  6. gets the maxExtent from the map projection.
Name Type Description
callbackFn Object

Optional callback function

Returns:
Max extent of the layer

getNoCacheName(){string}

facade/js/layer/WMS.js, line 356

If this WMS layer actually requests a tiled layer service, there may be an equivalent WMS service which can be used for other purposes (printing, etc.)

Returns:
Name of the layer in the WMS equivalen service for this layer.

getNoCacheUrl(){string}

facade/js/layer/WMS.js, line 344

If this WMS layer actually requests a tiled layer service, there may be an equivalent WMS service which can be used for other purposes (printing, etc.)

Returns:
url WMS equivalen service for this layer.

getWMCParent(){M.layer.WMC}

facade/js/layer/WMS.js, line 380

Gets the parent WMC Layer, if any

Returns:
WMC Layer that includes this layer

setName(newName)

facade/js/layer/WMS.js, line 222

Sets the name of the layer

Name Type Description
newName String

Name

setTileLoadFunction(func)

facade/js/layer/WMS.js, line 198

This function sets the tileLoadFunction On the implementation

Name Type Description
func function

Function to override

setURL(newURL)

facade/js/layer/WMS.js, line 210

Sets the url of the layer

Name Type Description
newURL String

URL

setWMCParent(wmcParent)

facade/js/layer/WMS.js, line 368

Sets a WMC Layer as a parent of this layer.

Name Type Description
wmcParent M.layer.WMC

WMC Layer that includes this layer

updateMinMaxResolution(projection)

facade/js/layer/WMS.js, line 392

Updates minimum and maximum resolutions

Name Type Description
projection String | Mx.Projection

Projection map