feat(google-maps): Add support for SuperClusterAlgorithm customized options from @googlemaps/markerclusterer #30466
Labels
area: google-maps
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Feature Description
Hello, I hope this is useful to someone:
I recently started using the angular-google-maps library to draw a Google Map with about 4000 advanced markers.
For this I obviously needed to use the MapMarkerClusterer component, but found it nearly impossible to customize the SuperClusterAlgorithm options, since the library only allows to add a maxZoom parameter if I'm not mistaken.
I tried creating a SuperClusterAlgorithm from @googlemaps/markerclusterer, but got an error that said
For this reason I tried to solve the problem by changing the source code: in the index.d.ts file, I added this import
and commented out the Algorithm_2 interface definition.
After this, I could use the SuperClusterAlgorithm from @googlemaps/markerclusterer with no problems.
I have no idea if this is ok to do nor if it is feasable but wanted to share this with the community, thanks!
Use Case
In my use case I specifically wanted to change the radius parameter of the algorithm. After the fix, I could provide this algorithm object
to the MapMarkerClusterer like this
The text was updated successfully, but these errors were encountered: