diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-05-26 22:23:06 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-05-27 21:42:39 -0700 |
commit | 974e6696986d49e2eb130e24bde9e75402b0f386 (patch) | |
tree | 884e9429aaab158eee8c7ff1c13950a64ca91bb8 /platform/ios/src/MGLMapView.h | |
parent | bacf1f59ca8e06b5b5423a35b4e4c30d92624758 (diff) | |
download | qtlocation-mapboxgl-974e6696986d49e2eb130e24bde9e75402b0f386.tar.gz |
[ios, osx] Ignore compound shape types as annotations
Ignore any multipolyline, multipolygon, or shape collection object passed into -addAnnotation: or -addAnnotations:. Previously, these methods broke apart the compound shape into its constituent shapes in order to recursively add them to the map. But that broke assumptions about a one-to-one correspondence between annotations and their contexts during selection and deletion.
Diffstat (limited to 'platform/ios/src/MGLMapView.h')
-rw-r--r-- | platform/ios/src/MGLMapView.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 725677a65b..ca0584c821 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -881,6 +881,11 @@ IB_DESIGNABLE /** Adds an annotation to the map view. + @note `MGLMultiPolyline`, `MGLMultiPolygon`, and `MGLShapeCollection` objects + cannot be added to the map view at this time. Any multipolyline, + multipolygon, or shape collection object that is passed into this method is + silently ignored. + @param annotation The annotation object to add to the receiver. This object must conform to the `MGLAnnotation` protocol. The map view retains the annotation object. */ @@ -889,6 +894,11 @@ IB_DESIGNABLE /** Adds an array of annotations to the map view. + @note `MGLMultiPolyline`, `MGLMultiPolygon`, and `MGLShapeCollection` objects + cannot be added to the map view at this time. Any multipolyline, + multipolygon, or shape collection objects that are passed in are silently + ignored. + @param annotations An array of annotation objects. Each object in the array must conform to the `MGLAnnotation` protocol. The map view retains each individual annotation object. |