Description:
This library currently uses the google.maps.Marker class to implement marker functionality. However, as of February 21st, 2024, google.maps.Marker is marked as deprecated. When using this library, a console warning appears in the browser stating:
As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead.
This deprecation notice suggests that the library needs to transition to using the new google.maps.marker.AdvancedMarkerElement to ensure future compatibility with the Google Maps JavaScript API.
Steps to Reproduce:
- Use the
js-markerwithlabel library in a project.
- Open the browser console when the map and markers are rendered.
- Observe the deprecation warning related to
google.maps.Marker.
Proposed Solution:
Update the library to replace usages of google.maps.Marker with google.maps.marker.AdvancedMarkerElement. This update may require additional adjustments to account for differences in behavior and API between the two marker implementations.
This will be a breaking change since the new google.maps.marker.AdvancedMarkerElement does not put almost any methods on the returned marker object compared with the legacy marker (eg all of the get and set methods).
Additional Information:
Updating this library will prevent issues with breaking changes in the Google Maps JavaScript API after the deprecation deadline and maintain compatibility for users of js-markerwithlabel.
Description:
This library currently uses the
google.maps.Markerclass to implement marker functionality. However, as of February 21st, 2024,google.maps.Markeris marked as deprecated. When using this library, a console warning appears in the browser stating:This deprecation notice suggests that the library needs to transition to using the new
google.maps.marker.AdvancedMarkerElementto ensure future compatibility with the Google Maps JavaScript API.Steps to Reproduce:
js-markerwithlabellibrary in a project.google.maps.Marker.Proposed Solution:
Update the library to replace usages of
google.maps.Markerwithgoogle.maps.marker.AdvancedMarkerElement. This update may require additional adjustments to account for differences in behavior and API between the two marker implementations.This will be a breaking change since the new
google.maps.marker.AdvancedMarkerElementdoes not put almost any methods on the returned marker object compared with the legacy marker (eg all of the get and set methods).Additional Information:
Updating this library will prevent issues with breaking changes in the Google Maps JavaScript API after the deprecation deadline and maintain compatibility for users of
js-markerwithlabel.