Skip to content
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

Icons for markers instead of images? #295

Open
sm-mdp opened this issue Jul 18, 2023 · 2 comments
Open

Icons for markers instead of images? #295

sm-mdp opened this issue Jul 18, 2023 · 2 comments

Comments

@sm-mdp
Copy link

sm-mdp commented Jul 18, 2023

For markers, Is there a way to specify an icon to use instead of an image link? I'd like to try to use <span class="material-icons">location_on</span> instead of an image URL, but I'm not sure the best way to go about doing that.

Thanks,
Sharon

@bjorn2404
Copy link
Owner

@sm-mdp the callbackCreateMarker callback allows you to completely override the Google Maps marker with whatever you want, including the icon. Information on how to add a symbol to a marker is in the Google Maps docs at: https://developers.google.com/maps/documentation/javascript/symbols

Specifically the svgMarker in that example and passing that through to the new google.maps.Marker call.

@sm-mdp
Copy link
Author

sm-mdp commented Jul 26, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants