jpsim / jpsim/JPSThumbnailAnnotation
Overlapping annotations and touch propagation
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 474
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
When annotations overlap, the touch events on the top most annotation gets sent to the underlying annotations so it is sometimes impossible to select an annotation to expand and shrink or even use the disclosure button without triggering the annotation(s) underneath.
Have you encountered this?

Code to reproduce
- (NSArray *)annotations {
// Empire State Building
JPSThumbnail *empire = [[JPSThumbnail alloc] init];
empire.image = [UIImage imageNamed:@"empire.jpg"];
empire.title = @"Empire State Building";
empire.subtitle = @"NYC Landmark";
empire.coordinate = CLLocationCoordinate2DMake(40.75f, -73.99f);
empire.disclosureBlock = ^{ NSLog(@"selected Empire"); };
// Apple HQ
JPSThumbnail *apple = [[JPSThumbnail alloc] init];
apple.image = [UIImage imageNamed:@"apple.jpg"];
apple.title = @"Apple HQ 1";
apple.subtitle = @"Apple Headquarters 1";
apple.coordinate = CLLocationCoordinate2DMake(37.33f, -122.03f);
apple.disclosureBlock = ^{ NSLog(@"selected Appple"); };
JPSThumbnail *apple2 = [[JPSThumbnail alloc] init];
apple2.image = [UIImage imageNamed:@"apple.jpg"];
apple2.title = @"Apple HQ 2";
apple2.subtitle = @"Apple Headquarters 2";
apple2.coordinate = CLLocationCoordinate2DMake(37.34f, -123.03f);
apple2.disclosureBlock = ^{ NSLog(@"selected Appple 2"); };
JPSThumbnail *apple3 = [[JPSThumbnail alloc] init];
apple3.image = [UIImage imageNamed:@"apple.jpg"];
apple3.title = @"Apple HQ 3";
apple3.subtitle = @"Apple Headquarters 3";
apple3.coordinate = CLLocationCoordinate2DMake(37.35f, -113.03f);
apple3.disclosureBlock = ^{ NSLog(@"selected Appple 3"); };
// Parliament of Canada
JPSThumbnail *ottawa = [[JPSThumbnail alloc] init];
ottawa.image = [UIImage imageNamed:@"ottawa.jpg"];
ottawa.title = @"Parliament of Canada";
ottawa.subtitle = @"Oh Canada!";
ottawa.coordinate = CLLocationCoordinate2DMake(45.43f, -75.70f);
ottawa.disclosureBlock = ^{ NSLog(@"selected Ottawa"); };
return @[[JPSThumbnailAnnotation annotationWithThumbnail:empire],
[JPSThumbnailAnnotation annotationWithThumbnail:apple],
[JPSThumbnailAnnotation annotationWithThumbnail:apple2],
[JPSThumbnailAnnotation annotationWithThumbnail:apple3],
[JPSThumbnailAnnotation annotationWithThumbnail:ottawa]];
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the overlap with the annotations method and the JPSThumbnailAnnotation instances shown in the report. Trace how touch events move between overlapping annotations, then verify that selecting or using the disclosure button on the top annotation no longer triggers annotations underneath.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100