X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..bd577d7c92ac81081174f19b8c31899c22145636:/app/assets/javascripts/diary_entry.js?ds=sidebyside diff --git a/app/assets/javascripts/diary_entry.js b/app/assets/javascripts/diary_entry.js index 625d43a52..bd5fd4dd6 100644 --- a/app/assets/javascripts/diary_entry.js +++ b/app/assets/javascripts/diary_entry.js @@ -2,8 +2,10 @@ $(document).ready(function () { var marker, map; function setLocation(e) { - $("#latitude").val(e.latlng.lat); - $("#longitude").val(e.latlng.lng); + const latlng = e.latlng.wrap(); + + $("#latitude").val(latlng.lat); + $("#longitude").val(latlng.lng); if (marker) { map.removeLayer(marker);