Class

MKCircle

A circular overlay with a configurable radius and centered on a specific geographic coordinate.

Declaration

class MKCircle : MKShape

Overview

This class defines the portion of the map that the overlay covers. To draw the region, return a MKCircleRenderer object from the mapView(_:rendererFor:) method of your map view delegate.

Topics

Creating a Circle Overlay

init(center: CLLocationCoordinate2D, radius: CLLocationDistance)

Creates and returns an MKCircle object using the specified coordinate and radius.

init(mapRect: MKMapRect)

Creates and returns an MKCircle object where the circular area is derived from the specified rectangle.

Accessing the Overlay’s Attributes

var coordinate: CLLocationCoordinate2D

The center point of the circular area, specified as a latitude and longitude.

var radius: CLLocationDistance

The radius of the circular area, measured in meters.

var boundingMapRect: MKMapRect

The bounding rectangle of the circular area.

Relationships

Inherits From

See Also

Circle

class MKCircleRenderer

The visual representation for a circular overlay.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software