mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Duplicate attribution

Open planemad opened this issue 9 years ago • 13 comments

We're having this issue on the Chennai flood map after adding the mapbox.satellite layer.

screenshot 2015-12-05 08 45 39

planemad avatar Dec 05 '15 03:12 planemad

I'm not sure we can fix this automatically — it grabs attribution strings from corresponding TileJSON of both sources, and it's not a 1:1 match. Perhaps we could detect whether one attribution is a substring of another one and then use the bigger one.

mourner avatar Dec 08 '15 00:12 mourner

We're due for an overhaul of our attribution system #1485. Perhaps we could support a per-source attribution syntax like

attribution: ["© Mapbox", "© OpenStreetMap", "© Digital Globe"]

So that we can better merge and dedupe strings

lucaswoj avatar Dec 08 '15 00:12 lucaswoj

@lucaswoj but that would require changing the TileJSON spec and propagating that change through our whole stack, right? Substring matching may be good enough of a hack for now.

mourner avatar Dec 08 '15 00:12 mourner

Right. Substring matching sounds like a better short-term solution.

lucaswoj avatar Dec 08 '15 01:12 lucaswoj

See also #1752.

jfirebaugh avatar Dec 08 '15 01:12 jfirebaugh

This was partially addressed by https://github.com/mapbox/mapbox-gl-js/commit/d7dacd63937b0429df46b8279a75090727501efd and I have not heard any reqests for refinements since.

Related to #1485

lucaswoj avatar Jul 29 '16 14:07 lucaswoj

A more structured attribution syntax like the one described in https://github.com/mapbox/mapbox-gl-js/issues/1804#issuecomment-162717387 is being tracked in mapbox/tilejson-spec/issues/20.

1ec5 avatar Aug 14 '16 05:08 1ec5

This is still affecting some maps.

SnailBones avatar Sep 20 '22 16:09 SnailBones