MKCircle Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/MapKit.framework |
| Availability | Available in iOS 4.0 and later. |
| Companion guide | |
| Declared in | MKCircle.h |
Overview
The MKCircle class is a concrete overlay object representing a circular area on a map. This class manages the data that defines the area and is typically used in conjunction with an MKCircleView object, which handles the drawing of the circular area on a map.
Tasks
Creating a Circle Overlay
Accessing the Overlay’s Attributes
-
coordinateproperty -
radiusproperty -
boundingMapRectproperty
Properties
boundingMapRect
The bounding rectangle of the circular area. (read-only)
Discussion
As latitude values move away from the equator and toward the poles, the physical distance between map points gets smaller. This means that more map points are needed to represent the same distance. As a result, the bounding rectangle of a circle overlay gets larger as the center point of that circle moves away from the equator and toward the poles.
Availability
- Available in iOS 4.0 and later.
Declared In
MKCircle.hcoordinate
The center point of the circular area, specified as a latitude and longitude. (read-only)
Availability
- Available in iOS 4.0 and later.
Declared In
MKCircle.hradius
The radius of the circular area, measured in meters. (read-only)
Availability
- Available in iOS 4.0 and later.
Declared In
MKCircle.hClass Methods
circleWithCenterCoordinate:radius:
Creates and returns an MKCircle object using the specified coordinate and radius.
Parameters
- coord
The center point of the circle, specified as a latitude and longitude value.
- radius
The radius of the circle, measured in meters from the center point.
Return Value
A circle overlay object.
Availability
- Available in iOS 4.0 and later.
Declared In
MKCircle.hcircleWithMapRect:
Creates and returns an MKCircle object where the circular area is derived from the specified rectangle.
Parameters
- mapRect
The map rectangle used to determine the circular area. The center point of the rectangle is used as the center point of the circle. If the rectangle is not a square, the longest side of the rectangle is used to define the radius of the resulting circle.
Return Value
A circle overlay object.
Availability
- Available in iOS 4.0 and later.
Declared In
MKCircle.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-05-11)