TGGeoPolygon
@interface TGGeoPolygon : NSObject
A closed polygon with optional holes.
The polygon is defined by a list of rings. Each ring is represented with a TGGeoPolyline
. The first and last points
in each ring are joined to form a closed shape. The first ring represents the exterior of the polygon and any
subsequent rings become holes that are cut out of the polygon.
-
Initializes a polygon from the specified list of rings.
Declaration
Objective-C
- (nonnull instancetype)initWithRings:(nonnull NSArray<TGGeoPolyline *> *)rings;
Swift
init(rings: [TGGeoPolyline])
Parameters
rings
The list of rings defining the polygon.
Return Value
An initialized polygon.
-
The array of rings defining this polygon.
Declaration
Objective-C
@property (readonly, atomic) NSArray<TGGeoPolyline *> *_Nonnull rings;
Swift
var rings: [TGGeoPolyline] { get }