MGLShapeCollection
@interface MGLShapeCollection : MGLShape
The MGLShapeCollection
class represents a shape consisting of one or more
distinct but related shapes that are instances of MGLShape
. The constituent
shapes can be a mixture of different kinds of shapes.
Note
MGLShapeCollection
objects cannot be added to a map view using
-[MGLMapView addAnnotations:]
and related methods.
-
Creates and returns a shape collection consisting of the given shapes.
Declaration
Objective-C
+ (nonnull instancetype)shapeCollectionWithShapes: (nonnull NSArray<MGLShape *> *)shapes;
Swift
convenience init(shapes: [MGLShape])
Parameters
shapes
The array of shapes defining the shape collection. The data in this array is copied to the new object.
Return Value
A new shape collection object.