don't permalink to custom profile
This commit is contained in:
parent
376c5462d9
commit
1527a07d0e
1 changed files with 10 additions and 3 deletions
|
|
@ -54,14 +54,21 @@ L.Control.Permalink.include({
|
||||||
_update_routing: function (evt) {
|
_update_routing: function (evt) {
|
||||||
var router = this.options.router,
|
var router = this.options.router,
|
||||||
routing = this.options.routing,
|
routing = this.options.routing,
|
||||||
latLngs;
|
routingOptions = this.options.routingOptions,
|
||||||
|
latLngs = routing.getWaypoints(),
|
||||||
|
params = router.getUrlParams(latLngs);
|
||||||
|
|
||||||
if (evt && evt.options) {
|
if (evt && evt.options) {
|
||||||
router.setOptions(evt.options);
|
router.setOptions(evt.options);
|
||||||
}
|
}
|
||||||
|
|
||||||
latLngs = routing.getWaypoints();
|
// don't permalink to custom profile, as these are only stored temporarily
|
||||||
this._update(router.getUrlParams(latLngs));
|
if (params.profile && params.profile === routingOptions.getCustomProfile()) {
|
||||||
|
params.profile = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._update(params);
|
||||||
|
//console.log('permalink: ' + this._href.href);
|
||||||
},
|
},
|
||||||
|
|
||||||
_set_routing: function (e) {
|
_set_routing: function (e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue