Structure

MKMapRect

A rectangular area on a two-dimensional map projection.

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

`MKMapRectMake`

Creates a new `MKMapRect` structure from the specified values.

`MKCoordinateRegionForMapRect`

Returns the region that corresponds to the specified map rectangle.

Getting Standard Map Rectangles

`MKMapRectNull`

The null map rectangle.

`MKMapRectWorld`

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

Getting the Rectangle Coordinates

`origin`

The origin point of the rectangle.

`size`

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

Getting the Boundaries

`MKMapRectGetMinX`

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

`MKMapRectGetMinY`

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

`MKMapRectGetMidX`

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

`MKMapRectGetMidY`

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

`MKMapRectGetMaxX`

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

`MKMapRectGetMaxY`

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

`MKMapRectGetWidth`

Returns the width of the map rectangle.

`MKMapRectGetHeight`

Returns the height of the map rectangle.

Comparing Rectangles

`MKMapRectIsNull`

Returns a Boolean indicating whether the specified rectangle is null.

`MKMapRectEqualToRect`

Returns a Boolean value indicating whether the two map rectangles are equal

`MKMapRectIsEmpty`

Returns a Boolean value indicating whether the specified rectangle has no area.

`MKMapRectSpans180thMeridian`

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

`MKMapRectRemainder`

Normalizes the portion of the specified rectangle that lies outside the world map boundaries.

Intersecting the Rectangle

`MKMapRectContainsPoint`

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

`MKMapRectContainsRect`

Returns Boolean value indicating whether one rectangle contains another.

`MKMapRectIntersectsRect`

Returns a Boolean value indicating whether two rectangles intersect each other.

Modifying the Rectangle

`MKMapRectUnion`

Returns a rectangle representing the union of the two rectangles.

`MKMapRectIntersection`

Returns the rectangle representing the intersection of two rectangles.

`MKMapRectInset`

Returns the specified rectangle inset by the specified amounts.

`MKMapRectOffset`

Returns a rectangle whose origin point is shifted by the specified amount.

`MKMapRectDivide`

Divides the specified rectangle into two smaller rectangles.

Getting a Description of the Rectangle

`MKStringFromMapRect`

Returns a formatted string for the specified map rectangle.

Map Coordinates

`MKCoordinateRegion`

A rectangular geographic region centered around a specific latitude and longitude.

`MKCoordinateSpan`

The width and height of a map region.

`MKMapPoint`

A point on a two-dimensional map projection.

`MKMapSize`

Width and height information on a two-dimensional map projection.

`MKDistanceFormatter`

A utility object that converts between a geographic distance and a string-based expression of that distance.