1 L.OSM.locate = function (options) {
2 var control = L.control.locate(Object.assign({
3 icon: "icon geolocate",
4 iconLoading: "icon geolocate",
6 title: I18n.t("javascripts.map.locate.title"),
7 popup: function (options) {
8 return I18n.t("javascripts.map.locate." + options.unit + "Popup", { count: options.distance });
13 control.onAdd = function (map) {
14 var container = Object.getPrototypeOf(this).onAdd.apply(this, [map]);
16 .removeClass("leaflet-control-locate leaflet-bar")
17 .addClass("control-locate")
20 .removeClass("leaflet-bar-part leaflet-bar-part-single")
21 .addClass("control-button");