/plugins/layer_order
The plugin sorts the mapview.locale.layers[] array according to the order of layer object keys in the layer_order locale property.
Layer with keys not referenced in the layer order will be on top.
"layer_order": [
"urban_areas",
"admin",
"retail_places"
]
- Source
Methods
(inner) layer_order(plugin, mapview)
The function sorts mapview.locale.layers based on the order specified in layer_order array. It accesses each layer key and checks its index in the layer_order array.
Parameters:
| Name | Type | Description |
|---|---|---|
plugin | Array | An array listing layers to be reordered. |
mapview | Object | The mapview object |
- Source