---
title: MKMapRect
framework: mapkit
role: symbol
role_heading: Structure
path: mapkit/mkmaprect
---

# MKMapRect

A rectangular area on a two-dimensional map projection.

## Declaration

```swift
struct MKMapRect
```

## Overview

Overview If you project the curved surface of the globe onto a flat surface, what you get is a two-dimensional version of a map where longitude lines appear to be parallel. Such maps are often used to show the entire surface of the globe all at once. An MKMapRect data structure represents a rectangular area as seen on this two-dimensional map.

## Topics

### Creating a map rectangle

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

### Getting standard map rectangles

- [null](mapkit/mkmaprect/null.md)
- [world](mapkit/mkmaprect/world.md)

### Getting the rectangle coordinates

- [origin](mapkit/mkmaprect/origin.md)
- [size](mapkit/mkmaprect/size.md)

### Getting the boundaries

- [minX](mapkit/mkmaprect/minx.md)
- [minY](mapkit/mkmaprect/miny.md)
- [midX](mapkit/mkmaprect/midx.md)
- [midY](mapkit/mkmaprect/midy.md)
- [maxX](mapkit/mkmaprect/maxx.md)
- [maxY](mapkit/mkmaprect/maxy.md)
- [width](mapkit/mkmaprect/width.md)
- [height](mapkit/mkmaprect/height.md)

### Comparing rectangles

- [isNull](mapkit/mkmaprect/isnull.md)
- [MKMapRectEqualToRect(_:_:)](mapkit/mkmaprectequaltorect(_:_:).md)
- [isEmpty](mapkit/mkmaprect/isempty.md)
- [spans180thMeridian](mapkit/mkmaprect/spans180thmeridian.md)
- [remainder](mapkit/mkmaprect/remainder.md)

### Intersecting the rectangle

- [contains(_:)](mapkit/mkmaprect/contains(_:)-79tjt.md)
- [contains(_:)](mapkit/mkmaprect/contains(_:)-1z5oa.md)
- [intersects(_:)](mapkit/mkmaprect/intersects(_:).md)

### Modifying the rectangle

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

### Getting a description of the rectangle

- [MKStringFromMapRect(_:)](mapkit/mkstringfrommaprect(_:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Sendable](swift/sendable.md)

## See Also

### Map coordinates

- [MKCoordinateRegion](mapkit/mkcoordinateregion.md)
- [MKCoordinateSpan](mapkit/mkcoordinatespan.md)
- [MKMapPoint](mapkit/mkmappoint.md)
- [MKMapSize](mapkit/mkmapsize.md)
- [MKDistanceFormatter](mapkit/mkdistanceformatter.md)
