Angular controller

controller source

Methods

addLayerToLegends (layer)

Add selected layer to the list of layers in legend (with event listener to display/hide legend item when layer visibility change)

Parameters

NameTypeDescription
layer object

Layer to add legend for

getLegendUrl (source_url, layer_name)

(PRIVATE) Generate url for GetLegendGraphic request of WMS service for selected layer

Parameters

NameTypeDescription
source_url string

Url of sevice

layer_name string

Name of layer for which legend is requested

layerAdded (e)

(PRIVATE) Callback function for adding layer to map, add layers legend

Parameters

NameTypeDescription
e Object

Event object, should have element property