Navmii SDK  2.2.0
Write yourself a navigation system in iOS
Instance Methods | Class Methods | Properties | List of all members
NMGeoPolygon Class Reference

Inherits NMGeoObject.

Instance Methods

(instancetype) - initWithVertices:
 
(void) - appendVertex:
 
(void) - insertVertex:atIndex:
 
(void) - removeLastVertex
 
(void) - removeVertexAtIndex:
 
(void) - removeAllVertices
 
(void) - addHole:
 
(void) - removeHoleAtIndex:
 
(void) - removeAllHoles
 

Class Methods

(instancetype) + geoPolygonWithVertices:
 

Properties

UIColor * fillColor
 
UIColor * strokeColor
 
CGFloat strokeWidth
 
NSInteger vertexCount
 
NMMapCoordinateslastVertex
 
NSArray< NMMapCoordinates * > * vertices
 
NSArray< NSArray< NMMapCoordinates * > * > * holes
 
- Properties inherited from NMGeoObject
NSUInteger zIndex
 
NSUInteger objectId
 
BOOL hidden
 

Detailed Description

A class representing a polygon that can be drawn on the map.

Method Documentation

◆ addHole:()

- (void) addHole: (NSArray< NMMapCoordinates * > *)  vertices

Adds a hole, as an array of coordinates, to the polygon.

◆ appendVertex:()

- (void) appendVertex: (NMMapCoordinates *)  vertex

Adds a vertex to the end of the receiver’s list of vertices.

◆ geoPolygonWithVertices:()

+ (instancetype) geoPolygonWithVertices: (NSArray< NMMapCoordinates * > *)  vertices

◆ initWithVertices:()

- (instancetype) initWithVertices: (NSArray< NMMapCoordinates * > *)  vertices

◆ insertVertex:atIndex:()

- (void) insertVertex: (NMMapCoordinates *)  vertex
atIndex: (NSUInteger)  index 

Inserts a vertex at the specified index.

◆ removeAllHoles()

- (void) removeAllHoles

Removes all holes added to the polygon.

◆ removeAllVertices()

- (void) removeAllVertices

Removes all vertices of the polygon.

◆ removeHoleAtIndex:()

- (void) removeHoleAtIndex: (NSUInteger)  index

Removes a hole at the specified index. Holes are indexed in the order they were added.

◆ removeLastVertex()

- (void) removeLastVertex

Removes the last vertex from list of vertices.

◆ removeVertexAtIndex:()

- (void) removeVertexAtIndex: (NSUInteger)  index

Removes a vertex at the specified index.

Property Documentation

◆ fillColor

- (UIColor*) fillColor
readwritenonatomicstrong

The fill color of the polygon.

◆ holes

- (NSArray<NSArray <NMMapCoordinates *> *>*) holes
readnonatomiccopy

List of holes.

◆ lastVertex

- (NMMapCoordinates*) lastVertex
readnonatomiccopy

Returns the last vertex in the polygon.

◆ strokeColor

- (UIColor*) strokeColor
readwritenonatomicstrong

The stroke color of the polygon.

◆ strokeWidth

- (CGFloat) strokeWidth
readwritenonatomicassign

The stroke width of the polygon.

◆ vertexCount

- (NSInteger) vertexCount
readnonatomicassign

Number of vertices in the polygon.

◆ vertices

- (NSArray<NMMapCoordinates *>*) vertices
readnonatomiccopy

List of vertices.