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

[ios] Do not allow multipoint annotations to be assigned views #5770

Merged
merged 2 commits into from
Jul 23, 2016

Conversation

friedbunny
Copy link
Contributor

Changes

  • Limits view annotations to single-point annotations.
  • Refactors iosapp’s test shapes into a separate function.
    • Adds detail to the descriptions of individual shapes.
    • Makes the holey shape square (rather than trapezoidal, as below).

Issue

In v3.3.x, it was possible for any annotation class to be assigned an annotation view. If your implementation of -mapView:viewForAnnotation: didn't check if annotation was a kind of MGLPointAnnotation, you could end up drawing view annotations for MGLMultiPoint subclasses, such as MGLPolygon:

screen shot 2016-07-22 at 5 00 07 pm

As this fix uses the MGLMultiPoint superclass to exclude polygons and polylines, we will have to reevaluate if/when the proposed geometry class hierarchy changes in #5201 happen.

/cc @boundsj @1ec5 @incanus @frederoni

@friedbunny friedbunny added bug iOS Mapbox Maps SDK for iOS refactor annotations Annotations on iOS and macOS or markers on Android labels Jul 22, 2016
@friedbunny friedbunny added this to the ios-v3.4.0 milestone Jul 22, 2016
@friedbunny friedbunny self-assigned this Jul 22, 2016
- More detailed descriptions of individual shapes.
- Make holey polygon square.
@1ec5
Copy link
Contributor

1ec5 commented Jul 22, 2016

👍

@friedbunny friedbunny merged commit 45d65c4 into master Jul 23, 2016
@friedbunny friedbunny deleted the fb-no-shape-views branch July 23, 2016 02:25
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 bug iOS Mapbox Maps SDK for iOS refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants