summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLPolyline.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-16 11:38:35 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-01-16 11:38:35 -0800
commit7ef2843e6a62116667be6a2c12de085951fdd5ea (patch)
tree40eca249e044e2706efd1193d617e6eb8e59d708 /platform/darwin/src/MGLPolyline.h
parent76301b252cbc4bc3ae1fc84322bcbcdbd26cae8a (diff)
parent13b97dd0cebffe36b187bdb74923910def6bd87b (diff)
downloadqtlocation-mapboxgl-7ef2843e6a62116667be6a2c12de085951fdd5ea.tar.gz
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7
Diffstat (limited to 'platform/darwin/src/MGLPolyline.h')
-rw-r--r--platform/darwin/src/MGLPolyline.h58
1 files changed, 46 insertions, 12 deletions
diff --git a/platform/darwin/src/MGLPolyline.h b/platform/darwin/src/MGLPolyline.h
index dfc471bae9..ca1f8e36cc 100644
--- a/platform/darwin/src/MGLPolyline.h
+++ b/platform/darwin/src/MGLPolyline.h
@@ -10,10 +10,35 @@
NS_ASSUME_NONNULL_BEGIN
/**
- The `MGLPolyline` class represents a shape consisting of one or more points
- that define connecting line segments. The points are connected end-to-end in
- the order they are provided. The first and last points are not connected to
- each other.
+ An `MGLPolyline` object represents a shape consisting of two or more vertices,
+ specified as `CLLocationCoordinate2D` instances, and the line segments that
+ connect them. For example, you could use an polyline to represent a road or the
+ path along which something moves.
+
+ 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.
+
+ Alternatively, you can add a polyline overlay directly to a map view using the
+ `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]` method. Configure
+ a polyline overlay’s appearance using
+ `-[MGLMapViewDelegate mapView:strokeColorForShapeAnnotation:]` and
+ `-[MGLMapViewDelegate mapView:lineWidthForPolylineAnnotation:]`.
+
+ The vertices are automatically connected in the order in which you provide
+ them. The first and last vertices are not connected to each other, but you can
+ specify the same `CLLocationCoordinate2D` as the first and last vertices in
+ order to close the polyline. To fill the space within the shape, use an
+ `MGLPolygon` object. To group multiple polylines together in one shape, use an
+ `MGLMultiPolyline` or `MGLShapeCollection` object.
+
+ To make the polyline straddle the antimeridian, specify some longitudes less
+ than −180 degrees or greater than 180 degrees.
+
+ A polyline is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.4">LineString</a>
+ geometry in GeoJSON.
*/
MGL_EXPORT
@interface MGLPolyline : MGLMultiPoint <MGLOverlay>
@@ -32,14 +57,23 @@ MGL_EXPORT
@end
/**
- The `MGLMultiPolyline` class represents a shape consisting of one or more
- polylines. For example, you could use an `MGLMultiPolyline` object to represent
- both sides of a divided highway (dual carriageway), excluding the median
- (central reservation): each carriageway would be a distinct `MGLPolyline`
- object.
-
- @note `MGLMultiPolyline` objects cannot be added to a map view using
- `-[MGLMapView addAnnotations:]` and related methods.
+ An `MGLMultiPolyline` object represents a shape consisting of one or more
+ polylines. For example, you could use a multipolyline shape to represent both
+ sides of a divided highway (dual carriageway), excluding the median (central
+ reservation): each carriageway would be a distinct `MGLPolyline` object.
+
+ You can add multipolyline shapes to the map by adding them to an
+ `MGLShapeSource` object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s multipolylines collectively using an `MGLLineStyleLayer` or
+ `MGLSymbolStyleLayer` object.
+
+ You cannot add an `MGLMultiPolyline` object directly to a map view using
+ `-[MGLMapView addAnnotation:]` or `-[MGLMapView addOverlay:]`. However, you can
+ add the `polylines` array’s items as overlays individually.
+
+ A multipolyline is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.5">MultiLineString</a>
+ geometry in GeoJSON.
*/
MGL_EXPORT
@interface MGLMultiPolyline : MGLShape <MGLOverlay>