iOS Developer Library

Developer

MapKit Framework Reference MKMultiPoint Class Reference

Options
Deployment Target:

On This Page
Language:

MKMultiPoint

The MKMultiPoint class is an abstract superclass used to define shapes composed of multiple points. You should not create instances of this class directly. Instead, you should create instances of the MKPolyline or MKPolygon classes. However, you can use the methods and property of this class to access information about the specific points associated with the line or polygon. More...

Inheritance


Conforms To


Import Statement


import MapKit @import MapKit;

Availability


Available in iOS 4.0 and later.
  • Returns an array of map points associated with the shape.

    Declaration

    Swift

    func points() -> UnsafeMutablePointer<MKMapPoint>

    Objective-C

    - (MKMapPoint *)points

    Discussion

    The number of points in the array is specified by the pointCount property.

    Import Statement

    import MapKit

    Availability

    Available in iOS 4.0 and later.

  • The number of points associated with the shape. (read-only)

    Declaration

    Swift

    var pointCount: Int { get }

    Objective-C

    @property(nonatomic, readonly) NSUInteger pointCount

    Import Statement

    import MapKit

    Availability

    Available in iOS 4.0 and later.

  • Retrieves one or more points associated with the shape and converts them to coordinate values.

    Declaration

    Swift

    func getCoordinates(_ coords: UnsafeMutablePointer<CLLocationCoordinate2D>, range range: NSRange)

    Objective-C

    - (void)getCoordinates:(CLLocationCoordinate2D *)coords range:(NSRange)range

    Parameters

    coords

    On input, you must provide a C array of structures large enough to hold the desired number of coordinates. On output, this structure contains the requested coordinate data.

    range

    The range of points you want. The location field indicates the first point you are requesting, with 0 being the first point, 1 being the second point, and so on. The length field indicates the number of points you want. The array in coords must be large enough to accommodate the number of requested coordinates.

    Discussion

    This method converts the map points into coordinates before returning them to you. If you want the value of each point specified as a map point, you can access the values directly using the points method.

    Import Statement

    import MapKit

    Availability

    Available in iOS 4.0 and later.