]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Localisation updates from https://translatewiki.net.
[rails.git] / app / assets / javascripts / index / directions.js
index 6efde27c6a91dde0f3983fd1ccc2c560fac7c0f7..a58b0af16abc956471170020435ab0c916a8c508 100644 (file)
@@ -334,10 +334,8 @@ OSM.Directions = function (map) {
 
   select.on("change", function (e) {
     chosenEngine = engines[e.target.selectedIndex];
-    $.cookie("_osm_directions_engine", chosenEngine.id, { expires: expiry, path: "/" });
-    if (map.hasLayer(polyline)) {
-      getRoute(true, true);
-    }
+    $.cookie("_osm_directions_engine", chosenEngine.id, { secure: true, expires: expiry, path: "/" });
+    getRoute(true, true);
   });
 
   $(".directions_form").on("submit", function (e) {