]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/user.js
Remove link_to_if since it's in a clause with the same condition
[rails.git] / app / assets / javascripts / user.js
index 3839a18c24c10a5d16c776b934a16b5bd673d6e0..3bdb35470c24320c21c8e6f276bf41c082f88d7a 100644 (file)
@@ -1,4 +1,4 @@
-//= require leaflet.locate
+//= require leaflet.locatecontrol/src/L.Control.Locate
 
 $(document).ready(function () {
   if ($("#map").length) {
 
 $(document).ready(function () {
   if ($("#map").length) {
@@ -18,9 +18,9 @@ $(document).ready(function () {
       iconLoading: "icon geolocate",
       strings: {
         title: I18n.t("javascripts.map.locate.title"),
       iconLoading: "icon geolocate",
       strings: {
         title: I18n.t("javascripts.map.locate.title"),
-        metersUnit: I18n.t("javascripts.map.locate.metersUnit"),
-        feetUnit: I18n.t("javascripts.map.locate.feetUnit"),
-        popup: I18n.t("javascripts.map.locate.popup")
+        popup: function (options) {
+          return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance });
+        }
       }
     }).addTo(map);
 
       }
     }).addTo(map);