You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dynamically update attribution based on visible features’ tags #559
As you browse the main map on ohm-website, Leaflet’s attribution control should dynamically update to list the attribution and license tag values of any features currently visible in the current viewport on the current date. This will help to ensure compliance with any attribution requirements of non–public domain content in the database. It would complement any attribution that’s currently stored on the wiki.
The tile server configuration needs to be updated to include the attribution and license keys in feature properties. Then the website’s client-side code could have a hook that queries rendered features1 at the end of a viewport change, deduplicating the features’ attribution and license properties and updating Leaflet’s attribution control.
Footnotes
This is a built-in feature of Mapbox GL JS that works purely client-side, unlike the Query Features tool on the website, which requires an Overpass API call. ↩
Activity
1ec5 commentedon Sep 6, 2026
An example of dynamic attribution when changing the viewport.