update several plugins to use window.addLayerGroup, instead of manually adding the layer to the map and Layer control.
this gives automatic handling of remembering shown/hidden layers also, draw tools plugin hides the controls while the drawn items layer is hidden
This commit is contained in:
@ -47,8 +47,7 @@ window.plugin.playerTracker.setup = function() {
|
||||
}});
|
||||
|
||||
plugin.playerTracker.drawnTraces = new L.LayerGroup();
|
||||
window.layerChooser.addOverlay(plugin.playerTracker.drawnTraces, 'Player Tracker');
|
||||
map.addLayer(plugin.playerTracker.drawnTraces);
|
||||
window.addLayerGroup('Player Tracker', plugin.playerTracker.drawnTraces);
|
||||
map.on('layeradd',function(obj) {
|
||||
if(obj.layer === plugin.playerTracker.drawnTraces)
|
||||
{
|
||||
|
Reference in New Issue
Block a user