google.maps.Marker is deprecated

Created on 26 February 2024, 10 months ago
Updated 14 September 2024, 3 months ago

Problem/Motivation

If you are using common maps view with Google map that has "markers", now it shows a Google Maps API deprecation warning:

As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. Please see https://developers.google.com/maps/deprecations for deprecation details.

Steps to reproduce

common maps view with Google map that has "markers". Inspect with developer tool and check the console warnings.

Proposed resolution

As instructed by Google Maps API, replace google.maps.Marker with Advanced Markers (google.maps.marker.AdvancedMarkerElement). The google.maps.Marker is considered to be deprecated in Google Maps Javascript API v3.56+.

Note that there's another report of same issue in a different module: #3291561: google.maps.event.addDomListener() is deprecated . However, the solution there is not acceptable - it simply fix Google Maps Javascript API version at 3.55, It might work for now for surpressing the warning, but eventually the code will break (maybe in 1 year).

Remaining tasks

Change the code where it uses google.maps.Marker.

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

4.0

Component

GoogleMapsAPI

Created by

🇨🇦Canada yang_yi_cn

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024