]> git.openstreetmap.org Git - rails.git/commitdiff
Reverse-geocode on endpoint marker drag end
authorAnton Khorev <tony29@yandex.ru>
Mon, 12 Aug 2024 01:59:23 +0000 (04:59 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sun, 8 Sep 2024 07:38:53 +0000 (10:38 +0300)
app/assets/javascripts/index/directions-endpoint.js

index b3d03cdca5ccc97b4a5a9bcfc5119271ad75e91f..604dcc2b6c6b8ed3a0751531dec9a0f452be92ed 100644 (file)
@@ -42,6 +42,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
     setLatLng(latlng);
     setInputValueFromLatLng(latlng);
     endpoint.value = input.val();
     setLatLng(latlng);
     setInputValueFromLatLng(latlng);
     endpoint.value = input.val();
+    if (e.type === "dragend") getReverseGeocode();
     dragCallback(e.type === "drag");
   }
 
     dragCallback(e.type === "drag");
   }