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

Wrong attribution link after switching map layer #2599

Open
giobiondani opened this issue Apr 18, 2024 · 2 comments
Open

Wrong attribution link after switching map layer #2599

giobiondani opened this issue Apr 18, 2024 · 2 comments

Comments

@giobiondani
Copy link

I am building an app where the user can change the map type, for example switching from the Bing Aerial to the OSM.
The map control has 2 layers: the map and a GPS track.

When the user wants to switch map type, I remove the old map layer and replace it with the new one.
The new layer may have a different attribution text and URL.

So this is what happens:

  • open the control with Bing Aerial; the attribution is Microsoft; clicking on it opens the Microsoft website
  • switch to the OSM map; the attribution is OSM; clicking on it still opens the Microsoft website

I debugged the code and I see that when the layer is replaced, both the text and the URL of the attribution are correct, so I have no idea where the issue is coming from.
Is there maybe some sort of caching that I should take into account?

@pauldendulk
Copy link
Member

Thanks for the report. This is something we need to try to reproduce in a sample.

@giobiondani
Copy link
Author

Thank you for the response. I can try to reproduce in a sample but I never installed them so I may not get to it very quickly.
I also decided to handle the attributions in a different way because I realized the Stadia and Thunderforest require multiple separate URL links in the same attribution and as far as I can tell I can't do that with the standard Attribution object.

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

2 participants