MKPolygonRenderer Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/MapKit.framework
Availability
Available in iOS 7.0 and later.
Declared in
MKPolygonRenderer.h

Overview

The MKPolygonRenderer class provides the visual representation for an MKPolygon overlay object. This renderer fills and strokes the polygon represented by first filling the shape and then stroking its outline. You can change the color and other drawing attributes of the polygon by modifying the properties inherited from the parent class. You typically use this class as is and do not subclass it.

Tasks

Initializing a Polygon Renderer

Accessing the Polygon Overlay Object

Properties

polygon

The polygon object that contains the information used to draw the overlay’s contents. (read-only)

@property(nonatomic, readonly) MKPolygon *polygon
Availability
  • Available in iOS 7.0 and later.
Declared In
MKPolygonRenderer.h

Instance Methods

initWithPolygon:

Initializes and returns a new renderer that handles drawing for the specified polygon overlay object.

- (id)initWithPolygon:(MKPolygon *)polygon
Parameters
polygon

The polygon overlay containing information about the area to be drawn. This object must have at least three points defining the polygon to draw. This parameter must not be nil.

Return Value

An initialized polygon renderer object.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKPolygonRenderer.h