<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKMapView/setVisibleMapRect(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKMapView(im)setVisibleMapRect:animated:"
  },
  "title" : "setVisibleMapRect(_:animated:)"
}
-->

# setVisibleMapRect(_:animated:)

Changes the currently visible portion of the map, and optionally animates the change.

```
func setVisibleMapRect(_ mapRect: MKMapRect, animated animate: Bool)
```

## Parameters

`mapRect`

The map rectangle to make visible in the map view.

`animate`

Specify <doc://com.apple.documentation/documentation/Swift/true> if you want the map view to animate the transition to the new map rectangle or <doc://com.apple.documentation/documentation/Swift/false> if you want the map to center on the specified rectangle immediately.

## Discussion

---

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)