MGLMultiPolyline
@interface MGLMultiPolyline : MGLShape <MGLOverlay>
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 array of polygons forming the multipolyline.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<MGLPolyline *> *_Nonnull polylines;
Swift
var polylines: [MGLPolyline] { get }
-
Creates and returns a multipolyline object consisting of the given polylines.
Declaration
Objective-C
+ (nonnull instancetype)multiPolylineWithPolylines: (nonnull NSArray<MGLPolyline *> *)polylines;
Swift
convenience init(polylines: [MGLPolyline])
Parameters
polylines
The array of polylines defining the shape.
Return Value
A new multipolyline object.