TTPolygon
A closed polygon shape.
-
Creates and returns a TTPolygon object from the specified set of map points.
Declaration
Objective-C
+ (instancetype _Nonnull)polygonWithCoordinates: (CLLocationCoordinate2D *_Nonnull)coordinates count:(NSUInteger)count opacity:(float)opacity color:(id)color colorOutline:(id)colorOutline;Swift
convenience init(coordinates: UnsafeMutablePointer<CLLocationCoordinate2D>, count: UInt, opacity: Float, color: Any!, colorOutline: Any!)Parameters
coordinatesThe array of map coordinates defining the shape.
countThe count of array corrds
opacityopacity
colorcolor.
colorOutlinecolorOutline.
Return Value
TTPolygon
-
Creates and returns a TTPolygon object from the specified set of map points. The polygon color and colorOutline are set a default value WHITE color.
Declaration
Objective-C
+ (instancetype _Nonnull)polygonWithCoordinates: (CLLocationCoordinate2D *_Nonnull)coordinates count:(NSUInteger)count;Swift
convenience init(coordinates: UnsafeMutablePointer<CLLocationCoordinate2D>, count: UInt)Parameters
coordinatesThe array of map coordinates defining the shape.
countThe count of array coordinates.
Return Value
TTPolygon
-
The array of map 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 } -
Opacity
Declaration
Objective-C
@property (nonatomic, readonly) float opacity;Swift
var opacity: Float { get } -
The fill color to use for the path.
Declaration
Objective-C
@property(nonatomic, strong, readonly) UIColor *_Nonnull colorSwift
var color: UnsafeMutablePointer<Int32> { get } -
The outline color to use for the path.
Declaration
Objective-C
@property(nonatomic, strong, readonly) UIColor *_Nonnull colorOutlineSwift
var colorOutline: UnsafeMutablePointer<Int32> { get }
TTPolygon Class Reference