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

Fix tap on polyline #2847

Open
wants to merge 8 commits into
base: multiple_maps
Choose a base branch
from

Conversation

boblepepeur
Copy link

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.

@@ -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];
Copy link
Member

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.

Copy link
Author

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

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

Successfully merging this pull request may close these issues.

None yet

2 participants