]> git.openstreetmap.org Git - rails.git/commitdiff
Set icon paths for markers on the embedded map
authorTom Hughes <tom@compton.nu>
Fri, 23 Nov 2012 15:06:13 +0000 (15:06 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 23 Nov 2012 15:06:13 +0000 (15:06 +0000)
app/assets/javascripts/embed.js.erb [moved from app/assets/javascripts/embed.js with 83% similarity]

similarity index 83%
rename from app/assets/javascripts/embed.js
rename to app/assets/javascripts/embed.js.erb
index 914eabb5b381ec3e0e7426057892c3eb29778382..09e211b0a5a1bcbb8c36c6d3109f8bf3574790a2 100644 (file)
@@ -26,7 +26,10 @@ window.onload = function () {
   }
 
   if (args.marker) {
-    L.marker(args.marker).addTo(map);
+    L.marker(args.marker, {icon: L.icon({
+      iconUrl: <%= asset_path('images/marker-icon.png').to_json %>,
+      shadowUrl: <%= asset_path('images/marker-shadow.png').to_json %>
+    })}).addTo(map);
   }
 
   if (args.bbox) {