Fix route drawing on page reload
This commit is contained in:
parent
0947bbc89c
commit
3b7494b9d9
1 changed files with 6 additions and 4 deletions
|
|
@ -138,11 +138,13 @@
|
||||||
var options = this.options,
|
var options = this.options,
|
||||||
layer = parsed.layer in options ? parsed.layer : Object.keys(options)[0],
|
layer = parsed.layer in options ? parsed.layer : Object.keys(options)[0],
|
||||||
that = this;
|
that = this;
|
||||||
|
|
||||||
|
//FIXME: removing/readding layers breaks Routing plugin
|
||||||
//Add/remove layer
|
//Add/remove layer
|
||||||
this.map.eachLayer(function(layer) {
|
// this.map.eachLayer(function(layer) {
|
||||||
that.map.removeLayer(layer);
|
// that.map.removeLayer(layer);
|
||||||
});
|
// });
|
||||||
that.map.addLayer(options[layer]);
|
// that.map.addLayer(options[layer]);
|
||||||
|
|
||||||
this.isUpdatingHash = false;
|
this.isUpdatingHash = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue