You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[ios,macos] Spurious assertion in annotationTagAtPoint #12103
// Assume that the user is fat-fingering an annotation.
CGRect hitRect = CGRectInset({ point, CGSizeZero },
-MGLAnnotationImagePaddingForHitTest,
-MGLAnnotationImagePaddingForHitTest);
// Filter out any annotation whose image or view is unselectable or for which
// hit testing fails.
auto end = std::remove_if(nearbyAnnotations.begin(), nearbyAnnotations.end(), [&](const MGLAnnotationTag annotationTag) {
id <MGLAnnotation> annotation = [selfannotationWithTag:annotationTag];
NSAssert(annotation, @"Unknown annotation found nearby tap");
if ( ! annotation)
{
returntrue;
}
But the assumption that the current set of annotation tags should be perfectly in sync with annotationTagsInRect is incorrect. The underlying queryRenderedSymbols is working off the latest collision index, which may be up to 300ms old. If a tag has just been removed, it still may show up in queryRenderdSymbols results.
It might make sense to filter out non-current tags in annotationTagsInRect, but I think the current behavior of just doing the filtering right below the assertion with a return true looks right. We should poke around a little, but basically I think the assertion just needs to be removed.
Activity
1ec5 commentedon Jun 14, 2018
Related: #8655.
stale commentedon Jan 28, 2019
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
stale commentedon Jul 27, 2019
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
julianrex commentedon Aug 16, 2021
Closing as stale.
julianrex commentedon Aug 16, 2021
Closing as stale.