]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/user.js
Merge remote-tracking branch 'upstream/pull/2890'
[rails.git] / app / assets / javascripts / user.js
index 7cbdb1e110b24c843dc8504c505a1363b15e0acb..3bdb35470c24320c21c8e6f276bf41c082f88d7a 100644 (file)
@@ -1,4 +1,4 @@
-//= require leaflet.locate
+//= require leaflet.locatecontrol/src/L.Control.Locate
 
 $(document).ready(function () {
   if ($("#map").length) {
@@ -18,7 +18,9 @@ $(document).ready(function () {
       iconLoading: "icon geolocate",
       strings: {
         title: I18n.t("javascripts.map.locate.title"),
-        popup: I18n.t("javascripts.map.locate.popup")
+        popup: function (options) {
+          return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance });
+        }
       }
     }).addTo(map);