[openstreetmap/openstreetmap-website] Move more map layer logic to MapLayers lib to simplify JS (PR #5832)

Marwin Hochfelsner notifications at github.com
Tue Mar 25 00:35:34 UTC 2025


@hlfan commented on this pull request.



> @@ -3,6 +3,10 @@ def self.full_definitions(layers_filename)
     YAML.load_file(Rails.root.join(layers_filename))
         .reject { |layer| layer["apiKeyId"] && !Settings[layer["apiKeyId"]] }
         .map do |layer|
+          layer["name"] = I18n.t("site.index.map.base.#{layer['nameId']}")

Could it be put in the map layout instead so that it is built more than once?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5832#discussion_r2011104471
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5832/review/2711970061 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250324/e31bc7f6/attachment.htm>


More information about the rails-dev mailing list