Use the OSM map marker icons when adding a new diary entry
authorTom Hughes <tom@compton.nu>
Tue, 20 Nov 2012 21:48:50 +0000 (21:48 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 20 Nov 2012 21:48:50 +0000 (21:48 +0000)
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'));
     }