Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
reduce span of touch regions
Browse files Browse the repository at this point in the history
  • Loading branch information
incanus committed Mar 25, 2015
1 parent 1f3d813 commit 0dbed13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/ios/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,8 @@ - (void)handleSingleTapGesture:(UITapGestureRecognizer *)singleTap
CGPoint tapPoint = [singleTap locationInView:self];

// tolerances based on touch size & typical marker aspect ratio
CGFloat toleranceWidth = 50;
CGFloat toleranceHeight = 75;
CGFloat toleranceWidth = 40;
CGFloat toleranceHeight = 60;

// setup a recognition area weighted 2/3 of the way above the point to account for average marker imagery
CGRect tapRect = CGRectMake(tapPoint.x - toleranceWidth / 2, tapPoint.y - 2 * toleranceHeight / 3, toleranceWidth, toleranceHeight);
Expand Down

0 comments on commit 0dbed13

Please sign in to comment.