---
title: "insertOverlay(_:at:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmapview/insertoverlay(_:at:)"
---

# insertOverlay(_:at:)

Inserts an overlay object into the list associated with the map.

## Declaration

```swift
func insertOverlay(_ overlay: any MKOverlay, at index: Int)
```

## Parameters

- `overlay`: The overlay object to insert.
- `index`: The index at which to insert the overlay object. If this value is greater than the number of objects in the doc://com.apple.mapkit/documentation/MapKit/MKMapView/overlays property, this method appends the object to the end of the array.

## Discussion

Discussion This method inserts the overlay into the MKOverlayLevel.aboveLabels level.

## See Also

### Adding and inserting overlays

- [addOverlay(_:level:)](mapkit/mkmapview/addoverlay(_:level:).md)
- [addOverlays(_:level:)](mapkit/mkmapview/addoverlays(_:level:).md)
- [addOverlay(_:)](mapkit/mkmapview/addoverlay(_:).md)
- [addOverlays(_:)](mapkit/mkmapview/addoverlays(_:).md)
- [insertOverlay(_:at:level:)](mapkit/mkmapview/insertoverlay(_:at:level:).md)
- [insertOverlay(_:above:)](mapkit/mkmapview/insertoverlay(_:above:).md)
- [insertOverlay(_:below:)](mapkit/mkmapview/insertoverlay(_:below:).md)
- [exchangeOverlay(_:with:)](mapkit/mkmapview/exchangeoverlay(_:with:).md)
- [exchangeOverlay(at:withOverlayAt:)](mapkit/mkmapview/exchangeoverlay(at:withoverlayat:).md)
