M/control/LayerSwitcher~LayerSwitcher


import LayerSwitcher from 'M/control/LayerSwitcher';

Main constructor of the class. Creates a GetFeatureInfo control to provides a popup with information about the place where the user has clicked inside the Map.

new LayerSwitcher(format)

facade/js/control/Layerswitcher.js, line 34
Name Type Description
format String

format response

Extends

  • M.Control

Members

module:M/control/LayerSwitcher~LayerSwitcher.EMPTYLAYER{Object}

Empty layer

module:M/control/LayerSwitcher~LayerSwitcher.NAME{string}

Template for this controls - button

Methods

createView(map){Promise}

facade/js/control/Layerswitcher.js, line 74

This function creates the view to the specified map

Name Type Description
map M.Map

map to add the control

Returns:
html response

equals()

facade/js/control/Layerswitcher.js, line 95

This function checks if an object is equals to this control

registerEvents()

facade/js/control/Layerswitcher.js, line 118

This function registers events on map and layers to render the layerswitcher

render()

facade/js/control/Layerswitcher.js, line 107

This function registers events on map and layers to render the layerswitcher

unregisterEvents()

facade/js/control/Layerswitcher.js, line 128

Unegisters events for map and layers from the layerswitcher