-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Add input to control map marker icon #22097
Comments
It's because you have to provide a new That being said, I think that it makes sense to control the icon independently from the |
Currently the only way to control the icon of a marker is through the `options` object which can be cumbersome. These changes add a dedicated `icon` input which can be used to only change the icon. Fixes angular#22097.
Currently the only way to control the icon of a marker is through the `options` object which can be cumbersome. These changes add a dedicated `icon` input which can be used to only change the icon. Fixes angular#22097.
Currently the only way to control the icon of a marker is through the `options` object which can be cumbersome. These changes add a dedicated `icon` input which can be used to only change the icon. Fixes #22097.
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. |
I am struggling to find a way to update the MapMarker icon using @angular/google-maps.
Here is a Stackblits example of what I am trying to do:
Link to stackblits
So every 3 seconds I would like to change the marker to either green or blue, this is just simulating a real world scenario.
The documentation states that MapMarker component wraps the google.maps.Marker class, so I should be able to use the .setIcon() method, but I am unsure of how to access the google.maps.Marker class in this case.
In this issue: #21068
The response comments notes that in this case I should not have to create the google.Maps.Marker object which makes sense, but when I change the MapMarker object inside my markers array I also get no change.
Does anyone have any experience with this that could share a solution or point me in the right direction?
The text was updated successfully, but these errors were encountered: