Mac Developer Library

Developer

MapKit Framework Reference MapKit Functions Reference

Options
Deployment Target:

On This Page
Language:

MapKit Functions Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import MapKit

Objective-C

@import MapKit;

This document describes the functions found in the Map Kit framework.

Functions

  • Creates a new MKCoordinateSpan from the specified values.

    Declaration

    Swift

    func MKCoordinateSpanMake(_ latitudeDelta: CLLocationDegrees, _ longitudeDelta: CLLocationDegrees) -> MKCoordinateSpan

    Objective-C

    MKCoordinateSpan MKCoordinateSpanMake ( CLLocationDegrees latitudeDelta, CLLocationDegrees longitudeDelta );

    Parameters

    latitudeDelta

    The amount of north-to-south distance (measured in degrees) to use for the span. Unlike longitudinal distances, which vary based on the latitude, one degree of latitude is approximately 111 kilometers (69 miles) at all times.

    longitudeDelta

    The amount of east-to-west distance (measured in degrees) to use for the span. The number of kilometers spanned by a longitude range varies based on the current latitude. For example, one degree of longitude spans a distance of approximately 111 kilometers (69 miles) at the equator but shrinks to 0 kilometers at the poles.

    Return Value

    A span with the specified delta values.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Creates a new MKCoordinateRegion from the specified coordinate and span values.

    Declaration

    Swift

    func MKCoordinateRegionMake(_ centerCoordinate: CLLocationCoordinate2D, _ span: MKCoordinateSpan) -> MKCoordinateRegion

    Objective-C

    MKCoordinateRegion MKCoordinateRegionMake ( CLLocationCoordinate2D centerCoordinate, MKCoordinateSpan span );

    Parameters

    centerCoordinate

    The center point of the region.

    span

    The horizontal and vertical span representing the amount of map to display. The size of the span also reflects the current zoom level.

    Return Value

    A region with the specified values.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Creates a new MKCoordinateRegion from the specified coordinate and distance values.

    Declaration

    Swift

    func MKCoordinateRegionMakeWithDistance(_ centerCoordinate: CLLocationCoordinate2D, _ latitudinalMeters: CLLocationDistance, _ longitudinalMeters: CLLocationDistance) -> MKCoordinateRegion

    Objective-C

    MKCoordinateRegion MKCoordinateRegionMakeWithDistance ( CLLocationCoordinate2D centerCoordinate, CLLocationDistance latitudinalMeters, CLLocationDistance longitudinalMeters );

    Parameters

    centerCoordinate

    The center point of the new coordinate region.

    latitudinalMeters

    The amount of north-to-south distance (measured in meters) to use for the span.

    longitudinalMeters

    The amount of east-to-west distance (measured in meters) to use for the span.

    Return Value

    A region with the specified values.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Creates a new MKMapPoint structure from the specified values.

    Declaration

    Swift

    func MKMapPointMake(_ x: Double, _ y: Double) -> MKMapPoint

    Objective-C

    MKMapPoint MKMapPointMake ( double x, double y );

    Parameters

    x

    The point along the east-west axis of the map projection.

    y

    The point along the north-south axis of the map projection.

    Return Value

    A map point with the specified values.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Creates a new MKMapSize structure from the specified values.

    Declaration

    Swift

    func MKMapSizeMake(_ width: Double, _ height: Double) -> MKMapSize

    Objective-C

    MKMapSize MKMapSizeMake ( double width, double height );

    Parameters

    width

    The distance (measured using map points) along the east-west axis of the map projection.

    height

    The distance (measured using map points) along the north-south axis of the map projection.

    Return Value

    A map size with the specified values.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Creates a new MKMapRect structure from the specified values.

    Declaration

    Swift

    func MKMapRectMake(_ x: Double, _ y: Double, _ width: Double, _ height: Double) -> MKMapRect

    Objective-C

    MKMapRect MKMapRectMake ( double x, double y, double width, double height );

    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

    A map rectangle with the specified values.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the map point data structure that corresponds to the specified coordinate.

    Declaration

    Swift

    func MKMapPointForCoordinate(_ coordinate: CLLocationCoordinate2D) -> MKMapPoint

    Objective-C

    MKMapPoint MKMapPointForCoordinate ( CLLocationCoordinate2D coordinate );

    Parameters

    coordinate

    The coordinate containing the latitude and longitude values for the desired point.

    Return Value

    The map point value that corresponds to the specified coordinate on a two-dimensional map projection.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the latitude and longitude that corresponds to the specified map point.

    Declaration

    Swift

    func MKCoordinateForMapPoint(_ mapPoint: MKMapPoint) -> CLLocationCoordinate2D

    Objective-C

    CLLocationCoordinate2D MKCoordinateForMapPoint ( MKMapPoint mapPoint );

    Parameters

    mapPoint

    The map point value that corresponds to the desired point on a two-dimensional map projection.

    Return Value

    The coordinate structure containing the latitude and longitude values for the specified point.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the region that corresponds to the specified map rectangle.

    Declaration

    Swift

    func MKCoordinateRegionForMapRect(_ rect: MKMapRect) -> MKCoordinateRegion

    Objective-C

    MKCoordinateRegion MKCoordinateRegionForMapRect ( MKMapRect rect );

    Parameters

    rect

    The map rectangle that corresponds to the desired region on a two-dimensional map projection.

    Return Value

    The region structure specifying the latitude, longitude, and span values for the specified rectangle.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the distance spanned by one map point at the specified latitude.

    Declaration

    Swift

    func MKMetersPerMapPointAtLatitude(_ latitude: CLLocationDegrees) -> CLLocationDistance

    Objective-C

    CLLocationDistance MKMetersPerMapPointAtLatitude ( CLLocationDegrees latitude );

    Parameters

    latitude

    The latitude for which to return the value.

    Return Value

    The distance (in meters) spanned by a single map point.

    Discussion

    The distance between map points decreases as the latitude approaches the poles. This relationship parallels the relationship between longitudinal coordinates at different latitudes.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the number of map points that represent one meter at the given latitude.

    Declaration

    Swift

    func MKMapPointsPerMeterAtLatitude(_ latitude: CLLocationDegrees) -> Double

    Objective-C

    double MKMapPointsPerMeterAtLatitude ( CLLocationDegrees latitude );

    Parameters

    latitude

    The latitude for which to return the value.

    Return Value

    The number of map points that span one meter.

    Discussion

    The number of map points per meter increases as the latitude approaches the poles.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the number of meters between two map points.

    Declaration

    Swift

    func MKMetersBetweenMapPoints(_ a: MKMapPoint, _ b: MKMapPoint) -> CLLocationDistance

    Objective-C

    CLLocationDistance MKMetersBetweenMapPoints ( MKMapPoint a, MKMapPoint b );

    Parameters

    a

    The first map point.

    b

    The second map point.

    Return Value

    The number of meters between the specified map points.

    Discussion

    This distance reflects the actual distance between the two points on the surface of the globe, taking into account the curvature of the Earth.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the width (in screen points) of roads on a map at the specified zoom level.

    Declaration

    Swift

    func MKRoadWidthAtZoomScale(_ zoomScale: MKZoomScale) -> CGFloat

    Objective-C

    CGFloat MKRoadWidthAtZoomScale ( MKZoomScale zoomScale );

    Parameters

    zoomScale

    The scale factor currently applied to the map view.

    Return Value

    The width of roads, measured in screen points. You can use the returned value to set the width of lines in drawing code that traces the path of a road.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectGetMinX(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetMinX ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The minimum x-axis value.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectGetMinY(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetMinY ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The minimum y-axis value.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectGetMidX(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetMidX ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The midpoint value along the x-axis.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectGetMidY(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetMidY ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The midpoint value along the y-axis.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectGetMaxX(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetMaxX ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The maximum x-axis value.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectGetMaxY(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetMaxY ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The maximum y-axis value.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the width of the map rectangle.

    Declaration

    Swift

    func MKMapRectGetWidth(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetWidth ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The rectangle’s width.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the height of the map rectangle.

    Declaration

    Swift

    func MKMapRectGetHeight(_ rect: MKMapRect) -> Double

    Objective-C

    double MKMapRectGetHeight ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to test.

    Return Value

    The rectangle’s height.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns a Boolean value indicating whether the two map points are equal.

    Declaration

    Swift

    func MKMapPointEqualToPoint(_ point1: MKMapPoint, _ point2: MKMapPoint) -> Bool

    Objective-C

    BOOL MKMapPointEqualToPoint ( MKMapPoint point1, MKMapPoint point2 );

    Parameters

    point1

    The first map point.

    point2

    The second point.

    Return Value

    YEStrue if the x and y values in both points are exactly the same or NOfalse if one or both values are different.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns a Boolean value indicating whether the two map sizes are equal.

    Declaration

    Swift

    func MKMapSizeEqualToSize(_ size1: MKMapSize, _ size2: MKMapSize) -> Bool

    Objective-C

    BOOL MKMapSizeEqualToSize ( MKMapSize size1, MKMapSize size2 );

    Parameters

    size1

    The first map size.

    size2

    The second map size.

    Return Value

    YEStrue if the width and height values in both sizes are exactly the same or NOfalse if one or both values are different.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectEqualToRect(_ rect1: MKMapRect, _ rect2: MKMapRect) -> Bool

    Objective-C

    BOOL MKMapRectEqualToRect ( MKMapRect rect1, MKMapRect rect2 );

    Parameters

    rect1

    The first map rectangle.

    rect2

    The second map rectangle.

    Return Value

    YEStrue if the rectangles are exactly the same or NOfalse if the origin point or size values are different.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectContainsPoint(_ rect: MKMapRect, _ point: MKMapPoint) -> Bool

    Objective-C

    BOOL MKMapRectContainsPoint ( MKMapRect rect, MKMapPoint point );

    Parameters

    rect

    The map rectangle being tested.

    point

    The point to check.

    Return Value

    YEStrue if the rectangle is not null or empty and the point is located inside the rectangle; otherwise, NOfalse.

    Discussion

    A point is considered to be inside the rectangle if its coordinates lie inside the rectangle or on the minimum X or minimum Y edge.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns Boolean value indicating whether one rectangle contains another.

    Declaration

    Swift

    func MKMapRectContainsRect(_ rect1: MKMapRect, _ rect2: MKMapRect) -> Bool

    Objective-C

    BOOL MKMapRectContainsRect ( MKMapRect rect1, MKMapRect rect2 );

    Parameters

    rect1

    The containing rectangle.

    rect2

    The rectangle that might be contained in rect1.

    Return Value

    YEStrue if rect2 is null or lies entirely inside rect1; otherwise, returns NOfalse if rect1 is null or does not completely enclose rect2.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectIntersectsRect(_ rect1: MKMapRect, _ rect2: MKMapRect) -> Bool

    Objective-C

    BOOL MKMapRectIntersectsRect ( MKMapRect rect1, MKMapRect rect2 );

    Parameters

    rect1

    The first rectangle to test.

    rect2

    The second rectangle to test.

    Return Value

    YEStrue if rect1 and rect2 intersect each other or NOfalse if they do not intersect or either rectangle is null.

    Discussion

    The rectangles are not considered to be intersecting if the only intersection occurs along an edge. To be considered a true intersection, the rectangles must both enclose a single rectangular area whose width and height are both greater than 0.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns a Boolean indicating whether the specified rectangle is null.

    Declaration

    Swift

    func MKMapRectIsNull(_ rect: MKMapRect) -> Bool

    Objective-C

    BOOL MKMapRectIsNull ( MKMapRect rect );

    Parameters

    rect

    The rectangle to test.

    Return Value

    YEStrue if the rectangle is null or NOfalse if it is not null.

    Discussion

    A rectangle is considered null if its origin point contains an invalid or infinite value.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectIsEmpty(_ rect: MKMapRect) -> Bool

    Objective-C

    BOOL MKMapRectIsEmpty ( MKMapRect rect );

    Parameters

    rect

    The rectangle to test.

    Return Value

    YEStrue if the rectangle is null or its width or height are equal to 0; otherwise, NOfalse.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns a rectangle representing the union of the two rectangles.

    Declaration

    Swift

    func MKMapRectUnion(_ rect1: MKMapRect, _ rect2: MKMapRect) -> MKMapRect

    Objective-C

    MKMapRect MKMapRectUnion ( MKMapRect rect1, MKMapRect rect2 );

    Parameters

    rect1

    The first rectangle.

    rect2

    The second rectangle.

    Return Value

    A rectangle whose area encompasses the two rectangles and the space between them.

    Discussion

    If either rectangle is null, this method returns the other rectangle. The origin point of the returned rectangle is set to the smaller of the x and y values for the two rectangles. Similarly, the size and width of the rectangle are computed by taking the maximum x and y values and subtracting the x and y values for the new origin point.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the rectangle representing the intersection of two rectangles.

    Declaration

    Swift

    func MKMapRectIntersection(_ rect1: MKMapRect, _ rect2: MKMapRect) -> MKMapRect

    Objective-C

    MKMapRect MKMapRectIntersection ( MKMapRect rect1, MKMapRect rect2 );

    Parameters

    rect1

    The first rectangle.

    rect2

    The second rectangle.

    Return Value

    The rectangle representing the intersection of the two rectangles or MKMapRectNull if there is no intersection.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns the specified rectangle inset by the specified amounts.

    Declaration

    Swift

    func MKMapRectInset(_ rect: MKMapRect, _ dx: Double, _ dy: Double) -> MKMapRect

    Objective-C

    MKMapRect MKMapRectInset ( MKMapRect rect, double dx, double dy );

    Parameters

    rect

    The original rectangle.

    dx

    The amount (in map points) to subtract from both sides along the x-axis.

    dy

    The amount (in map points) to subtract from both sides along the y-axis.

    Return Value

    The inset rectangle. If the original rectangle was null, that rectangle is returned instead.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectOffset(_ rect: MKMapRect, _ dx: Double, _ dy: Double) -> MKMapRect

    Objective-C

    MKMapRect MKMapRectOffset ( MKMapRect rect, double dx, double dy );

    Parameters

    rect

    The original rectangle.

    dx

    The amount (in map points) by which to shift the x-coordinate of the origin point.

    dy

    The amount (in map points) by which to shift the y-coordinate of the origin point.

    Return Value

    The offset rectangle. If the original rectangle was null, that rectangle is returned instead.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Divides the specified rectangle into two smaller rectangles.

    Declaration

    Swift

    func MKMapRectDivide(_ rect: MKMapRect, _ slice: UnsafeMutablePointer<MKMapRect>, _ remainder: UnsafeMutablePointer<MKMapRect>, _ amount: Double, _ edge: CGRectEdge)

    Objective-C

    void MKMapRectDivide ( MKMapRect rect, MKMapRect *slice, MKMapRect *remainder, double amount, CGRectEdge edge );

    Parameters

    rect

    The rectangle to divide.

    slice

    On input, a pointer to a map rectangle. On output, this parameter contains the portion of rect that was removed.

    remainder

    On input, a pointer to a map rectangle. On output, this parameter contains the remaining portion of rect that was not removed.

    amount

    The amount of rect to remove along the specified edge. If this value is negative, it is set to 0.

    edge

    The edge from which to remove the specified amount.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns a formatted string for the specified map point.

    Declaration

    Swift

    func MKStringFromMapPoint(_ point: MKMapPoint) -> String!

    Objective-C

    NSString * MKStringFromMapPoint ( MKMapPoint point );

    Parameters

    point

    The map point to format.

    Return Value

    A formatted string containing the x and y coordinates of the map point.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns a formatted string for the specified map size.

    Declaration

    Swift

    func MKStringFromMapSize(_ size: MKMapSize) -> String!

    Objective-C

    NSString * MKStringFromMapSize ( MKMapSize size );

    Parameters

    size

    The map size to format.

    Return Value

    A formatted string containing the width and height values of the map size.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

  • Returns a formatted string for the specified map rectangle.

    Declaration

    Swift

    func MKStringFromMapRect(_ rect: MKMapRect) -> String!

    Objective-C

    NSString * MKStringFromMapRect ( MKMapRect rect );

    Parameters

    rect

    The map rectangle to format.

    Return Value

    A formatted string containing the origin and size values of the map rectangle.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectSpans180thMeridian(_ rect: MKMapRect) -> Bool

    Objective-C

    BOOL MKMapRectSpans180thMeridian ( MKMapRect rect );

    Parameters

    rect

    The rectangle to test.

    Return Value

    YEStrue if the rectangle spans the 180th meridian or NOfalse if it is contained wholly within the world map.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.

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

    Declaration

    Swift

    func MKMapRectRemainder(_ rect: MKMapRect) -> MKMapRect

    Objective-C

    MKMapRect MKMapRectRemainder ( MKMapRect rect );

    Parameters

    rect

    The rectangle to check.

    Discussion

    For a rectangle that lies on the 180th meridian, this function isolates the portion that lies outside the boundary, wraps it to the opposite side of the map, and returns that rectangle.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in OS X v10.9 and later.