]> git.openstreetmap.org Git - rails.git/commitdiff
Fix missing zoom argument of OSM.cropLocation in home location
authorAnton Khorev <tony29@yandex.ru>
Tue, 4 Feb 2025 00:11:17 +0000 (03:11 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 4 Feb 2025 00:11:17 +0000 (03:11 +0300)
app/assets/javascripts/user.js

index 1d167d977fb70e85481179b0671e963c9bc1c08a..9366115cecb730d4465711bca85d71f7f2ccf45c 100644 (file)
@@ -64,7 +64,7 @@ $(document).ready(function () {
       map.on("click", function (e) {
         if (!$("#updatehome").is(":checked")) return;
 
-        const [lat, lon] = OSM.cropLocation(e.latlng);
+        const [lat, lon] = OSM.cropLocation(e.latlng, map.getZoom());
 
         $("#home_lat").val(lat);
         $("#home_lon").val(lon);