]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Use https to launch the remote editor except for modern browsers
[rails.git] / app / assets / javascripts / index / directions.js
index 1057fa58d5337077a1401ad7bd864cff355daa22..8a80328cc05c3767813ac7ff3823330001095d9e 100644 (file)
@@ -40,7 +40,8 @@ OSM.Directions = function (map) {
         shadowUrl: OSM.MARKER_SHADOW,
         shadowSize: [41, 41]
       }),
-      draggable: true
+      draggable: true,
+      autoPan: true
     });
 
     endpoint.marker.on('drag dragend', function (e) {
@@ -68,6 +69,7 @@ OSM.Directions = function (map) {
     endpoint.setValue = function(value, latlng) {
       endpoint.value = value;
       delete endpoint.latlng;
+      input.removeClass("error");
       input.val(value);
 
       if (latlng) {