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

Switching source url doesn't behave correctly #386

Open
htrandev172 opened this issue Oct 8, 2024 · 0 comments
Open

Switching source url doesn't behave correctly #386

htrandev172 opened this issue Oct 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@htrandev172
Copy link

htrandev172 commented Oct 8, 2024

Describe the bug
https://stackblitz.com/edit/vue3-openlayers-template-q76erp?file=src/components/TheMap.vue,src/App.vue
Same behavior can be observed here: https://vue3openlayers.netlify.app/componentsguide/sources/xyz/

Please have a look at this demo using the latest version. When switching map url (using a computed property), it looks like the source does not clean up properly. If you click the Switch button on the demo, then try zoom in / out, you will see the previous map still flashing.

I suspect it has something to do with reusing the source on useSource.ts file in the recent version (I tested v10, v11). I switched to version 8 and this bug didn't happen.

Affected version(s)

Please run npm list --depth=0 vue vue3-openlayers ol ol-ext ol-contextmenu and paste the output below:

Thanks. Please let me know if I can help with anything.

@htrandev172 htrandev172 added the bug Something isn't working label Oct 8, 2024
@htrandev172 htrandev172 reopened this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant