-
Notifications
You must be signed in to change notification settings - Fork 917
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
Fix tap on polyline #2847
base: multiple_maps
Are you sure you want to change the base?
Fix tap on polyline #2847
Conversation
Probably the bug of the Google Maps SDK for Android v3 beta
@@ -102,12 +102,12 @@ -(void)create:(CDVInvokedUrlCommand *)command | |||
|
|||
// Since this plugin provide own click detection, | |||
// disable default clickable feature. | |||
polyline.tappable = NO; | |||
polyline.tappable = [[json valueForKey:@"clickable"] boolValue]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. If you set polyline.tappable = YES
, this plugin can not get clicked latlng.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, but the code to try to find if the click is on the polyline don't work see my git project example in #2845
According to my issue -> #2845
I use the lib & possibility of google map sdk native plugin on ios.
When you have a lot of polylines in your map, the previous fonctionnality of this cordova plugin to try to calculate if click is on polyline don't work, so i use the native default functionnality with didtabOverlay event.
The only default of my solution is that i cannot find the position clicked by user, the google map sdk plugin don't give the position clicked. So i return the center of the clicked polyline.