TTPolyline
Objective-C
@interface TTPolyline : TTOverlay
Swift
class TTPolyline
A shape consisting of one or more connected line segments.
-
Creates and returns an TTPolyline object from the specified set of coordinates.
Declaration
Objective-C
+ (instancetype _Nonnull)polylineWithCoordinates: (CLLocationCoordinate2D *_Nonnull)coordinates count:(NSUInteger)count opacity:(float)opacity width:(float)width color:(id)color;
Swift
convenience init(coordinates: UnsafeMutablePointer<CLLocationCoordinate2D>, count: UInt, opacity: Float, width: Float, color: Any!)
Parameters
coordinates
The array of coordinates defining the shape.
count
The number of items in the coordinates array.
opacity
The opacity for the path.
width
The width for the path. Should be greater than 0.
color
The color for the path.
Return Value
TTPolyline
-
Creates and returns an TTPolyline object from the specified set of coordinates. The polyline color and colorOutline are set a default value WHITE color. The width path is set a default value 5.0.
Declaration
Objective-C
+ (instancetype _Nonnull)polylineWithCoordinates: (CLLocationCoordinate2D *_Nonnull)coordinates count:(NSUInteger)count;
Swift
convenience init(coordinates: UnsafeMutablePointer<CLLocationCoordinate2D>, count: UInt)
Parameters
coordinates
The array of coordinates defining the shape.
count
The number of items in the coordinates array.
Return Value
TTPolyline
-
The array of coordinates defining the shape.
Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D *_Nonnull coordinates;
Swift
var coordinates: UnsafeMutablePointer<CLLocationCoordinate2D> { get }
-
The number of items in the coordinates array.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger count;
Swift
var count: UInt { get }
-
The opacity for the path.
Declaration
Objective-C
@property (nonatomic, readonly) float opacity;
Swift
var opacity: Float { get }
-
The width for the path. Should be greater than 0.
Declaration
Objective-C
@property (nonatomic, readonly) float width;
Swift
var width: Float { get }
-
The fill color to use for the path.
Declaration
Objective-C
@property(nonatomic, strong, readonly) UIColor *_Nonnull color
Swift
var color: UnsafeMutablePointer<Int32> { get }