[openstreetmap/openstreetmap-website] Embedded maps are broken for Thunderforest layers (#1293)

Andy Allan notifications at github.com
Wed Sep 21 18:19:52 UTC 2016

I saw [a report](https://help.openstreetmap.org/questions/52023/embedded-maps-not-working) on help.openstreetmap.org and thought I should investigate.

The embedded maps are no longer working for the Transport and Cycle layers, since the JavaScript code that generates the embedding output does not included the JavaScript code that sets the API Keys. Using an embedded map on a test site, I see the following in the console:

Error: No value provided for variable {apikey}
...unction(e,n){var o=a[n];if(o===t)throw new Error("No value provided for variable...


I'm assuming that the `app/assets/javascripts/embed.js.erb` file isn't including the correct file (i.e. `app/assets/javascripts/osm.js.erb` where the API Key is transferred into the javascript code).

Unfortunately I haven't figured out the javascript dependencies for `embed.js.erb` so I can't see what should be fixed and where the dependency should be added. I don't see any of the files referenced at the top of that file ( "leaflet", "leaflet.osm", "i18n/translations") so there's some magic somewhere.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160921/3472bc50/attachment.html>

More information about the rails-dev mailing list