Do not override nogos on url load (#349)
This commit is contained in:
parent
fde629fcb0
commit
8ca602575c
2 changed files with 7 additions and 8 deletions
|
|
@ -394,11 +394,6 @@
|
||||||
var opts = router.parseUrlParams(url2params(url));
|
var opts = router.parseUrlParams(url2params(url));
|
||||||
router.setOptions(opts);
|
router.setOptions(opts);
|
||||||
routingOptions.setOptions(opts);
|
routingOptions.setOptions(opts);
|
||||||
if (circlego && opts.circlego) {
|
|
||||||
// must be done before nogos!
|
|
||||||
circlego.options.radius = opts.circlego[2];
|
|
||||||
circlego.setCircle([opts.circlego[0], opts.circlego[1]]);
|
|
||||||
}
|
|
||||||
nogos.setOptions(opts);
|
nogos.setOptions(opts);
|
||||||
profile.update(opts);
|
profile.update(opts);
|
||||||
|
|
||||||
|
|
@ -410,6 +405,10 @@
|
||||||
if (opts.pois) {
|
if (opts.pois) {
|
||||||
pois.setMarkers(opts.pois);
|
pois.setMarkers(opts.pois);
|
||||||
}
|
}
|
||||||
|
if (circlego && opts.circlego) {
|
||||||
|
circlego.options.radius = opts.circlego[2];
|
||||||
|
circlego.setCircle([opts.circlego[0], opts.circlego[1]], opts.polylines != null);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var onInvalidHashChangeCb = function(params) {
|
var onInvalidHashChangeCb = function(params) {
|
||||||
|
|
|
||||||
|
|
@ -96,10 +96,10 @@ BR.CircleGoArea = L.Control.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onMapClick: function(e) {
|
onMapClick: function(e) {
|
||||||
this.setCircle([e.latlng.lng, e.latlng.lat]);
|
this.setCircle([e.latlng.lng, e.latlng.lat], false);
|
||||||
},
|
},
|
||||||
|
|
||||||
setCircle: function(center) {
|
setCircle: function(center, skipNogo) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var icon = L.VectorMarkers.icon({
|
var icon = L.VectorMarkers.icon({
|
||||||
icon: 'home',
|
icon: 'home',
|
||||||
|
|
@ -119,7 +119,7 @@ BR.CircleGoArea = L.Control.extend({
|
||||||
|
|
||||||
this.clear();
|
this.clear();
|
||||||
marker.addTo(this.circleLayer);
|
marker.addTo(this.circleLayer);
|
||||||
this.setNogoCircle(center);
|
if (!skipNogo) this.setNogoCircle(center);
|
||||||
this.draw(false);
|
this.draw(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue