Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google maps warns about using click instead of gmp-click event. #611

Closed
coder6652 opened this issue May 11, 2023 · 5 comments · Fixed by #954
Closed

Google maps warns about using click instead of gmp-click event. #611

coder6652 opened this issue May 11, 2023 · 5 comments · Fixed by #954
Assignees
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@coder6652
Copy link

This is the error in the browser console from google maps.

    addListener(a, b) {
        "click" === a && console.warn(`<${this.localName}>: ${"Please use addEventListener('gmp-click', ...) instead of addListener('click', ...)."}`);
        return _.K(this, a, b)
    }

I
I am not getting this error when not using the marker clusterer.

@coder6652 coder6652 added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 11, 2023
@wangela
Copy link
Member

wangela commented May 11, 2023

If you would like to upvote the priority of this issue, please comment below or react with 👍 so we can see what is popular when we triage.

@coder6652 Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@coder6652 coder6652 changed the title Google maps warns about using gmp-click instead of click event. Google maps warns about using click instead of gmp-click event. May 11, 2023
@amuramoto
Copy link
Member

Which version of the markerclusterer are you seeing this in?

@coder6652
Copy link
Author

coder6652 commented May 12, 2023 via email

@vicb
Copy link
Contributor

vicb commented May 21, 2023

I am seeing this with 2.1.3 as well but the it looks like the pb is rather the JS maps API:

Looking at the docs for gmp-click:

Notice: Available only in the v=beta channel.

@jeantimex is gmp-click something we can feature detect? If not it might be a little bit of a pain because our choices would be:

a) use click and get the warnings and it might stop at working at some point
b) use gmp-click and it will not work on the weekly channel and with older (i.e. fixed) versions of the API.

What are your thoughts here?

@vicb
Copy link
Contributor

vicb commented Jun 13, 2023

I don't think there is anything to do here while gmp-click is only in the beta version.

Once/If it makes its way into the weekly channel we should feature detect the way to add click listeners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants