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

I can not click the google maps own markers #70

Open
ruslanmusayevsombra opened this issue Sep 7, 2020 · 4 comments
Open

I can not click the google maps own markers #70

ruslanmusayevsombra opened this issue Sep 7, 2020 · 4 comments

Comments

@ruslanmusayevsombra
Copy link

While I'm using MeasureTool, it's disabling clicking on map location markers.
Even on your demo page it's disabled.
May I enable clicks somehow ?

Image attached (As You see, cursor showing that I can't click it)
Screenshot from 2020-09-07 14-58-33

@zhenyanghua
Copy link
Owner

This is the existing limitation. To walk around, you could try conditionally initializing this tool.

@zhenyanghua
Copy link
Owner

@ruslanmusayevsombra please let me know if this issue is resolved.

@bearcy
Copy link

bearcy commented Mar 17, 2022

Is this solved? @zhenyanghua what do you mean by conditionally initializing this tool?

@bearcy
Copy link

bearcy commented Mar 17, 2022

I solved this by changing the markers click event:
var marker1 = new google.maps.Marker({ position: {lat: 47.6808867, lng: 17.6447587}, map: map, label: "1" }); marker1.addListener('click', function(mouseEvent) { if (measureTool._started) { measureTool._checkClick(mouseEvent); } else { alert("Marker 1 has been clicked"); } });

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

No branches or pull requests

3 participants