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

Old markers don't disappear when my v-for list changes #31

Closed
Evertt opened this issue Oct 21, 2019 · 4 comments · Fixed by #32
Closed

Old markers don't disappear when my v-for list changes #31

Evertt opened this issue Oct 21, 2019 · 4 comments · Fixed by #32

Comments

@Evertt
Copy link
Contributor

Evertt commented Oct 21, 2019

The title says it all. I have a bunch of markers that I render using v-for="marker in markers" where markers is a computed property.

Whenever the computed property changes, the old markers don't disappear. Only new markers are added, which is not how it should be. This did work properly when I was still using the original gmap-marker.

After further debugging I see it has to do with gmap-cluster. When I don't use gmap-cluster anymore then it works as expected. But according to the readme, these custom markers should also work with gmap-cluster right?

@eregnier
Copy link
Owner

Hey,
Yes, the custom markers work with cluster.
I have to test to reproduce your issue to find out a solution.

@Evertt
Copy link
Contributor Author

Evertt commented Oct 23, 2019

If you look at my PR, it already gives a partial solution to the problem. Though it doesn't solve it completely yet, it's still buggy.

@amineyarman
Copy link

I ran into a similar issue.I display or hide markers depending on whether they are within the map bounds.
What happens is: Let's assume we have a cluster of 4 markers. I move the map and 2 of them disappear from the bounds. Then I come back to have them all in the bounds and go in a cluster view, then the cluster displays 6 markers.
@Evertt Your solution solves the problem somehow.

@eregnier
Copy link
Owner

Ok then, I merge your work Evertt and do a release. I will investigate to find out how to completely fix the problem.

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

Successfully merging a pull request may close this issue.

3 participants