Restore active layers (#205)

This commit is contained in:
Norbert Renner 2019-06-18 09:09:55 +02:00
parent 708b35f642
commit ef41a9e5ff
4 changed files with 93 additions and 31 deletions

View file

@ -292,6 +292,12 @@
router.setOptions(routingOptions.getOptions());
profile.update(routingOptions.getOptions());
// restore active layers from local storage when called without hash
// (check before hash plugin init)
if (!location.hash) {
layersControl.loadActiveLayers();
}
var onHashChangeCb = function(url) {
var url2params = function(s) {
s = s.replace(/;/g, '|');