Restore templating to embed.js
authorTom Hughes <tom@compton.nu>
Tue, 24 Feb 2015 12:42:18 +0000 (12:42 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 24 Feb 2015 12:42:18 +0000 (12:42 +0000)
The embed.js file is special because it is used standalone without the
rest of our javascript environment. Closes #909.

app/assets/javascripts/embed.js.erb [moved from app/assets/javascripts/embed.js with 90% similarity]

similarity index 90%
rename from app/assets/javascripts/embed.js
rename to app/assets/javascripts/embed.js.erb
index 05877b1e286cbaeeb985b92d2136a84e3bb54bd3..eec4b080e3e7192559c34072187afb6a3c44aaa6 100644 (file)
@@ -28,10 +28,10 @@ window.onload = function () {
 
   if (args.marker) {
     L.marker(args.marker.split(','), {icon: L.icon({
-      iconUrl: OSM.MARKER_ICON,
+      iconUrl: <%= asset_path('images/marker-icon.png').to_json %>,
       iconSize: new L.Point(25, 41),
       iconAnchor: new L.Point(12, 41),
-      shadowUrl: OSM.MARKER_SHADOW,
+      shadowUrl: <%= asset_path('images/marker-shadow.png').to_json %>,
       shadowSize: new L.Point(41, 41)
     })}).addTo(map);
   }