Skip to content
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

Open
planemad opened this issue Dec 5, 2015 · 12 comments
Open

Duplicate attribution #1804

planemad opened this issue Dec 5, 2015 · 12 comments

Comments

@planemad
Copy link

planemad commented Dec 5, 2015

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

screenshot 2015-12-05 08 45 39

@mourner
Copy link
Member

mourner commented Dec 8, 2015

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.

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 8, 2015

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

@mourner
Copy link
Member

mourner commented Dec 8, 2015

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

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 8, 2015

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

@jfirebaugh
Copy link
Contributor

See also #1752.

@lucaswoj
Copy link
Contributor

This was partially addressed by d7dacd6 and I have not heard any reqests for refinements since.

Related to #1485

@1ec5
Copy link
Contributor

1ec5 commented Aug 14, 2016

A more structured attribution syntax like the one described in #1804 (comment) is being tracked in mapbox/tilejson-spec/issues/20.

@SnailBones
Copy link
Contributor

This is still affecting some maps.

@SnailBones SnailBones reopened this Sep 20, 2022
@ygoe
Copy link

ygoe commented Aug 9, 2024

I see this all the time here. Is there something I can do in my code?

@romankaravia
Copy link

romankaravia commented Aug 12, 2024

Looks like this is currently happening with Light, Dark, Streets, and Outdoors styles, also on https://mapbox.com, see e.g. Light style preview:

image

However, this seems to be a backend issue, e.g. the Light style internally depends on multiple sources, which are loaded from https://api.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2.json?secure&access_token={access_token}, which returns a style document that starts as follows:

{
  "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:

image

=> 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).

@mhemmings
Copy link

mhemmings commented Sep 2, 2024

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?

@mourner
Copy link
Member

mourner commented Sep 3, 2024

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

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

No branches or pull requests

9 participants