[openstreetmap-website] Exposing the map object for Javascript plugins (#1166)
Patrick R
notifications at github.com
Sat Feb 27 15:53:12 UTC 2016
Hello everyone,
In order to add some more tools to the OSM page (mostly measuring), I starting building a Chrome browser extension. However, I was quickly stopped by the fact that the leaflet map object is closured in the individual OSM modules. Thus, it can not be referenced and modified by external scripts. In favor of making the page easier to extend, I would like to propose that the page exposes the map object to other scripts.
I am not too familiar with the conceptual architecture of the Javascript modules beyond what is apparent from the source. From that perspective however, I would propose adding the map object to the global OSM object during the setup in openstreetmap-website/app/assets/javascripts/index.js.
BTW: Thanks for all your great work on OSM :)
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1166
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160227/41c50a47/attachment.html>
More information about the rails-dev
mailing list