---
title: "init(x:y:width:height:)"
framework: mapkit
role: symbol
role_heading: Initializer
path: "mapkit/mkmaprect/init(x:y:width:height:)"
---

# init(x:y:width:height:)

Creates a new map rectangle structure from the specified values.

## Declaration

```swift
init(x: Double, y: Double, width: Double, height: Double)
```

## Parameters

- `x`: The point along the east-west axis of the map projection to use for the origin.
- `y`: The point along the north-south axis of the map projection to use for the origin.
- `width`: The width of the rectangle (measured using map points).
- `height`: The height of the rectangle (measured using map points).

## Return Value

Return Value A map rectangle with the specified values.

## See Also

### Creating a map rectangle

- [init()](mapkit/mkmaprect/init().md)
- [init(origin:size:)](mapkit/mkmaprect/init(origin:size:).md)
- [init(_:)](mapkit/mkcoordinateregion/init(_:).md)
