/plugins/userLayer

The plugin module provides developers a jsoneditor interface to add new layers in the default view.

Requires

Methods

(async, inner) addLayer(plugin, mapview)

The method will attempt to decorate the json content of the jsoneditor element as a mapp layer.

The decorate mapp layer will be added to the mapview and the layer view will be appended to the layers list.

Parameters:
NameTypeDescription
pluginObject

The object holds the plugin configuration.

mapviewmapview

The mapview to which a user layer should be added.

(async, inner) userLayer(plugin, mapview)

The userLayer plugin method adds a button to the layer control to open a jsoneditor dialog.

The jsoneditor dialog allows to validate a layer json configuration to add as user layer to the mapview.

Parameters:
NameTypeDescription
pluginObject

The object holds the plugin configuration.

mapviewmapview

The mapview to which a user layer should be added.