]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/diary_entry.js
Use new Leaflet setPopupContent method
[rails.git] / app / assets / javascripts / diary_entry.js
index a001d7482d7b4fb0e47d9054fad47066081aa653..291c8652382a85ab4cee1414eb6ce5d962a8bfef 100644 (file)
@@ -9,7 +9,7 @@ $(document).ready(function () {
       map.removeLayer(marker);
     }
 
-    marker = L.marker(e.latlng).addTo(map)
+    marker = L.marker(e.latlng, {icon: getUserIcon()}).addTo(map)
       .bindPopup(I18n.t('diary_entry.edit.marker_text'));
   }
 
@@ -26,7 +26,7 @@ $(document).ready(function () {
     map.setView(centre, params.zoom);
 
     if ($("#latitude").val() && $("#longitude").val()) {
-      marker = L.marker(centre).addTo(map)
+      marker = L.marker(centre, {icon: getUserIcon()}).addTo(map)
         .bindPopup(I18n.t('diary_entry.edit.marker_text'));
     }