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

[ios] Cycle through both UIView and UIImage backed annotations - #5460

Merged
boundsj merged 1 commit into
release-ios-v3.3.0from
boundsj-cycle-all-the-annotations
Jun 23, 2016
Merged

boundsj merged 1 commit into
release-ios-v3.3.0from
boundsj-cycle-all-the-annotations

Conversation

@boundsj

@boundsj boundsj commented Jun 23, 2016

Copy link
Copy Markdown
Contributor

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 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 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 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

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.
@boundsj boundsj added the iOS Mapbox Maps SDK for iOS label Jun 23, 2016
@boundsj boundsj added this to the ios-v3.3.0 milestone Jun 23, 2016
@boundsj boundsj self-assigned this Jun 23, 2016
@boundsj boundsj added the annotations Annotations on iOS and macOS or markers on Android label Jun 23, 2016
@1ec5

1ec5 commented Jun 23, 2016

Copy link
Copy Markdown
Contributor

👍

@boundsj
boundsj merged commit 05b6e72 into release-ios-v3.3.0 Jun 23, 2016
@boundsj
boundsj deleted the boundsj-cycle-all-the-annotations branch June 23, 2016 20:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants