rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
309 stars 99 forks source link

Advanced Marker Support #327

Closed marco-manfroni closed 1 month ago

marco-manfroni commented 2 months ago

Hi, I use this awesome library for most of my projects and I would like to thank you for continuing to develope it. I've just seen a message in the browser console that says:

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.

Will you add (when? 😊) support to this new marker that google says it's "can load up to 66% faster than our traditional markers, and provide faster panning and zooming. 1 The feature also supports fast load times for a larger amount of markers"

BR Marco

valentasm1 commented 2 months ago

It exist already AdvancedMarkerView. I have no idea why we named it "AdvancedMarkerView" not "AdvancedMarker". Probably need to rename in future release.

https://github.com/rungwiroon/BlazorGoogleMaps/blob/master/ServerSideDemo/Pages/AdvancedMarkerViewPage.razor

marco-manfroni commented 2 months ago

I dont think it's the same. Advanced Marker uses the class google.maps.marker.AdvancedMarkerElement https://developers.google.com/maps/documentation/javascript/reference/advanced-markers?hl=it , while looking at the code inside github AdvancedMarkerView uses google.maps.marker.AdvancedMarkerView

Screenshot 2024-05-14 164336

I think it's another google component. I didn't find a reference to it inside all this project

valentasm1 commented 2 months ago

I was lost for a moment AdvancedMarkerElement class (originally named AdvancedMarkerView in the beta channel) is now a subclass of HTMLElement. Based on this stack issue. I dont find same info at google reference but i assume it exist somewhere. I think they just renamed it in documentation :). https://stackoverflow.com/questions/76009362/advancedmarkerview-extends-throw-an-error-typeerror-illegal-constructor I think we need to rename it too.

valentasm1 commented 1 month ago

Renamed https://github.com/rungwiroon/BlazorGoogleMaps/releases/tag/4.4.0