Skip to content

Dynamically update attribution based on visible features’ tags #559

Description

@1ec5

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

  1. 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

  1. added theissue type on Mar 16, 2025
  2. 1ec5 commented on Sep 6, 2026

    @1ec5
    MemberAuthor

    An example of dynamic attribution when changing the viewport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions