From: Tom Hughes Date: Tue, 24 Feb 2015 12:42:18 +0000 (+0000) Subject: Restore templating to embed.js X-Git-Tag: live~4259 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/781e80181e629271722b7781809729c0949c262a Restore templating to embed.js The embed.js file is special because it is used standalone without the rest of our javascript environment. Closes #909. --- diff --git a/app/assets/javascripts/embed.js b/app/assets/javascripts/embed.js.erb similarity index 90% rename from app/assets/javascripts/embed.js rename to app/assets/javascripts/embed.js.erb index 05877b1e2..eec4b080e 100644 --- a/app/assets/javascripts/embed.js +++ b/app/assets/javascripts/embed.js.erb @@ -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); }