summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLFeature.h
diff options
context:
space:
mode:
authorFabian Guerra <fabian.guerra@mapbox.com>2017-08-29 11:24:42 -0400
committerFabian Guerra <fabian.guerra@mapbox.com>2017-08-29 11:24:42 -0400
commita51ae29000a0ba89d2900944c88732c98fb58da6 (patch)
tree15a9659c59dd3d51f771b4f36a23cd50def04ad5 /platform/darwin/src/MGLFeature.h
parentd436bcd56b2a2b68195f546c11919dd46e8049ce (diff)
parentdd18e1af1e8366bc3126cc897ae4b6d5890acd0b (diff)
downloadqtlocation-mapboxgl-a51ae29000a0ba89d2900944c88732c98fb58da6.tar.gz
Merge branch release tag ios-v3.6.2
Diffstat (limited to 'platform/darwin/src/MGLFeature.h')
-rw-r--r--platform/darwin/src/MGLFeature.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLFeature.h b/platform/darwin/src/MGLFeature.h
index 491c89b608..a13821cf96 100644
--- a/platform/darwin/src/MGLFeature.h
+++ b/platform/darwin/src/MGLFeature.h
@@ -18,15 +18,23 @@ NS_ASSUME_NONNULL_BEGIN
You can add custom data to display on the map by creating feature objects and
adding them to an `MGLShapeSource` using the
`-[MGLShapeSource initWithIdentifier:shape:options:]` method or
- `MGLShapeSource.shape` property. Similarly, you can add `MGLPointFeature`,
- `MGLPolylineFeature`, and `MGLPolygonFeature` objects to the map as annotations
- using `-[MGLMapView addAnnotations:]` and related methods.
+ `MGLShapeSource.shape` property.
In addition to adding data to the map, you can also extract data from the map:
`-[MGLMapView visibleFeaturesAtPoint:]` and related methods return feature
objects that correspond to features in the source. This enables you to inspect
the properties of features in vector tiles loaded by `MGLVectorSource` objects.
You also reuse these feature objects as overlay annotations.
+
+ While it is possible to add `MGLFeature`-conforming objects to the map as
+ annotations using `-[MGLMapView addAnnotations:]` and related methods, doing so
+ has trade-offs:
+
+ - Features added as annotations will not have `identifier` or `attributes`
+ properties when used with feature querying.
+
+ - Features added as annotations become interactive. Taps and selection can be
+ handled in `-[MGLMapViewDelegate mapView:didSelectAnnotation:]`.
*/
@protocol MGLFeature <MGLAnnotation>