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.
  • An array of shapes forming the shape collection.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSArray<MGLShape *> *_Nonnull shapes;

    Swift

    var shapes: [MGLShape] { get }
  • 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.