---
title: "offsetBy(dx:dy:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmaprect/offsetby(dx:dy:)"
---

# offsetBy(dx:dy:)

Returns a rectangle with an origin point that shifts by the specified amount.

## Declaration

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

## Parameters

- `dx`: The amount (in map points) to shift the x-coordinate of the origin point.
- `dy`: The amount (in map points) to shift the x-coordinate of the origin point.

## Return Value

Return Value The offset rectangle. If the original rectangle is null, that rectangle returns instead.

## See Also

### Modifying the rectangle

- [union(_:)](mapkit/mkmaprect/union(_:).md)
- [intersection(_:)](mapkit/mkmaprect/intersection(_:).md)
- [insetBy(dx:dy:)](mapkit/mkmaprect/insetby(dx:dy:).md)
- [MKMapRectDivide(_:_:_:_:_:)](mapkit/mkmaprectdivide(_:_:_:_:_:).md)
