Framework

MapKit

Display map or satellite imagery directly from your app's interface, call out points of interest, and determine placemark information for map coordinates.

Overview

Use the MapKit framework to embed maps directly into your own windows and views. You can add annotations and overlays to the map to call out points of interest or user destinations. You can also provide text completion for users typing in the name of a point of interest.

If your app offers transit directions, you can make your directions available to Maps. You can also use Maps to supplement the directions that you provide in your app. For example, if your app only provides directions for subway travel, you can use Maps to provide walking directions to and from subway stations.

Topics

First Steps

Incorporate a map view into your interface when you want to display geographic content.

MKMapView

An embeddable map interface, similar to the one provided by the Maps application.

Map View Customization

Customize the appearance of the map view.

MKMapCamera

A virtual camera for defining the appearance of the map.

MKUserTrackingButton

A specialized button that allows the user to toggle through the user tracking modes.

MKUserTrackingBarButtonItem

A specialized bar button item that allows the user to toggle through the user tracking modes.

Map Coordinates

Specify locations on the map using either geographic coordinates or map-specific points.

MKCoordinateRegion

A rectangular geographic region centered around a specific latitude and longitude.

MKCoordinateSpan

The width and height of a map region.

MKMapRect

A rectangular area on a two-dimensional map projection.

MKMapPoint

A point on a two-dimensional map projection.

MKMapSize

Width and height information on a two-dimensional map projection.

MKDistanceFormatter

A utility object that converts between a geographic distance and a string-based expression of that distance.

Annotations and Overlays

Place custom content on the map surface. Annotations are anchored to a specific map coordinate, and overlays cover a region.

MKPlacemark

A user-friendly description of a location on the map.

MKAnnotation

An interface for associating your content with a specific map location.

MKAnnotationView

The visual representation of one of your annotation objects.

MKOverlay

An interface for associating content with a specific map region.

MKOverlayRenderer

The shared infrastructure used to draw overlays on the map surface.

MapKit Annotations

Use these annotation objects as-is in your maps.

MapKit Overlays

Use these overlays as-is in your maps.

Directions

Provide directions using your own service, or ask for directions from Apple servers.

MKMapItem

A point of interest on the map.

MKDirections

A utility object that computes directions and travel-time information based on the route information you provide.

MKDirectionsRequest

The start and end points of a route, along with the planned mode of transportation.

MKDirectionsResponse

The route information returned by Apple servers in response to one of your requests for directions.

MKETAResponse

The travel-time information returned by Apple servers.

MKRoute

A single route between a requested start and end point.

MKRouteStep

One portion of an overall route.

Placemark Search

Search for points of interest and implement search completion for user-typed phrases.

MKLocalSearch

A utility object for initiating map-based searches and processing the results.

MKLocalSearchRequest

The parameters to use when searching for points of interest on the map.

MKLocalSearchResponse

The results from a map-based search.

MKLocalSearchCompleter

A utility object for generating a list of completion strings based on a partial search string that you provide.

MKLocalSearchCompletion

A fully formed string that completes a partial string.

Static Snapshots

Capture map content to an image that you can display elsewhere.

MKMapSnapshotter

A utility object for capturing map-based imagery.

MKMapSnapshotOptions

The options to use when capturing map-based imagery.

MKMapSnapshot

An image generated by a snapshotter object.

Errors

MKErrorDomain

The error domain for Map Kit.

MKErrorCode

Error constants for the Map Kit framework.

Reference

MapKit Constants

This document describes the constants found in the Map Kit framework

See Also