Support URL even if latlon are missing

This commit is contained in:
Gautier Pelloux-Prayer 2017-04-07 08:42:52 +02:00
parent e82f360d9c
commit 0947bbc89c
2 changed files with 2 additions and 6 deletions

View file

@ -236,11 +236,7 @@
profile.update(routingOptions.getOptions());
urlHash = new L.Hash(map, mapLayers, function() {
var latLngs = routing.getWaypoints();
if (latLngs.length > 1) {
return router.getUrl(latLngs, null);
}
return null;
return router.getUrl(routing.getWaypoints(), null);
});
routingOptions.on('update', urlHash.updateHash, urlHash);
nogos.on('update', urlHash.updateHash, urlHash);