]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/user.js
Consolidate leaflet marker creation in OSM.getMarker
[rails.git] / app / assets / javascripts / user.js
index 77a71097b1d41d899372c043e5341ba8f1ce2e27..a2516984e0a84da9ccab4ca92c525f403f9623ce 100644 (file)
@@ -51,7 +51,7 @@ $(function () {
 
     if ($("#map").hasClass("set_location")) {
       marker = L.marker([0, 0], {
-        icon: OSM.getUserIcon(),
+        icon: OSM.getMarker({}),
         keyboard: false,
         interactive: false
       });
@@ -124,7 +124,7 @@ $(function () {
       $("[data-user]").each(function () {
         const user = $(this).data("user");
         if (user.lon && user.lat) {
-          L.marker([user.lat, user.lon], { icon: OSM.getUserIcon(user.icon) }).addTo(map)
+          L.marker([user.lat, user.lon], { icon: OSM.getMarker({ icon: user.icon }) }).addTo(map)
             .bindPopup(user.description, { minWidth: 200 });
         }
       });