[openstreetmap/openstreetmap-website] Read layers with available map key from config/key.yml (PR #4368)
Anton Khorev
notifications at github.com
Fri Nov 24 13:49:55 UTC 2023
There's a bunch of map layer configuration specified directly in javascript files, and I added more in https://github.com/openstreetmap/openstreetmap-website/pull/4367, the check for a layer name that can't be embedded. But it would be more convenient to have this configuration outside.
Here the map key button checks if the layer is one of `["mapnik", "cyclemap"]` to enable/disable itself, with these layer names directly in js. But we can look into `key.yml`, see which layers have keys and enable the key button based on that.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4368
-- Commit Summary --
* Read layers with available map key from config/key.yml
-- File Changes --
M app/assets/javascripts/leaflet.key.js (2)
M app/assets/javascripts/osm.js.erb (3)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4368.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4368.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4368
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4368 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231124/6b4da6b1/attachment.htm>
More information about the rails-dev
mailing list