Currently, I am utilizing the Google Maps Angular library available at: https://github.com/nlaplante/angular-google-maps
In an attempt to implement a "Toggle Clusters" functionality alongside my existing clustering code, here's what I have:
<google-map
center="map.center"
zoom="map.zoom"
draggable="true"
events="mapEventObject"
control="googleMap">
<markers
models="markers" coords="'coord'"
doCluster="map.cluster"
clusterEvents="map.clusterEvents"
events="markerEventObject">
</markers>
$scope.markers = [{
coord: {
latitude: -38,
longitude: 50
}
}]
The challenge lies in the fact that $scope.markers is an array and not the actual MarkerClusterer Object. Consequently, I am unable to trigger the .removeMarkers() method for the desired "toggling" effect.
My query pertains to utilizing Angular in order to access the MarkerClusterer objects on the map. Unfortunately, I have been unsuccessful in locating a .getAllClusters() method or anything similar!