Name: Leaflet.groupedlayercontrol
Owner: Makina Corpus
Description: Leaflet layer control with support for grouping overlays together.
Created: 2014-06-10 13:30:07.0
Updated: 2017-12-03 16:24:42.0
Pushed: 2014-06-12 19:14:17.0
Homepage: null
Size: 154
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Leaflet layer control with support for grouping overlays together.
Add groupings to your overlay layers object, and swap out the default layer control with the new one.
groupedOverlays = {
andmarks": {
"Motorways": motorways,
"Cities": cities
oints of Interest": {
"Restaurants": restaurants
ntrol.groupedLayers(baseLayers, groupedOverlays).addTo(map);
The example shows its usage with various layers.
Adding a layer individually works similarly to the default layer control, except that you can also specify a group name, along with the layer and layer name.
rControl.addOverlay(cities, "Cities", "Landmarks").
This plugin only affects how the layers are dislpayed in the layer control, and not how they are rendered or layered on the map.
Grouping base layers is not currently supported.
Leaflet.groupedlayercontrol is free software, and may be redistributed under the MIT-LICENSE.