Use & instead of ? in URL

This commit is contained in:
Gautier Pelloux-Prayer 2017-04-28 10:24:14 +02:00
parent 4a431ac4bf
commit 3d3dd376a4
2 changed files with 5 additions and 3 deletions

View file

@ -20,7 +20,7 @@
if(hash.indexOf('#map=') === 0) {
hash = hash.substr(5);
}
var args = hash.split("?");
var args = hash.split(/\&(.+)/);
var mapsArgs = args[0].split("/");
if (mapsArgs.length == 4) {
var zoom = parseInt(mapsArgs[0], 10),
@ -160,7 +160,9 @@
}
});
layers.forEach(function(element, index, array) {
that.map.addLayer(options[element]);
if (element in options) {
that.map.addLayer(options[element]);
}
});
this.isUpdatingHash = false;