Open pleary opened 3 months ago
After looking into this there are a few caveats with switching to AdvancedMarkerElement:
Since Marker is just deprecated right now and they haven't scheduled it for being discontinued yet, maybe we hold off on making any changes. That would mean the browser console will continue to show this long deprecation warning for any pages that implement maps with Markers as there doesn't appear to be any official way to suppress it now that we've acknowledged it. It seems like eventually we'll need to do this work, but we'll get 12 months advanced notice. At that time we should do a big map audit since we'll need to adjust some map styles and move management of styles unto Google Cloud Web UIs, update Marker creation, and we may as well attempt to implement full async load of Google Maps which is another deprecation warning we get on pages that haven't implemented that yet.
For now I'll stop work on this task and recommend we pick it up again when we get the 12 month loss of support notice, and we're prepared to do a larger map audit
Google has deprecated
google.maps.Marker
in favor ofgoogle.maps.marker.AdvancedMarkerElement
. There are a few changes we'll need to make to get that working as recommended. See https://developers.google.com/maps/documentation/javascript/advanced-markers/migration for more information.