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

Feature - AdvancedMarkerClickEvent #353

Open
JorgeBlasco opened this issue Aug 16, 2024 · 2 comments
Open

Feature - AdvancedMarkerClickEvent #353

JorgeBlasco opened this issue Aug 16, 2024 · 2 comments

Comments

@JorgeBlasco
Copy link

This is something still in beta, but since Marker is deprecated in favor of AdvancedMarkerElement, I guess they will keep adding stuff to this class, so It makes sense to create this new event class.

As of today, we only have a few events for AdvancedMarkerElement compared to Marker events.

Some of the Marker and AdvancedMarkerElement click events use the "MapMouseEvent" class, but the new event "gmp-click" uses AdvancedMarkerClickEvent which includes the marker's position.

Offtopic: What I am trying to achieve is detecting an AdvancedMarkerElement "contextmenu" event, but this is not currently supported.

@valentasm1
Copy link
Collaborator

I already tried gpm-click event, but couldnt find easy solution. So far click works well even show warning in console.
Despite all i agree that gpm-click should be supported. When i will find some free time will jump to that.

Offtopic. I dont use this library. I couldnt suggest solution. You could check for profiles from pull requests. I think these guys for sure use it in daily basis.

@valentasm1
Copy link
Collaborator

I have no idea why event.target return null. tryParseJson function ~73 line. Even tho click event return position. Maybe try find element id and select position from html element itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants