Loading...
Searching...
No Matches

Polygon on the location view in WGS84 coordinates. More...

#include <com/navigine/idl/objc/NCLocationPolygon.h>

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithPoints:sublocationId:
 Default constructor for class NCLocationPolygon.
 

Class Methods

(nonnull instancetype) + locationPolygonWithPoints:sublocationId:
 Factory method for class NCLocationPolygon.
 

Properties

NSArray< NCGlobalPoint * > * points
 Ring vertices in WGS84 GlobalPoint.
 
NSNumber * sublocationId
 Floor this polygon is attached to, or null for the outdoor map.
 

Detailed Description

Polygon on the location view in WGS84 coordinates.

Swift code snippet:

let ring = [
NCGlobalPoint(latitude: 55.751, longitude: 37.617),
NCGlobalPoint(latitude: 55.752, longitude: 37.618),
NCGlobalPoint(latitude: 55.751, longitude: 37.619),
]
let locationPolygon = NCLocationPolygon(points: ring, sublocationId: 7)
print("LocationPolygon: sublocation \‍(locationPolygon.sublocationId ?? -1), vertices \‍(locationPolygon.points.count)")

Objective C code snippet:

NSArray<NCGlobalPoint *> *ring = @[
[[NCGlobalPoint alloc] initWithLatitude:55.751 longitude:37.617],
[[NCGlobalPoint alloc] initWithLatitude:55.752 longitude:37.618],
[[NCGlobalPoint alloc] initWithLatitude:55.751 longitude:37.619],
];
NCLocationPolygon *locationPolygon = [[NCLocationPolygon alloc] initWithPoints:ring sublocationId:@(7)];
NSLog(@"LocationPolygon: sublocation %@, vertices %lu",
locationPolygon.sublocationId, (unsigned long)locationPolygon.points.count);

Definition at line 27 of file NCLocationPolygon.h.

Method Documentation

◆ initWithPoints:sublocationId:

- (nonnull instancetype) initWithPoints: (nonnull NSArray< NCGlobalPoint * > *) points
sublocationId: (nullable NSNumber *) sublocationId 

Default constructor for class NCLocationPolygon.

◆ locationPolygonWithPoints:sublocationId:

+ (nonnull instancetype) locationPolygonWithPoints: (nonnull NSArray< NCGlobalPoint * > *) points
sublocationId: (nullable NSNumber *) sublocationId 

Factory method for class NCLocationPolygon.

Property Documentation

◆ points

- (NSArray<NCGlobalPoint *>*) points
readnonatomicassign

Ring vertices in WGS84 GlobalPoint.

Definition at line 46 of file NCLocationPolygon.h.

◆ sublocationId

- (NSNumber*) sublocationId
readnonatomicassign

Floor this polygon is attached to, or null for the outdoor map.

Definition at line 53 of file NCLocationPolygon.h.


The documentation for this class was generated from the following file: