Extends Leaflet-fullhash properly

This commit is contained in:
Gautier Pelloux-Prayer 2017-04-24 12:10:34 +02:00
parent ac57250b7e
commit d4c5ca67b9
4 changed files with 74 additions and 3 deletions

View file

@ -263,10 +263,12 @@
}
};
urlHash = new L.Hash(map, mapLayers, function() {
urlHash = new BR.Hash(map, mapLayers);
urlHash.additionalCb = function() {
var url = router.getUrl(routing.getWaypoints(), null);
return "&" + url.substr('brouter?'.length + 1);
}, onHashChangeCb);
};
urlHash.onHashChangeCb = onHashChangeCb;
routingOptions.on('update', urlHash.updateHash, urlHash);
nogos.on('update', urlHash.updateHash, urlHash);
// waypoint add, move, delete (but last)