mapbox-gl-js
mapbox-gl-js copied to clipboard
Duplicate attribution
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.
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 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.
Right. Substring matching sounds like a better short-term solution.
See also #1752.
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
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.
This is still affecting some maps.