NTPolygon
@interface NTPolygon : NTVectorElement
A geometric polygon that can be displayed on the map. Polygons can be concave and have multiple overlapping holes.
-
Constructs a Polygon object from a geometry object and a style.
Declaration
Objective-C
- (id)initWithGeometry:(NTPolygonGeometry *)geometry style:(NTPolygonStyle *)style;Parameters
geometryThe geometry object that defines the location and holes of this polygon.
styleThe style that defines what this polygon looks like.
-
Constructs a Polygon object from a vector of map positions and a style.
Declaration
Objective-C
- (id)initWithPoses:(NTMapPosVector *)poses style:(NTPolygonStyle *)style;Parameters
posesThe vector of map positions that defines the location of this polygon.
styleThe style that defines what this polygon looks like.
-
Constructs a Polygon object from a vector of map positions, a vector of holes and a style.
Declaration
Objective-C
- (id)initWithPoses:(NTMapPosVector *)poses holes:(NTMapPosVectorVector *)holes style:(NTPolygonStyle *)style;Parameters
posesThe vector of map positions that defines the location of this polygon.
holesThe vector of holes that defines the locations of holes of this polygon.
styleThe style that defines what this polygon looks like.
-
Undocumented
Declaration
Objective-C
- (NTPolygonGeometry *)getGeometry; -
Sets the location for this polygon.
Declaration
Objective-C
- (void)setGeometry:(NTPolygonGeometry *)geometry;Parameters
geometryThe new geometry object that defines the location and holes of this polygon.
-
Returns the vertices that define this polygon.
Declaration
Objective-C
- (NTMapPosVector *)getPoses;Return Value
The vector of map positions that define this polygon.
-
Sets the vertices that define this polygon. Note: holes are not affected by this call.
Declaration
Objective-C
- (void)setPoses:(NTMapPosVector *)poses;Parameters
posesThe new vector of map positions that define this polygon.
-
Returns the holes of the polygon.
Declaration
Objective-C
- (NTMapPosVectorVector *)getHoles;Return Value
The list of holes of the polygon.
-
Sets the holes of the polygon.
Declaration
Objective-C
- (void)setHoles:(NTMapPosVectorVector *)holes;Parameters
holesThe list of holes of the polygon.
-
Returns the style of this polygon.
Declaration
Objective-C
- (NTPolygonStyle *)getStyle;Return Value
The style that defines what this polygon looks like.
-
Sets the style for this polygon.
Declaration
Objective-C
- (void)setStyle:(NTPolygonStyle *)style;Parameters
styleThe new style that defines what this polygon looks like.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;
View on GitHub
NTPolygon Class Reference