You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of February 21st, 2024 (v3.56), google.maps.Marker is deprecated.
In the F12 developer console, the following waring is displayed:
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.
Add code to import the marker library. Note that the previous version of markers (google.maps.Marker) does not have this requirement.
Change google.maps.Marker to google.maps.marker.AdvancedMarkerElement
Add a map ID to your map initialization code. For example mapId: 'DEMO_MAP_ID' for testing purposes if you don't have a map ID already.
Step 1 can be satisfied by adding &libraries=marker to the script loading tag.
Step 2 requires changing google.maps.Marker to google.maps.marker.AdvancedMarkerElement and updating a lot of other options. It doesn't seem to be a simple class change as visible & icon arguments are supported in this new class. draggable is now gmpDraggable and there's lots of other changes too.
Step 3 requires using an ID when initializing the map. I included this by adding this default option to $.fn.locationpicker.defaults
As of February 21st, 2024 (v3.56),
google.maps.Marker
is deprecated.In the F12 developer console, the following waring is displayed:
google.maps.Marker
togoogle.maps.marker.AdvancedMarkerElement
mapId: 'DEMO_MAP_ID'
for testing purposes if you don't have a map ID already.Step 1 can be satisfied by adding
&libraries=marker
to the script loading tag.Step 2 requires changing
google.maps.Marker
togoogle.maps.marker.AdvancedMarkerElement
and updating a lot of other options. It doesn't seem to be a simple class change asvisible
&icon
arguments are supported in this new class.draggable
is nowgmpDraggable
and there's lots of other changes too.Step 3 requires using an ID when initializing the map. I included this by adding this default option to
$.fn.locationpicker.defaults
and then setting it when configuring the
gmapContext
variableBut there's a lot of other updates that will need to be made too. :(
More information regarding this deprecation is available at:
The text was updated successfully, but these errors were encountered: