X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/79447e75497601444a9d4de25220f24a609d2780..097449d8e190fe5c19aea5af816d25241b3dd591:/app/assets/javascripts/index/directions.js diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index 6efde27c6..a58b0af16 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -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) {