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

Inherits <NSObject>.

Instance Methods

(nullable instancetype) - NS_UNAVAILABLE
 
(nullable instancetype) - initWithCoordinates:
 
(nullable instancetype) - initWithCoordinates:course:
 
(nullable instancetype) - initWithCoordinates:altitude:
 
(nullable instancetype) - initWithCoordinates:altitude:course:
 

Class Methods

(nullable instancetype) + NS_UNAVAILABLE
 

Properties

BOOL snapped
 
NMMapCoordinatescoordinates
 
NSNumber * altitude
 
float course
 

Detailed Description

Interface describing geo position.

Method Documentation

◆ initWithCoordinates:()

- (nullable instancetype) initWithCoordinates: (nonnull NMMapCoordinates *)  coordinates

Initializes object with specified coordinates. In that case #altidude property returns 'nil', course property returns default -1.0f value. Position is not snapped, therefore snapped property returns 'NO'.

Parameters
coordinates@nonnull Position geo coordinates.

◆ initWithCoordinates:altitude:()

- (nullable instancetype) initWithCoordinates: (nonnull NMMapCoordinates *)  coordinates
altitude: (nonnull NSNumber *)  altitude 

Initializes object with specified coordinates and altitude. In that case course property returns default -1.0f value. Position is not snapped, therefore snapped property returns 'NO'.

Parameters
coordinates@nonnull Position geo coordinates;
altitude@nonnull Position altidute in meters.

◆ initWithCoordinates:altitude:course:()

- (nullable instancetype) initWithCoordinates: (nonnull NMMapCoordinates *)  coordinates
altitude: (nonnull NSNumber *)  altitude
course: (float)  course 

Initializes object with specified coordinates, altitude and course. Position is not snapped, therefore snapped property returns 'NO'.

Parameters
coordinates@nonnull Position geo coordinates;
altitude@nonnull Position altidute in meters;
coursePosition course from North clockwise. [0...360).

◆ initWithCoordinates:course:()

- (nullable instancetype) initWithCoordinates: (nonnull NMMapCoordinates *)  coordinates
course: (float)  course 

Initializes object with specified coordinates and course. In that case #altidude property returns 'nil'. Position is not snapped, therefore snapped property returns 'NO'.

Parameters
coordinates@nonnull Position geo coordinates;
coursePosition course from North clockwise. [0...360).

◆ NS_UNAVAILABLE() [1/2]

- (nullable instancetype) NS_UNAVAILABLE

Default initialization is forbidden.

◆ NS_UNAVAILABLE() [2/2]

+ (nullable instancetype) NS_UNAVAILABLE

Property Documentation

◆ altitude

- (NSNumber*) altitude
readnonatomicstrong

Geo position altitude. Returns 'nil' if altitude is not available.

◆ coordinates

- (NMMapCoordinates*) coordinates
readnonatomicstrong

Geo position coordinates.

◆ course

- (float) course
readnonatomicassign

Geo position course from North clockwise. [0..360). If course is not available -1.0f is returned.

◆ snapped

- (BOOL) snapped
readnonatomicassign

Indicates whether position considered as snapped. The only snapped position source is SDK, there's no way to initialize snapped position using public interface.