MKPolylineRenderer Class Reference

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

Overview

The MKPolylineRenderer class provides the visual representation for an MKPolyline overlay object. This renderer strokes the line only; it does not fill it. 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 the Polyline Renderer

Accessing the Polyline Overlay

Properties

polyline

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

@property(nonatomic, readonly) MKPolyline *polyline
Availability
  • Available in iOS 7.0 and later.
Declared In
MKPolylineRenderer.h

Instance Methods

initWithPolyline:

Initializes and returns a new overlay view using the specified polyline overlay object

- (id)initWithPolyline:(MKPolyline *)polyline
Parameters
polyline

The polyline overlay containing information about the area to be drawn. This object must have at least two points defining the line segment to draw. This parameter must not be nil.

Return Value

An initialized polyline renderer object.

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