Skip to content

Add egMapsLeafletLayerDefinitions setting for custom Leaflet layers#921

Merged
JeroenDeDauw merged 3 commits into
masterfrom
leaflet-layer-definitions
Jul 18, 2026
Merged

Add egMapsLeafletLayerDefinitions setting for custom Leaflet layers#921
JeroenDeDauw merged 3 commits into
masterfrom
leaflet-layer-definitions

Conversation

@JeroenDeDauw

@JeroenDeDauw JeroenDeDauw commented Jul 17, 2026

Copy link
Copy Markdown
Member

Adds the $egMapsLeafletLayerDefinitions setting for custom named Leaflet tile and WMS layers. Each
definition's name becomes a valid value of the layers and overlays parameters — in #display_map /
format=leaflet maps and query result formats alike. Only the definitions a map actually uses are
serialized to the client.

JeroenDeDauw and others added 2 commits July 17, 2026 21:55
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review follow-ups: prototype-safe layerDefinitions lookup in the client,
a docs note that definitions override same-named stock layers and that
attribution is rendered as HTML, and a test pinning the shadowing
serialization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JeroenDeDauw
JeroenDeDauw marked this pull request as ready for review July 18, 2026 21:50
array_merge renumbers integer-like array keys, so a custom Leaflet layer
whose name is purely numeric (e.g. "1904") was silently dropped from the
available-layers whitelist and never rendered. Use the union operator
instead, which preserves such keys while keeping custom names taking
precedence over a same-named stock layer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JeroenDeDauw
JeroenDeDauw merged commit 02dafe6 into master Jul 18, 2026
16 checks passed
@JeroenDeDauw
JeroenDeDauw deleted the leaflet-layer-definitions branch July 18, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant