[openstreetmap/openstreetmap-website] Fix vector tile attribution issues (PR #6236)

Tom Hughes notifications at github.com
Wed Jul 23 21:41:16 UTC 2025


This hopefully fixes the vector tile attribution issues.

The second part is somewhat gross but hard to avoid until we can get leaflet-maplibre-gl fixed because it registers a load callback on the underling GL map that will call `getAttribution` and add the result to the attribution control and then never remove it again.

To avoid that we temporarily replace `getAttribution` with a dummy version that it will capture for it's callback...
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6236

-- Commit Summary --

  * Force vector layers to use our custom attribution
  * Hide getAttribution function from leaflet-maplibre-gl

-- File Changes --

    M app/assets/javascripts/leaflet.maptiler.js (8)
    M app/assets/javascripts/leaflet.shortbread.js (8)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6236.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6236.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/6236 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250723/9bad3d24/attachment-0001.htm>


More information about the rails-dev mailing list