From 52184e6b2d824e94cbd87ebf0c1a72224197a21a Mon Sep 17 00:00:00 2001 From: jmkiley Date: Thu, 15 Mar 2018 12:48:08 -0700 Subject: [ios, macos] Added notes about features --- platform/darwin/src/MGLPointAnnotation.h | 3 ++- platform/darwin/src/MGLPointCollection.h | 3 ++- platform/darwin/src/MGLPolygon.h | 3 ++- platform/darwin/src/MGLPolyline.h | 3 ++- platform/darwin/src/MGLShape.h | 3 ++- platform/darwin/src/MGLShapeCollection.h | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h index 1ef0962f99..78b92f45ac 100644 --- a/platform/darwin/src/MGLPointAnnotation.h +++ b/platform/darwin/src/MGLPointAnnotation.h @@ -28,7 +28,8 @@ NS_ASSUME_NONNULL_BEGIN default content of the annotation’s callout (on iOS) or popover (on macOS). To group multiple related points together in one shape, use an - `MGLPointCollection` or `MGLShapeCollection` object. + `MGLPointCollection` or `MGLShapeCollection` object. To access + a point’s attributes, use an `MGLPointFeature` object. A point shape is known as a Point geometry diff --git a/platform/darwin/src/MGLPointCollection.h b/platform/darwin/src/MGLPointCollection.h index 74b30385a0..5aab580b4d 100644 --- a/platform/darwin/src/MGLPointCollection.h +++ b/platform/darwin/src/MGLPointCollection.h @@ -15,7 +15,8 @@ You can add point collections to the map by adding them to an `MGLShapeSource` object. Configure the appearance of an `MGLShapeSource`’s or `MGLVectorSource`’s point collections collectively using an - `MGLCircleStyleLayer` or `MGLSymbolStyleLayer` object. + `MGLCircleStyleLayer` or `MGLSymbolStyleLayer` object. To access a point + collection’s attributes, use an `MGLPointCollectionFeature` object. You cannot add an `MGLPointCollection` object directly to a map view as an annotation. However, you can create individual `MGLPointAnnotation` objects diff --git a/platform/darwin/src/MGLPolygon.h b/platform/darwin/src/MGLPolygon.h index 3fcc1be76d..bdd2e1eeab 100644 --- a/platform/darwin/src/MGLPolygon.h +++ b/platform/darwin/src/MGLPolygon.h @@ -18,7 +18,8 @@ NS_ASSUME_NONNULL_BEGIN You can add polygon shapes to the map by adding them to an `MGLShapeSource` object. Configure the appearance of an `MGLShapeSource`’s or `MGLVectorSource`’s polygons collectively using an `MGLFillStyleLayer` or - `MGLSymbolStyleLayer` object. + `MGLSymbolStyleLayer` object. To access a polygon’s attributes, use an + `MGLPolygonFeature` object. Alternatively, you can add a polygon overlay directly to a map view using the `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]` method. Configure diff --git a/platform/darwin/src/MGLPolyline.h b/platform/darwin/src/MGLPolyline.h index e46baa91cc..1ed3dd0b9f 100644 --- a/platform/darwin/src/MGLPolyline.h +++ b/platform/darwin/src/MGLPolyline.h @@ -18,7 +18,8 @@ NS_ASSUME_NONNULL_BEGIN You can add polyline shapes to the map by adding them to an `MGLShapeSource` object. Configure the appearance of an `MGLShapeSource`’s or `MGLVectorSource`’s polylines collectively using an `MGLLineStyleLayer` or - `MGLSymbolStyleLayer` object. + `MGLSymbolStyleLayer` object. To access a polyline’s attributes, use an + `MGLPolylineFeature` object. Alternatively, you can add a polyline overlay directly to a map view using the `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]` method. Configure diff --git a/platform/darwin/src/MGLShape.h b/platform/darwin/src/MGLShape.h index e965710552..4bab2b81c1 100644 --- a/platform/darwin/src/MGLShape.h +++ b/platform/darwin/src/MGLShape.h @@ -20,7 +20,8 @@ NS_ASSUME_NONNULL_BEGIN Although you do not create instances of this class directly, you can use its `+[MGLShape shapeWithData:encoding:error:]` factory method to create one of the - concrete subclasses of `MGLShape` noted above from GeoJSON data. + concrete subclasses of `MGLShape` noted above from GeoJSON data. To access a + shape’s attributes, use the corresponding `MGLFeature` class instead. You can add shapes to the map by adding them to an `MGLShapeSource` object. Configure the appearance of an `MGLShapeSource`’s or `MGLVectorSource`’s shapes diff --git a/platform/darwin/src/MGLShapeCollection.h b/platform/darwin/src/MGLShapeCollection.h index bb107ee7f0..094c630167 100644 --- a/platform/darwin/src/MGLShapeCollection.h +++ b/platform/darwin/src/MGLShapeCollection.h @@ -27,7 +27,8 @@ NS_ASSUME_NONNULL_BEGIN To represent a collection of point, polyline, or polygon shapes, it may be more convenient to use an `MGLPointCollection`, `MGLMultiPolyline`, or - `MGLMultiPolygon` object, respectively. + `MGLMultiPolygon` object, respectively. To access a shape collection’s attributes, + use the corresponding `MGLFeature` object. A shape collection is known as a GeometryCollection -- cgit v1.2.1