<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKMapViewDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(pl)MKMapViewDelegate"
  },
  "title" : "MKMapViewDelegate"
}
-->

# MKMapViewDelegate

Optional methods that you use to receive map-related update messages.

```
@MainActor protocol MKMapViewDelegate : NSObjectProtocol
```

## Overview

Because many map operations require the [`MKMapView`](/documentation/MapKit/MKMapView) class to load data asynchronously, the map view calls these methods to notify your app when specific operations complete. The map view also uses these methods to request annotation and overlay views, and to manage interactions with those views.

Before releasing an [`MKMapView`](/documentation/MapKit/MKMapView) object that you set a delegate for, remember to set that object’s [`delegate`](/documentation/MapKit/MKMapView/delegate) property to `nil`. MapKit calls all of your delegate methods on the app’s main thread.

## Topics

### Responding to map position changes

[`-  mapView:regionWillChangeAnimated:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:regionWillChangeAnimated:))

Tells the delegate when the region the map view is displaying is about to change.

[`-  mapViewDidChangeVisibleRegion:`](/documentation/MapKit/MKMapViewDelegate/mapViewDidChangeVisibleRegion(_:))

Tells the delegate when the map view’s visible region changes.

[`-  mapView:regionDidChangeAnimated:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:regionDidChangeAnimated:))

Tells the delegate when the region the map view is displaying changes.

### Loading the map data

[`-  mapViewWillStartLoadingMap:`](/documentation/MapKit/MKMapViewDelegate/mapViewWillStartLoadingMap(_:))

Tells the delegate that the specified map view is about to retrieve some map data.

[`-  mapViewDidFinishLoadingMap:`](/documentation/MapKit/MKMapViewDelegate/mapViewDidFinishLoadingMap(_:))

Tells the delegate when the specified map view successfully loads the needed map data.

[`-  mapViewDidFailLoadingMap:withError:`](/documentation/MapKit/MKMapViewDelegate/mapViewDidFailLoadingMap(_:withError:))

Tells the delegate that the specified view is unable to load the map data.

[`-  mapViewWillStartRenderingMap:`](/documentation/MapKit/MKMapViewDelegate/mapViewWillStartRenderingMap(_:))

Tells the delegate that the map view is about to start rendering some of its tiles.

[`-  mapViewDidFinishRenderingMap:fullyRendered:`](/documentation/MapKit/MKMapViewDelegate/mapViewDidFinishRenderingMap(_:fullyRendered:))

Tells the delegate when the map view finishes rendering all visible tiles.

### Tracking the user’s location

[`-  mapViewWillStartLocatingUser:`](/documentation/MapKit/MKMapViewDelegate/mapViewWillStartLocatingUser(_:))

Tells the delegate that the map view is about to start tracking the user’s location.

[`-  mapViewDidStopLocatingUser:`](/documentation/MapKit/MKMapViewDelegate/mapViewDidStopLocatingUser(_:))

Tells the delegate when the map view stops tracking the user’s location.

[`-  mapView:didUpdateUserLocation:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didUpdate:))

Tells the delegate when the map view updates the user’s location.

[`-  mapView:didFailToLocateUserWithError:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didFailToLocateUserWithError:))

Tells the delegate when an attempt to locate the user’s location fails.

[`-  mapView:didChangeUserTrackingMode:animated:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didChange:animated:))

Tells the delegate when the user-tracking mode changes.

### Managing annotation views

[`-  mapView:viewForAnnotation:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:viewFor:)-8humz)

Returns the view associated with the specified annotation object.

[`-  mapView:didAddAnnotationViews:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didAdd:)-44xon)

Tells the delegate when the map view adds one or more annotation views to the map.

[`-  mapView:annotationView:calloutAccessoryControlTapped:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:annotationView:calloutAccessoryControlTapped:))

Tells the delegate when the user taps one of the annotation view’s accessory buttons.

[`-  mapView:clusterAnnotationForMemberAnnotations:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:clusterAnnotationForMemberAnnotations:))

Asks the delegate to provide a cluster annotation object for the specified annotations.

### Dragging an annotation view

[`-  mapView:annotationView:didChangeDragState:fromOldState:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:annotationView:didChange:fromOldState:))

Tells the delegate when the drag state of one of its annotation views changes.

### Selecting annotations and annotations views

[`-  mapView:didSelectAnnotationView:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didSelect:)-41by3)

Tells the delegate when the user selects one or more of its annotation views.

[`-  mapView:didDeselectAnnotationView:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didDeselect:)-yo7q)

Tells the delegate when the user deselects one or more of its annotation views.

[`-  mapView:didDeselectAnnotation:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didDeselect:)-4ldss)

Tells the delegate when the user deselects one or more annotations.

[`-  mapView:didSelectAnnotation:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didSelect:)-9km43)

Tells the delegate when the user selects one or more annotations.

[`selectableMapFeatures`](/documentation/MapKit/MKMapView/selectableMapFeatures)

The property that describes which selectable features the map responds to.

### Managing the display of overlays

[`-  mapView:selectionAccessoryForAnnotation:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:selectionAccessoryFor:))

Specifies the accessory to display for a selected annotation

[`-  mapView:rendererForOverlay:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:rendererFor:))

Asks the delegate for a renderer object to use when drawing the specified overlay.

[`-  mapView:didAddOverlayRenderers:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didAdd:)-793gj)

Tells the delegate when the map view adds one or more renderer objects to the map.

[`-  mapView:viewForOverlay:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:viewFor:)-6j267)

Asks the delegate for the overlay view to use when displaying the specified overlay object.

[`-  mapView:didAddOverlayViews:`](/documentation/MapKit/MKMapViewDelegate/mapView(_:didAddOverlayViews:))

Tells the delegate when the map adds one or more overlay views to the map.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)