]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/diary_entry.js
Consolidate leaflet marker creation in OSM.getMarker
[rails.git] / app / assets / javascripts / diary_entry.js
index bfc3fc0128a70470324f68117f7789d1316d8584..e434460941529f39642e29af7658fe8d0bcc235d 100644 (file)
@@ -11,7 +11,7 @@ $(function () {
       map.removeLayer(marker);
     }
 
-    marker = L.marker(e.latlng, { icon: OSM.getUserIcon() }).addTo(map)
+    marker = L.marker(e.latlng, { icon: OSM.getMarker({}) }).addTo(map)
       .bindPopup(OSM.i18n.t("diary_entries.edit.marker_text"));
   }
 
@@ -36,7 +36,7 @@ $(function () {
     map.setView(centre, params.zoom);
 
     if ($("#latitude").val() && $("#longitude").val()) {
-      marker = L.marker(centre, { icon: OSM.getUserIcon() }).addTo(map)
+      marker = L.marker(centre, { icon: OSM.getMarker({}) }).addTo(map)
         .bindPopup(OSM.i18n.t("diary_entries.edit.marker_text"));
     }