Evelyn Zouras
Evelyn Zouras

Reputation: 103

Can't find a compatible marker cluster library to use with @Angular/google-maps; @types/googlemaps and @types/google.maps are incompatible

1/ Im using angular version 10
2/ I'm using the "GoogleMap" component shown here:
https://github.com/angular/components/blob/main/src/google-maps/google-map/README.md
3/ the "GoogleMap" component wraps the google.maps.Map class from the Google Maps JavaScript API. it installs @types/googlemaps
4/ The Google maps JS API suggests using the @googlemaps/markerclusterer library for marker clustering.
https://developers.google.com/maps/documentation/javascript/marker-clustering
5/ the markerclusterer library needs the @types/google.maps installed
https://www.npmjs.com/package/@googlemaps/markerclusterer
6/ @types/googlemaps installed in #3 is incompatible with @types/google.maps in #5

Is there a markercluster library that someone can suggest that doesn't need @types/google.maps? Or perhaps A different way to go about this whole thing?

Upvotes: 0

Views: 653

Answers (1)

Pandika Pinata
Pandika Pinata

Reputation: 11

I have a similar issue with yours, try to install @angular/[email protected] but that package for marker-clusterer seems have bug/deprecated, I use that version and brings me warning messages in the browser said google.maps.event.addDomListener() is deprecated

Someone has raised issue for that but I didn't see how to fix that issue https://github.com/angular/components/issues/25255

Upvotes: 1

Related Questions