Skip to content

bug(google-maps): Warning in Console about adding Event-Listener for click instead of gmp-click #30599

Open
@phrei

Description

@phrei

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

I'm getting the following warning in console when I use @angular/google-maps@19.2.2:

<gmp-advanced-marker>: Please use addEventListener('gmp-click', ...) instead of addEventListener('click', ...).

Would this mean the following code should be changed to gmp-click as suggested in the warning?

this._eventManager.getLazyEmitter<google.maps.MapMouseEvent>('click');

Reproduction

Create a project that uses the (mapClick)-Output on a <map-advanced-marker>

Expected Behavior

No warning in console.

Actual Behavior

Warning in console.

Environment

  • Angular: 19.2.1
  • CDK/Material: 19.2.2
  • Google-Maps: 19.2.2
  • Browser(s): Chrome
  • Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: google-maps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions