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));
|
||||
router.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);
|
||||
profile.update(opts);
|
||||
|
||||
|
|
@ -410,6 +405,10 @@
|
|||
if (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) {
|
||||
|
|
|
|||
|
|
@ -96,10 +96,10 @@ BR.CircleGoArea = L.Control.extend({
|
|||
},
|
||||
|
||||
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 icon = L.VectorMarkers.icon({
|
||||
icon: 'home',
|
||||
|
|
@ -119,7 +119,7 @@ BR.CircleGoArea = L.Control.extend({
|
|||
|
||||
this.clear();
|
||||
marker.addTo(this.circleLayer);
|
||||
this.setNogoCircle(center);
|
||||
if (!skipNogo) this.setNogoCircle(center);
|
||||
this.draw(false);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue