1 //= require leaflet.locate
 
   4   const defaultHomeZoom = 12;
 
   7   if ($("#map").length) {
 
   9       attributionControl: false,
 
  11     }).addLayer(new L.OSM.Mapnik());
 
  13     const position = $("html").attr("dir") === "rtl" ? "topleft" : "topright";
 
  15     L.OSM.zoom({ position }).addTo(map);
 
  17     L.OSM.locate({ position }).addTo(map);
 
  20       map.setView([OSM.home.lat, OSM.home.lon], defaultHomeZoom);
 
  22       map.setView([0, 0], 0);
 
  25     $("[data-user]").each(function () {
 
  26       const user = $(this).data("user");
 
  27       if (user.lon && user.lat) {
 
  28         L.marker([user.lat, user.lon], { icon: OSM.getMarker({ color: user.color }) }).addTo(map)
 
  29           .bindPopup(user.description, { minWidth: 200 });