/plugins/userLayer
The plugin module provides developers a jsoneditor interface to add new layers in the default view.
- Source
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:
Name | Type | Description |
---|---|---|
plugin | Object | The object holds the plugin configuration. |
mapview | mapview | The mapview to which a user layer should be added. |
- Source
(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:
Name | Type | Description |
---|---|---|
plugin | Object | The object holds the plugin configuration. |
mapview | mapview | The mapview to which a user layer should be added. |
- Source