I'm using AdvancedMarkerElements together with MarkerClusterer to display approximately 75 business locations on a map. Users can filter business locations by service type and state, and markers that do not meet filter conditions should be hidden.
To hide markers, I'm setting marker.map = null, as per the documentation. This works fine when displaying markers without a MarkerClusterer. However, with a MarkerClusterer the markers are initially hidden but reappear when the user scrolls or zooms the map.
I'm using Maps API version 3.60.1.
Steps to reproduce
- See example code at https://jsfiddle.net/asthmaticcanary/u6qo31ds/24/
- Add valid API key.
- Click button to hide some markers by setting marker.map = null.
- Scroll or zoom map and note that hidden markers reappear.
This is possibly related to #867 but I think is a unique issue as it impacts basic location filtering functionality.
I'm using AdvancedMarkerElements together with MarkerClusterer to display approximately 75 business locations on a map. Users can filter business locations by service type and state, and markers that do not meet filter conditions should be hidden.
To hide markers, I'm setting marker.map = null, as per the documentation. This works fine when displaying markers without a MarkerClusterer. However, with a MarkerClusterer the markers are initially hidden but reappear when the user scrolls or zooms the map.
I'm using Maps API version 3.60.1.
Steps to reproduce
This is possibly related to #867 but I think is a unique issue as it impacts basic location filtering functionality.