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

google.maps.Marker is deprecated warning #3410

Open
gkatsanos opened this issue Feb 18, 2025 · 3 comments
Open

google.maps.Marker is deprecated warning #3410

gkatsanos opened this issue Feb 18, 2025 · 3 comments

Comments

@gkatsanos
Copy link

As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. At this time, google.maps.Marker is not scheduled to be discontinued, but google.maps.marker.AdvancedMarkerElement is recommended over google.maps.Marker. While google.maps.Marker will continue to receive bug fixes for any major regressions, existing bugs in google.maps.Marker will not be addressed. At least 12 months notice will be given before support is discontinued. Please see https://developers.google.com/maps/deprecations for additional details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration for the migration guide.

is there a new version of the library that supports the new gmaps API? (I'm on 2.19.3 )

@AndrijBartenev
Copy link

I updated the library to 2.20.6 but had to create the markers the way Google recommends

new google.maps.marker.AdvancedMarkerElement({
     map,
     position: { lat, lng },
     content
 });

@gkatsanos
Copy link
Author

I updated the library to 2.20.6 but had to create the markers the way Google recommends

new google.maps.marker.AdvancedMarkerElement({
     map,
     position: { lat, lng },
     content
 });

Yeah, I guess that's the workaround for now but pity to be loading the wrapper library and use the native API directly :/

@seyhak
Copy link

seyhak commented Mar 1, 2025

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

3 participants