Support optional and custom layers in hash URL

- extend layer control to get current active layers (and more)
- access layer control in hash instead of static initial list
- use ',' layer separator and encode layers individually, so that comma
in layer name gets encoded and is not mistaken as separator as with '-'
This commit is contained in:
Norbert Renner 2019-03-29 22:20:52 +01:00
parent dbc7fce91d
commit d83ffa3fbc
5 changed files with 101 additions and 74 deletions

View file

@ -90,14 +90,9 @@ BR.Map = {
BR.debug = BR.debug || {};
BR.debug.map = map;
var layersAndOverlays = baseLayers;
for (var o in overlays) {
layersAndOverlays[o] = overlays[o];
}
return {
map: map,
layersControl: layersControl,
layers: layersAndOverlays
layersControl: layersControl
};
}