TechnologiesMaps & Location

MapKit

iOSmacOStvOSwatchOSvisionOS

MapKit displays interactive maps in your app, letting you place annotations with MKAnnotationView, draw overlays such as MKCircle and MKGeodesicPolyline through renderers like MKCircleRenderer and MKGradientPolylineRenderer, and frame the view with types like MKCoordinateRegion and MKMapRect. You calculate routes with MKDirections and MKRoute, run place search and autocompletion using MKLocalSearch and MKLocalSearchCompleter, and geocode addresses with MKGeocodingRequest and MKAddress. It also supports immersive street-level imagery through MKLookAroundScene, MKLookAroundSceneRequest, and MKLookAroundViewController, along with snapshots and GeoJSON parsing via MKGeoJSONDecoder. MapKit runs on iOS, macOS, tvOS, watchOS, and visionOS.

Maps in SwiftUI 10

Declarative SwiftUI types for embedding a map, controlling its camera, and styling its appearance.

  • Pr
    DynamicMapContentiOS 17.0+
    A protocol for SwiftUI map content that resolves dynamically from a collection of data.
  • St
    MapStyleiOS 17.0+
    A Style that can be applied to a Map.
  • St
    MapInteractionModesiOS 14.0+
    The ways a user can interact with a map.
  • St
    MapProxyiOS 17.0+
    A proxy for accessing sizing information about a given map view.
  • St
    MapCameraiOS 17.0+
    Defines a virtual viewpoint above the map surface.
  • St
    MapCameraBoundsiOS 17.0+
    Defines an optional boundary of an area within which the map’s center needs to
  • St
    MapCameraPositioniOS 17.0+
    How to position the map's camera within the map.
  • St
    MapCameraUpdateContextiOS 17.0+
    A structure that provides camera state during a SwiftUI map update callback.
  • St
    MapCameraUpdateFrequencyiOS 17.0+
    Values that specify how often a SwiftUI map reports camera updates.
  • En
    MapUserTrackingMode
    Constants that specify how a SwiftUI map follows the user's location.

Map Content in SwiftUI 8

Annotations, markers, and overlay shapes you place declaratively on a SwiftUI map.

  • Pr
    MapAnnotationProtocoliOS 14.0+
    A protocol adopted by custom annotation content placed on a SwiftUI map.
  • St
    MapAnnotation
    A SwiftUI annotation that places custom content at a coordinate on the map.
  • St
    MapMarker
    A SwiftUI map annotation that displays a balloon marker with a label.
  • St
    MapPin
    A SwiftUI map annotation that displays a pushpin at a coordinate.
  • St
    MapCircleiOS 17.0+
    A circular overlay with a configurable radius that you center on a geographic coordinate.
  • St
    MapPolygoniOS 17.0+
    A closed polygon overlay.
  • St
    MapPolylineiOS 17.0+
    An open polygon overlay consisting of one or more connected line segments.
  • St
    UserLocationiOS 17.0+
    Information about the current location of the user.

Map Features & Selection 6

Types that represent selectable map features and points of interest in SwiftUI maps.

  • Pr
    MapSelectableiOS 17.0+
    Represents a selection of either a map feature, or map content with a given tag value.
  • St
    MapSelectioniOS 18.0+
    Can represent a tag value or a `MapFeature`.
  • St
    MapFeatureiOS 17.0+
    Represents a tappable map feature.
  • St
    MKMapFeatureOptionsiOS 16.0+
    Options that specify which built-in map features are interactive or visible.
  • St
    PointOfInterestCategoriesiOS 17.0+
    Point of Interest categories to be shown.
  • St
    MapItemDetailSelectionAccessoryStyle
    The map item detail selection accessory style

Displaying a Map View 12

The UIKit and AppKit map view and the controls that frame and configure it.

  • Cl
    MKMapViewiOS 3.0+
    A view that displays an interactive map with annotations and overlays.
  • Cl
    MKMapCameraiOS 7.0+
    An object that defines the viewing perspective, heading, and pitch of the map.
  • Cl
    MKMapConfigurationiOS 16.0+
    An abstract base type that configures the appearance and content of a map.
  • Cl
    MKStandardMapConfigurationiOS 16.0+
    A configuration that displays the standard road map style.
  • Cl
    MKHybridMapConfigurationiOS 16.0+
    A configuration that displays satellite imagery with road and label overlays.
  • Cl
    MKImageryMapConfigurationiOS 16.0+
    A configuration that displays satellite or aerial imagery on the map.
  • En
    MKMapTypeiOS 3.0+
    Constants that specify the type of map imagery to display.
  • Cl
    MKCompassButtoniOS 11+
    A control that displays a compass and orients the map to north when tapped.
  • Cl
    MKScaleViewiOS 11.0+
    A control that displays a scale indicator for the current map zoom level.
  • Cl
    MKUserTrackingButtoniOS 11.0+
    A control that toggles the map's user-location tracking mode.
  • Cl
    MKUserTrackingBarButtonItemiOS 5.0+
    A bar button item that toggles the map's user-location tracking mode.
  • En
    MKUserTrackingModeiOS 5.0+
    Constants that specify how the map follows the user's location and heading.

Annotations 15

Protocols and views for placing and displaying pins and markers on a map.

  • Pr
    MKAnnotation
    A protocol that associates a coordinate and metadata with an object placed on the map.
  • Cl
    MKAnnotationViewiOS 3.0+
    A view that displays an annotation's content at a coordinate on the map.
  • Cl
    MKMarkerAnnotationViewiOS 11.0+
    An annotation view that displays a balloon-shaped marker with a glyph.
  • Cl
    MKPinAnnotationView
    An annotation view that displays a classic pushpin marker.
  • Cl
    MKPointAnnotationiOS 4.0+
    An annotation defined by a single coordinate, title, and subtitle.
  • Cl
    MKClusterAnnotationiOS 11.0+
    An annotation that groups multiple nearby annotations into a single visual cluster.
  • Cl
    MKMapFeatureAnnotationiOS 16.0+
    An annotation that represents a built-in map feature such as a point of interest.
  • Cl
    MKMapItemAnnotationiOS 18.0+
    An annotation that displays a map item at its coordinate on the map.
  • Cl
    MKUserLocationiOS 3.0+
    An annotation that represents the device's current location on the map.
  • Cl
    MKUserLocationViewiOS 14.0+
    A view that displays the user's current location annotation.
  • St
    MKAnnotationViewZPriorityiOS 14.0+
    Values that determine the stacking order of annotation views on the map.
  • St
    MKFeatureDisplayPriorityiOS 11.0+
    Values that determine the priority with which annotations are displayed.
  • En
    MKFeatureVisibilityiOS 11.0+
    Constants that specify whether a map feature is hidden, visible, or adaptive.
  • Cl
    MKSelectionAccessoryiOS 18.0+
    An object that describes accessory content shown for a selected annotation.
  • Cl
    MKMapItemDetailViewControlleriOS 18.0+
    A view controller that presents detailed information about a map item.

Overlays & Renderers 21

Geometric shape overlays and the renderers that draw them on the map surface.

  • Pr
    MKOverlayiOS 4.0+
    A protocol adopted by objects that define overlay geometry drawn over the map.
  • Cl
    MKShapeiOS 4.0+
    An abstract base type for annotation and overlay shapes with a title and subtitle.
  • Cl
    MKCircleiOS 4.0+
    A circular overlay defined by a center coordinate and a radius.
  • Cl
    MKPolygoniOS 4.0+
    An overlay defined by a closed series of coordinates forming a filled shape.
  • Cl
    MKPolylineiOS 4.0+
    An overlay defined by an ordered series of connected coordinates.
  • Cl
    MKGeodesicPolylineiOS 7.0+
    A polyline overlay whose segments follow the shortest path over the earth's surface.
  • Cl
    MKMultiPointiOS 4.0+
    An overlay base type defined by an ordered series of map points.
  • Cl
    MKMultiPolygoniOS 13.0+
    An overlay that groups multiple polygons into a single shape.
  • Cl
    MKMultiPolylineiOS 13.0+
    An overlay that groups multiple polylines into a single shape.
  • Cl
    MKTileOverlayiOS 7.0+
    An overlay that displays custom map tiles loaded from a URL template or source.
  • Cl
    MKOverlayRendereriOS 7.0+
    A base class that draws an overlay's contents into the map view.
  • Cl
    MKOverlayPathRendereriOS 7.0+
    A base renderer that draws overlays whose shapes are defined by a path.
  • Cl
    MKCircleRendereriOS 7.0+
    A renderer that draws a circle overlay onto the map.
  • Cl
    MKPolygonRendereriOS 7.0+
    A renderer that draws a polygon overlay onto the map.
  • Cl
    MKPolylineRendereriOS 7.0+
    A renderer that draws a polyline overlay onto the map.
  • Cl
    MKGradientPolylineRendereriOS 14.0+
    A renderer that draws a polyline with a color gradient along its length.
  • Cl
    MKMultiPolygonRendereriOS 13.0+
    A renderer that draws a multi-polygon overlay onto the map.
  • Cl
    MKMultiPolylineRendereriOS 13.0+
    A renderer that draws a multi-polyline overlay onto the map.
  • Cl
    MKTileOverlayRendereriOS 7.0+
    A renderer that draws tile overlay imagery onto the map.
  • St
    MKTileOverlayPath
    A structure that identifies a specific map tile by its coordinates and zoom level.
  • En
    MKOverlayLeveliOS 7.0+
    Constants that specify whether an overlay draws above or below map labels.

Places & Map Items 9

Types that represent geographic places, addresses, and their on-map metadata.

  • Cl
    MKMapItemiOS 6.0+
    An object that represents a place, including its location and address details.
  • Cl
    MKMapItemRequestiOS 16.0+
    A request that retrieves a map item for an identifier or feature.
  • Cl
    MKPlacemark
    An object that represents a coordinate with associated address information.
  • Cl
    MKAddressiOS 26.0+
    An object that represents a structured postal address for a place on the map.
  • Cl
    MKAddressRepresentationsiOS 26.0+
    An object that provides formatted string representations of an address.
  • Cl
    MKAddressFilteriOS 18.0+
    An object that restricts which components of an address are included in results.
  • Cl
    MKPointOfInterestFilteriOS 13.0+
    An object that includes or excludes categories of points of interest on the map.
  • St
    MKPointOfInterestCategory
    Constants that identify categories of points of interest on the map.
  • Cl
    MKIconStyleiOS 16.0+
    An object that describes the icon appearance used for a place or point of interest.

Search & Autocompletion 6

Classes that find places by name, category, and partial text and return matching results.

  • Cl
    MKLocalSearchiOS 6.1+
    An object that performs a search for places matching a natural-language query.
  • Cl
    MKLocalSearchCompleteriOS 9.3+
    An object that produces autocompletion suggestions for a partial search string.
  • Cl
    MKLocalSearchCompletioniOS 9.3+
    An object that represents a single autocompletion suggestion for a search query.
  • Pr
    MKLocalSearchCompleterDelegateiOS 9.3+
    A protocol for receiving updated autocompletion results from a search completer.
  • Cl
    MKLocalPointsOfInterestRequestiOS 14.0+
    A request that searches for points of interest within a region or radius.
  • En
    MKLocalSearchRegionPriorityiOS 18.0+
    Constants that specify how strongly a search prioritizes a given region.

Geocoding 2

Requests that convert between addresses and geographic coordinates.

  • Cl
    MKGeocodingRequestiOS 26.0+
    A request that converts a postal address into geographic coordinates.
  • Cl
    MKReverseGeocodingRequestiOS 26.0+
    A request that converts geographic coordinates into a postal address.

Directions & Routing 4

Types that calculate routes between locations and describe travel options.

  • Cl
    MKDirectionsiOS 7.0+
    An object that computes route-based directions between map locations.
  • Cl
    MKRouteiOS 7.0+
    An object that describes a single route, including its geometry, distance, and steps.
  • St
    MKDirectionsTransportTypeiOS 7.0+
    Options that specify the modes of transport for a directions request.
  • Cl
    MKDistanceFormatteriOS 7.0+
    An object that formats distance values into localized, human-readable strings.

Look Around 6

Types that present immersive street-level imagery for a location.

  • Cl
    MKLookAroundSceneiOS 16.0+
    An object that represents the street-level Look Around imagery for a location.
  • Cl
    MKLookAroundSceneRequestiOS 16.0+
    A request that retrieves a Look Around scene for a coordinate or map item.
  • Cl
    MKLookAroundViewControlleriOS 16.0+
    A view controller that presents interactive Look Around imagery.
  • Pr
    MKLookAroundViewControllerDelegateiOS 16.0+
    A protocol for responding to events from a Look Around view controller.
  • Cl
    MKLookAroundSnapshotteriOS 16.0+
    An object that renders a static image from a Look Around scene.
  • En
    MKLookAroundBadgePositioniOS 16.0+
    Constants that specify where the Look Around badge appears within a view.

Snapshots 1

Tools for rendering a static map image without a live map view.

  • Cl
    MKMapSnapshotteriOS 7.0+
    An object that renders a static map image for a specified region.

GeoJSON 3

Types for parsing GeoJSON data into MapKit shapes and features.

  • Cl
    MKGeoJSONDecoderiOS 13.0+
    An object that parses GeoJSON data into MapKit shapes and features.
  • Pr
    MKGeoJSONObjectiOS 13.0+
    A protocol adopted by objects produced when decoding GeoJSON data.
  • Cl
    MKGeoJSONFeatureiOS 13.0+
    An object that represents a GeoJSON feature with associated geometry and properties.

Coordinates & Geometry 5

Value types that express map coordinates, spans, points, and rectangular regions.

  • St
    MKCoordinateRegion
    A structure that defines a rectangular geographic region by center and span.
  • St
    MKCoordinateSpan
    A structure that defines the latitudinal and longitudinal extent of a map region.
  • St
    MKMapPoint
    A structure that represents a point on the two-dimensional map projection.
  • St
    MKMapSize
    A structure that represents a width and height on the map projection.
  • St
    MKMapRect
    A structure that defines a rectangular area on the two-dimensional map projection.

Errors 1

Error information reported by MapKit operations.

  • St
    MKErroriOS 3.0+
    A structure that describes errors reported by MapKit operations.

Structures 17

  • St
    AnnotationiOS 17.0+
    A customizable annotation that marks a map location.
  • St
    AnyMapContentiOS 17.5+
    A type-erased map content.
  • St
    DefaultUserAnnotationContentiOS 17.0+
    You don't use this type directly. Instead MapKit creates this type on
  • St
    EmptyMapContentiOS 17.0+
    A piece of map content that doesn't contain any content.
  • St
    LookAroundPreview
  • St
    MapiOS 14.0+
  • St
    MapCompassiOS 17.0+
    A view that reflects the current orientation of the associated `Map`.
  • St
    MapContentBuilderiOS 17.0+
    A result builder that creates map content content from closures.
  • St
    MapContentViewiOS 17.0+
  • St
    MapPitchToggle
    A button that will set the asosciated pitch of the associated `Map` to a
  • St
    MapReaderiOS 17.0+
    A container view that defines its contents as a function of information about the first contained map.
  • St
    MapScaleView
    Displays a legend with distance information for the associated `Map`
  • St
    MapSelectableContentView
  • St
    MapUserLocationButtoniOS 17.0+
    A button that will set the framing of the associated `Map` to the User Location
  • St
    MarkeriOS 17.0+
    A balloon-shaped annotation that marks a map location.
  • St
    TupleMapContentiOS 17.0+
Show 1 more
  • St
    UserAnnotationiOS 17.0+
    Displays the current location of the user on the map.

Protocols 3

  • Pr
    MKMapItemDetailViewControllerDelegateiOS 18.0+
  • Pr
    MKMapViewDelegate
  • Pr
    MapContentiOS 17.0+

Type Aliases 1

  • Ty
    MKZoomScale

Extends 11

NSNotificationNSValueNSUserActivityPlaceDescriptorViewGroupOptionalModifiedContentForEachNeverCLLocationCoordinate2D
← Maps & Location