]> git.openstreetmap.org Git - rails.git/commitdiff
Use the OSM map marker icons on the home page
authorTom Hughes <tom@compton.nu>
Tue, 20 Nov 2012 21:52:40 +0000 (21:52 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 20 Nov 2012 21:52:40 +0000 (21:52 +0000)
app/assets/javascripts/index.js

index 90c57f9768404ca85fcdec880155616c20636782..b41bbb0f49c40f6042b52b077e6345ab5d293a35 100644 (file)
@@ -34,7 +34,7 @@ $(document).ready(function () {
   }
 
   if (params.marker) {
   }
 
   if (params.marker) {
-    marker = L.marker([params.mlat, params.mlon]).addTo(map);
+    marker = L.marker([params.mlat, params.mlon], {icon: getUserIcon()}).addTo(map);
   }
 
   if (params.object) {
   }
 
   if (params.object) {
@@ -60,7 +60,7 @@ $(document).ready(function () {
       map.removeLayer(marker);
     }
 
       map.removeLayer(marker);
     }
 
-    marker = L.marker(centre).addTo(map);
+    marker = L.marker(centre, {icon: getUserIcon()}).addTo(map);
   });
 
   function updateLocation() {
   });
 
   function updateLocation() {