Contents

MKMapPoint

A point on a two-dimensional map projection.

Declaration

struct MKMapPoint

Overview

If you project the curved surface of the globe onto a flat surface, you get a two-dimensional version of a map where longitude lines appear to be parallel. An MKMapPoint data structure represents a point on this two-dimensional map.

The underlying units that MapKit uses to draw the contents of an MKMapView define the actual units of a map point, but you don’t need to worry about these units directly. You use map points primarily to simplify computations that are complex to do using coordinate values on a curved surface. By converting to map points, you can perform those calculations on a flat surface, which is generally much simpler, and then convert back as necessary. You can map between coordinate values and map points using the init(_:) and coordinate functions.

When saving map-related data to a file, save coordinate values (latitude and longitude) rather than map points.

Topics

Creating a map point

Getting the point coordinates

Comparing map points

Getting the distance between points

Getting a description of the point

See Also

Map coordinates