Skip to content

bug(google-maps): google.maps.Marker is deprecated #28774

Closed
@andro-bulj

Description

@andro-bulj

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Deprecation warning shows when using @angular/google-maps.

As soon as map-marker component is loaded in app the warning is shown in console.
image

According to google google.maps.Marker is now legacy and google.maps.marker.AdvancedMarkerElement should be used instead.

In the code for example map-marker.ts we can see that the legacy code is being used.

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.

Reproduction

Steps to reproduce:

  1. git grep google.maps.Marker

Expected Behavior

To use google.maps.marker.AdvancedMarkerElement instead of google.maps.Marker

Actual Behavior

google.maps.Marker is used in map-marker.ts and deprecated warning is shown in console.

Environment

  • Angular: 17.3.0
  • CDK/Material: 13.3.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Package Version
Angular CLI: 17.3.0
Node: 20.11.1
Package Manager: npm 10.2.4
OS: win32 x64

Angular: 17.3.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

Angular CLI: 17.3.0
Node: 20.11.1
Package Manager: npm 10.2.4
OS: win32 x64

Angular: 17.3.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

@angular-devkit/architect 0.1703.0
@angular-devkit/build-angular 17.3.0
@angular-devkit/core 17.3.0
@angular-devkit/schematics 17.3.0
@angular/cdk 17.3.1
@angular/google-maps 17.3.1
@schematics/angular 17.3.0
rxjs 7.8.1
typescript 5.3.3
zone.js 0.14.4
@types/google.maps 3.55.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions