How to keep just one specific marker from a markercluster?
-
05-03-2021 - |
Question
I have a markercluster.
I have a listener for every marker in it.
When I click on it, I go into its listener routine.
Now how do I keep this marker and remove all others from the cluster?
I did this but it somehow doesnt work
temp.push(this);
markerCluster_new.addMarkers(temp);
markerCluster_old.clearMarkers();
Solution
- Remove all the markers
- Reinsert the one you want to keep
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow