-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(google-maps): add advanced marker #28525
Conversation
33c1a6e
to
f0c7fa8
Compare
Before I can land the change you also have to run |
This commit introduces the advanced-marker feature to the map package, enabling users to add custom, interactive markers to their maps. Related angular#25897
… description property for advanced markers
f0c7fa8
to
8ac5ea0
Compare
advancedMarker.gmpDraggable = _draggable; | ||
} | ||
|
||
if (changes['content']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is here a second time... It should be removed
Any ETA when we can see this released as part of @angular/google-maps? |
Sorry in advance if this isn't the place to put this, but wanted to give some feedback / raise some questions: I've been playing with the 17.3.0-next.0 pre-release to use the advanced markers and noticed 2 things: First isn't related to the angular component implementation but advanced markers themselves. I had to create a map Id in google cloud console to display the advanced markers for some reason. I have a feature to 'toggle' visibility of points-of-interests via the map options.styles but since I'm using mapId I get an error saying I can only change style via cloud. I made a new style and mapId and try to change map Id's as a workaround but I got the same 'can't change style if using map Id' error... The google map component has an option for setting mapId programmatically, so you'd think you'd be able to change it? My understanding is I have to choose between dynamically styling maps and displaying advanced markers. Second thing is when I create advanced markers sequentially inside a component which gets access to AdvancedMarkerElement via ViewChild, the first marker fires off ngAfterViewInit and then the EventEmitter markerInitialized is fired. Subsequent markers flips execution order. To access this.marker.AdvancedMarker,I have to put the code both in the handler for markerInitialized and ngAfterViewInit since sometimes they exist in one only or the other. Not sure if this is expected behavior. |
Hi i tried advanced marker in marker-clusterer, it doesn't work, but works in
|
Ok I've found an issue under the hood we use https://www.npmjs.com/package/@googlemaps/markerclustererplus which is deprecated and in my opinion we have to rewrite the MapMarkerClusterer component from scratch and align to this library https://www.npmjs.com/package/@googlemaps/markerclusterer which is recommended. @crisbeto it is up to you I can take care of this |
I've had a PR for the alternate clusterer for a while (#24853), but it's unclear how we can roll it out given that the API is completely different. We might just have to maintain two clusterers. |
Indeed, it seems prudent to maintain two clusters, designating one as deprecated. The same situation is with google.maps.Marker |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit introduces the advanced-marker feature to the map package, enabling users to add custom, interactive markers to their maps.
Related #25897