rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
331 stars 105 forks source link

Migration to advanced markers (google.maps.Marker will be deprecated) #385

Open rs2pt opened 2 hours ago

rs2pt commented 2 hours ago

First of all, great work :-) It's really useful to have a Blazor interop for Google Maps. Although this isn't really an issue, I wanted to ask if there are any plans to update it in future to use the new Markers.

I get on my browser console: "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."

valentasm1 commented 2 hours ago

I think you need AdvancedMarkerElement. There are plenty of demos. https://github.com/rungwiroon/BlazorGoogleMaps/blob/master/ServerSideDemo/Pages/MapAdvancedMarkerViewPage.razor