Add function for plugin to add layerGroup and persist display status between session
This commit is contained in:
parent
039167051e
commit
61d83567a6
@ -372,3 +372,8 @@ window.isLayerGroupDisplayed = function(name) {
|
||||
if(typeof(overlayStatus[name]) === 'undefined') return true;
|
||||
return overlayStatus[name];
|
||||
}
|
||||
|
||||
window.addLayerGroup = function(name, layerGroup, defaultDisplay) {
|
||||
if(isLayerGroupDisplayed(name) || defaultDisplay) map.addLayer(layerGroup);
|
||||
layerChooser.addOverlay(layerGroup, name);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user