<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKMapRect/insetBy(dx:dy:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:@F@MKMapRectInset"
  },
  "title" : "insetBy(dx:dy:)"
}
-->

# insetBy(dx:dy:)

Returns the specified rectangle with an inset by the specified amounts.

```
func insetBy(dx: Double, dy: Double) -> MKMapRect
```

## Parameters

`dx`

The amount (in map points) to subtract from both sides along the x-axis.

`dy`

The amount (in map points) to subtract from both sides along the x-axis.

## Return Value

The inset rectangle. If the original rectangle was null, that rectangle is returned instead.

## 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)