This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
[ios] Cycle through both UIView and UIImage backed annotations - #5460
Merged
Merged
Conversation
This changes the way the the calculation for the largest visual annotation representation (stored in _unionedAnnotationRepresentationSize) is done so that it includes both images and views. The `annotationTagAtPoint` method is then able to find annotation objects that are in a query rect formed from the sizes of all manner of point annotation visual representations. The `annotationTagAtPoint` method also gains new logic in a conditional to handle annotations backed by MGLAnnotationViews. Similarly to the image case, it filters out disabled annotations and calculates a centered rect for the view. The hit test logic remains the same but now works correctly for both the centered rects of both images and views. This also fixes a bug where the `largestAnnotationViewSize` was always holding the last annotation view size and not necessarily the largest. This would affect when annotation views are put into a reuse queue since the size is used to help determine when an annotation view has gone offscreen.
Contributor
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5166
This changes the way the the calculation for the largest visual annotation representation (stored in
_unionedAnnotationRepresentationSize) is done so that it includes both images and views. The
annotationTagAtPointmethod is then able to find annotation objects that are in a query rect formed from the sizes of all manner of point annotation visual representations.The
annotationTagAtPointmethod also gains new logic in a conditional to handle annotations backed by MGLAnnotationViews. Similarly to the image case, it filters out disabled annotations and calculatesa centered rect for the view. The hit test logic remains the same but now works correctly for the centered rects of both images and views.
This also fixes a bug where the
largestAnnotationViewSizewas always holding the last annotation view size and not necessarily the largest. This affects when annotation views are put into a reuse queue since the size is used to help determine when an annotation view has gone offscreen.cc @1ec5 @frederoni