TTPolygon

@interface TTPolygon : TTOverlay

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

    coordinates

    The array of map coordinates defining the shape.

    count

    The count of array corrds

    opacity

    opacity

    color

    color.

    colorOutline

    colorOutline.

    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

    coordinates

    The array of map coordinates defining the shape.

    count

    The count of array coordinates.

    Return Value

    TTPolygon

  • The array of map coordinates defining the shape.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CLLocationCoordinate2D *_Nonnull coordinates;

    Swift

    var coordinates: UnsafeMutablePointer<CLLocationCoordinate2D> { get }
  • The number of items in the coordinates array.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) NSUInteger count;

    Swift

    var count: UInt { get }
  • Opacity

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) float opacity;

    Swift

    var opacity: 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 }
  • The outline color to use for the path.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIColor* _Nonnull colorOutline

    Swift

    var colorOutline: UnsafeMutablePointer<Int32> { get }