MKPolygonView Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/MapKit.framework
Availability
Available in iOS 4.0 and later.
Companion guide
Declared in
MKPolygonView.h
Related sample code

Overview

The MKPolygonView class provides the visual representation for an MKPolygon annotation object. This view fills and strokes the area represented by the annotation. You can change the color and other drawing attributes of the polygon by modifying the properties inherited from the MKOverlayPathView class. This class is typically used as is and not subclassed.

Tasks

Initializing a Polygon View

Accessing the Polygon Overlay

Properties

polygon

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

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

Instance Methods

initWithPolygon:

Initializes and returns a new overlay view using the specified polygon overlay object.

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

The polygon overlay containing the information about the area to be drawn. This object must have at least three points defining the polygon in order for this view to draw the corresponding path.

Return Value

A new polygon overlay view.

Availability
  • Available in iOS 4.0 and later.
Related Sample Code
Declared In
MKPolygonView.h

Did this document help you? Yes It's good, but... Not helpful...