Class: WMSLayer

vef.map.layer.WMSLayer(config, cache, id)

WMS Layer Implementation

Constructor

new WMSLayer(config, cache, id)

Set all properties for the layer based on the options object.
Parameters:
Name Type Description
config object
cache object
id string
Author:
Source:

Methods

applyFilter(noReload)

Apply a filter on the layer. Uses WMS filter string
Parameters:
Name Type Description
noReload boolean prevents reload if true
Source:

getBounds() → {object}

Get the bounding box as an object
Source:
Returns:
{ min: {x, y}, max: {x, y}, crs: "CRS:84" }
Type
object

getColorScale()

Get the active colorscale for the layer
Source:

getFeatureInfo(options) → {Promise}

Get feature info for a specific location. e.g. for displaying it in a map-popup
Parameters:
Name Type Description
options object getFeatureInfo params from map
Source:
Returns:
feature info promise
Type
Promise

getLegendGraphic()

Returns the Legend Graphic for this layer. May depend on current color scale.
Source:
Returns:
html -tag (null or undefined if there is no legend graphic)

getStyle()

Get the active style of the layer.
Source:

reload()

Reload the Layer on the map
Source:

setColorScale(colorScale, noReload)

Set the colorscale for the layer
Parameters:
Name Type Description
colorScale
noReload boolean prevents reload if true
Source:

setProjection(crs) → {boolean}

Switches the projection for the visualization of the layer. CRS hast to be included in availableCRS
Parameters:
Name Type Description
crs string target crs code
Source:
Returns:
returns true if successful
Type
boolean

setStyle(styleName, noReload)

Set the style of the layer. Does not check if a style exists in availableStyles (non-listed styles are allowed)
Parameters:
Name Type Description
styleName string style name
noReload boolean prevents reload if true
Source:

setZIndex(index)

Set the z-index of a layer
Parameters:
Name Type Description
index number
Source: