leaflet-environmental-layers
Version:
[](https://gitpod.io/#https://github.com/publiclab/leaflet-environmental-layers/) [](http
15 lines (13 loc) • 345 B
JavaScript
L.Control.Layers.include({
getActiveOverlayNames: function() {
var layers = [];
var control = this;
this._layers.forEach(function(layerObj) {
if (layerObj.overlay) {
layerName = layerObj.name;
if (control._map.hasLayer(layerObj.layer)) layers.push(layerObj.name);
}
});
return layers;
},
});