MKMapRect MKMapRect Struct


A rectangular area in a 2D map projection, measured in map points.

public struct MKMapRect
type MKMapRect = struct


MKMapRect(MKMapPoint, MKMapSize) MKMapRect(MKMapPoint, MKMapSize)

Creates a new MKMapPoint struct with the specified origin and size.

MKMapRect(Double, Double, Double, Double) MKMapRect(Double, Double, Double, Double)

Creates a new MKMapRect originating at [x, y] and of the specified height and width.


Null Null

A known-invalid MKMapRect (see IsNull).

Origin Origin

The starting location of the MKMapRect.

Size Size

The extent of the MKMapRect.


Height Height

The height of this MKMapRect, in degrees.

IsEmpty IsEmpty

Whether the MKMapRect has a positive area.

IsNull IsNull

Whether the MKMapRect is the known-invalid rectangle Null.

MaxX MaxX

The maximum X-axis value of the MKMapRect.

MaxY MaxY

The maximum Y-axis value of the MKMapRect.

MidX MidX

The X-axis midpoint of the MKMapRect.

MidY MidY

The Y-axis midpoint of the MKMapRect.

MinX MinX

The minimum X-axis value of the MKMapRect.

MinY MinY

The minimum Y-axis value of the MKMapRect.

Spans180thMeridian Spans180thMeridian

Whether the MKMapRect crosses the ante-meridian.

Width Width

The extent along the X-axis of the MKMapRect.

World World

The MKMapRect that represents the world in the 2D map projection.


Contains(MKMapPoint) Contains(MKMapPoint)

Whether the MKMapRect contains point.

Contains(MKMapRect) Contains(MKMapRect)

Whether rect is entirely within the bounds of this MKMapRect.

Divide(Double, CGRectEdge, MKMapRect) Divide(Double, CGRectEdge, MKMapRect)

Splits this MKMapRect into a two smaller rectangle (returned value and remainder).

Equals(Object) Equals(Object)

Whether this MKMapRect has the same P:MapKit.Origin and Size values as the other.

GetHashCode() GetHashCode()

Returns a hash of this MKMapRect struct's value.

Inset(Double, Double) Inset(Double, Double)

Returns a new MKMapRect based on this, offset by dx and dy.

Intersection(MKMapRect, MKMapRect) Intersection(MKMapRect, MKMapRect)

Static method returning the intersection of rect1 with rect2.

Intersects(MKMapRect, MKMapRect) Intersects(MKMapRect, MKMapRect)

Whether rect1 and rect2 overlap.

Offset(Double, Double) Offset(Double, Double)

A new MKMapRect whose origin is shifted by dx and dy.

Remainder() Remainder()

A new MKMapRect that has been normalized to remove areas outside the world map's boundaries.

ToString() ToString()

A brief representation of the origin and size of the MKMapRect.

Union(MKMapRect, MKMapRect) Union(MKMapRect, MKMapRect)

Returns the rectangle covering both rect1 and rect2.


Equality(MKMapRect, MKMapRect) Equality(MKMapRect, MKMapRect)

Whether two MKMapRect objects have identical values.

Inequality(MKMapRect, MKMapRect) Inequality(MKMapRect, MKMapRect)

Whether two MKMapRect objects have non-identical values.

Applies to