<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKMapRect",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:@SA@MKMapRect"
  },
  "title" : "MKMapRect"
}
-->

# MKMapRect

A rectangular area on a two-dimensional map projection.

```
struct MKMapRect
```

## 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()`](/documentation/MapKit/MKMapRect/init())

Creates the rectangle with an empty region.

[`init(origin:size:)`](/documentation/MapKit/MKMapRect/init(origin:size:))

Creates the map rectangle with the specified point and size.

[`MKMapRectMake`](/documentation/MapKit/MKMapRect/init(x:y:width:height:))

Creates a new map rectangle structure from the specified values.

[`MKCoordinateRegionForMapRect`](/documentation/MapKit/MKCoordinateRegion/init(_:))

Returns the region that corresponds to the specified map rectangle.

### Getting standard map rectangles

[`MKMapRectNull`](/documentation/MapKit/MKMapRect/null)

The null map rectangle.

[`MKMapRectWorld`](/documentation/MapKit/MKMapRect/world)

The map rectangle that represents the world in the two-dimensional map projection.

### Getting the rectangle coordinates

[`origin`](/documentation/MapKit/MKMapRect/origin)

The origin point of the rectangle.

[`size`](/documentation/MapKit/MKMapRect/size)

The width and height of the rectangle, starting from the origin point.

### Getting the boundaries

[`MKMapRectGetMinX`](/documentation/MapKit/MKMapRect/minX)

Returns the minimum x-axis value of the specified rectangle.

[`MKMapRectGetMinY`](/documentation/MapKit/MKMapRect/minY)

Returns the minimum y-axis value of the specified rectangle.

[`MKMapRectGetMidX`](/documentation/MapKit/MKMapRect/midX)

Returns the mid-point along the x-axis of the specified rectangle.

[`MKMapRectGetMidY`](/documentation/MapKit/MKMapRect/midY)

Returns the mid-point along the y-axis of the specified rectangle.

[`MKMapRectGetMaxX`](/documentation/MapKit/MKMapRect/maxX)

Returns the maximum x-axis value of the specified rectangle.

[`MKMapRectGetMaxY`](/documentation/MapKit/MKMapRect/maxY)

Returns the maximum y-axis value of the specified rectangle.

[`MKMapRectGetWidth`](/documentation/MapKit/MKMapRect/width)

Returns the width of the map rectangle.

[`MKMapRectGetHeight`](/documentation/MapKit/MKMapRect/height)

Returns the height of the map rectangle.

### Comparing rectangles

[`MKMapRectIsNull`](/documentation/MapKit/MKMapRect/isNull)

A Boolean value that indicates whether the specified rectangle is null.

[`MKMapRectEqualToRect`](/documentation/MapKit/MKMapRectEqualToRect(_:_:))

Returns a Boolean value that indicates whether two map rectangles are equal.

[`MKMapRectIsEmpty`](/documentation/MapKit/MKMapRect/isEmpty)

A Boolean value that indicates whether the specified rectangle has no area.

[`MKMapRectSpans180thMeridian`](/documentation/MapKit/MKMapRect/spans180thMeridian)

A Boolean value that indicates whether the specified map rectangle crosses the 180th meridian.

[`MKMapRectRemainder`](/documentation/MapKit/MKMapRect/remainder)

A rectangle that represents the normalized portion of the specified rectangle that lies outside the world map boundaries.

### Intersecting the rectangle

[`MKMapRectContainsPoint`](/documentation/MapKit/MKMapRect/contains(_:)-79tjt)

Returns a Boolean value that indicates whether the specified map point lies within the rectangle.

[`MKMapRectContainsRect`](/documentation/MapKit/MKMapRect/contains(_:)-1z5oa)

Returns a Boolean value that indicates whether one rectangle contains another.

[`MKMapRectIntersectsRect`](/documentation/MapKit/MKMapRect/intersects(_:))

Returns a Boolean value that indicates whether two rectangles intersect each other.

### Modifying the rectangle

[`MKMapRectUnion`](/documentation/MapKit/MKMapRect/union(_:))

Returns a rectangle that represents the union of two rectangles.

[`MKMapRectIntersection`](/documentation/MapKit/MKMapRect/intersection(_:))

Returns the rectangle that represents the intersection of two rectangles.

[`MKMapRectInset`](/documentation/MapKit/MKMapRect/insetBy(dx:dy:))

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

[`MKMapRectOffset`](/documentation/MapKit/MKMapRect/offsetBy(dx:dy:))

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

[`MKMapRectDivide`](/documentation/MapKit/MKMapRectDivide(_:_:_:_:_:))

Divides the specified rectangle into two smaller rectangles.

### Getting a description of the rectangle

[`MKStringFromMapRect`](/documentation/MapKit/MKStringFromMapRect(_:))

Returns a formatted string for the specified map rectangle.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

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)