MGLPolyline

@interface MGLPolyline : MGLMultiPoint <MGLOverlay>

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.

  • Creates and returns an MGLPolyline object from the specified set of coordinates.

    Declaration

    Objective-C

    + (nonnull instancetype)polylineWithCoordinates:
                                (nonnull CLLocationCoordinate2D *)coords
                                              count:(NSUInteger)count;

    Swift

    class func polyline(coordinates coords: UnsafeMutablePointer

    Parameters

    coords

    The array of coordinates defining the shape. The data in this array is copied to the new object.

    count

    The number of items in the coords array.

    Return Value

    A new polyline object.