-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate attribution #1804
Comments
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
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. |
* Dedupe attributions that are substrings of others Refs #1804 * Sort attributions only by length, add test
A more structured attribution syntax like the one described in #1804 (comment) is being tracked in mapbox/tilejson-spec/issues/20. |
This is still affecting some maps. |
I see this all the time here. Is there something I can do in my code? |
Looks like this is currently happening with Light, Dark, Streets, and Outdoors styles, also on https://mapbox.com, see e.g. Light style preview: However, this seems to be a backend issue, e.g. the Light style internally depends on multiple sources, which are loaded from {
"attribution": "\u003Ca href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\" title=\"Mapbox\" aria-label=\"Mapbox\"\u003E© Mapbox\u003C/a\u003E \u003Ca href=\"https://www.openstreetmap.org/about/\" target=\"_blank\" title=\"OpenStreetMap\" aria-label=\"OpenStreetMap\"\u003E© OpenStreetMap\u003C/a\u003E \u003Ca href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\" title=\"Mapbox\" aria-label=\"Mapbox\"\u003E© Mapbox\u003C/a\u003E \u003Ca href=\"https://www.openstreetmap.org/about/\" target=\"_blank\" title=\"OpenStreetMap\" aria-label=\"OpenStreetMap\"\u003E© OpenStreetMap\u003C/a\u003E \u003Ca class=\"mapbox-improve-map\" href=\"https://www.mapbox.com/contribute/\" target=\"_blank\" title=\"Improve this map\" aria-label=\"Improve this map\"\u003EImprove this map\u003C/a\u003E",
"bounds": [-180, -85, 180, 85],
"center": [0, 0, 0], Highlight of the link to Mapbox being duplicated in the above attribution string: => I'm just commenting this here to say that it looks like this is likely not an issue with mapbox-gl-js, if anyone feels like it, you could try reporting this somewhere else at Mapbox (probably customer support, or your backend colleagues, in case you work at Mapbox). |
We've also started seeing this a lot in the last few weeks. And it's very inconsistent, can go hours/days without seeing it and then it'll happen again. Assume a backend change somewhere has caused it? |
@mhemmings yes, you might be seeing remnants of cached responses after the glitch was introduced on the API side (and later fixed). Whenever you see it again, please report the specific cases so that we can investigate. |
We're having this issue on the Chennai flood map after adding the
mapbox.satellite
layer.The text was updated successfully, but these errors were encountered: