Mac Developer Library

Developer

MapKit Framework Reference MKGeodesicPolyline Class Reference

Options
Deployment Target:

On This Page
Language:

MKGeodesicPolyline

The MKGeodesicPolyline class represents a line shape that traces the shortest path along the surface of the Earth. As with regular polyline overlays, you specify a geodesic polyline using a set of end-to-end points where the first and last points are not connected to each other. When displayed on a two-dimensional map view, the line segment between any two points may appear curved.

Inheritance


Import Statement


Swift

import MapKit

Objective-C

@import MapKit;

Availability


Available in OS X v10.9 and later.
  • Creates and returns an geodesic polyline using the specified map points.

    Declaration

    Swift

    convenience init!(points points: UnsafeMutablePointer<MKMapPoint>, count count: Int)

    Objective-C

    + (instancetype)polylineWithPoints:(MKMapPoint *)points count:(NSUInteger)count

    Parameters

    points

    A pointer to the array of map points that define the path.

    count

    The number of items in the points array.

    Return Value

    A new geodesic polyline object.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Creates and returns an geodesic polyline using the specified coordinates.

    Declaration

    Swift

    convenience init!(coordinates coords: UnsafeMutablePointer<CLLocationCoordinate2D>, count count: Int)

    Objective-C

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

    Parameters

    coords

    A pointer to the array of coordinates that define the path.

    count

    The number of items in the coords array.

    Return Value

    A new geodesic polyline object.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.