MKGeodesicPolyline Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/MapKit.framework
Availability
Available in iOS 7.0 and later.
Declared in
MKGeodesicPolyline.h

Overview

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.

Tasks

Creating a Geodesic Polyline Overlay

Class Methods

polylineWithCoordinates:count:

Creates and returns an geodesic polyline using the specified coordinates.

+ (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.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKGeodesicPolyline.h

polylineWithPoints:count:

Creates and returns an geodesic polyline using the specified map points.

+ (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.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKGeodesicPolyline.h