[openstreetmap/openstreetmap-website] Put api keys directly in js layer definitions (PR #5352)
Marwin Hochfelsner
notifications at github.com
Mon Feb 10 19:33:43 UTC 2025
Maybe something along the lines of this?
```ruby
def self.embedDefinitions(layers_filename)
self.definitions(layers_filename)
.select { |entry| entry["canEmbed"] }
.each_with_object({}) do |entry, obj|
obj[entry["layerId"]] = {
layer: entry["leafletOsmId"],
darkLayer: entry["leafletOsmDarkId"],
apikey: entry["apikey"]
}.compact
end
end
```
But I'm no ruby expert
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5352#issuecomment-2649047261
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5352/c2649047261 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250210/f0d470a6/attachment.htm>
More information about the rails-dev
mailing list