Loading...
Searching...
No Matches

A point at the specified WGS84 coordinates. More...

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

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithLatitude:longitude:
 Default constructor for class NCGlobalPoint.
 

Class Methods

(nonnull instancetype) + globalPointWithLatitude:longitude:
 Factory method for class NCGlobalPoint.
 

Properties

double latitude
 point's latitude.
 
double longitude
 point's longitude.
 

Detailed Description

A point at the specified WGS84 coordinates.

Referenced from GeometryUtils, NavigationManager, Position, Sublocation.

Swift code snippet:

// Create global points with latitude, longitude
let globalPoint1 = GlobalPoint(latitude: 55.7558, longitude: 37.6176) // Moscow
let globalPoint2 = GlobalPoint(latitude: 59.9311, longitude: 30.3609) // St. Petersburg
let globalPoint3 = GlobalPoint(latitude: 55.7522, longitude: 37.6156) // Moscow center
print("Created global points: GP1(\‍(globalPoint1.latitude), \‍(globalPoint1.longitude)), GP2(\‍(globalPoint2.latitude), \‍(globalPoint2.longitude))")

Objective C code snippet:

// Create global points with latitude, longitude
NCGlobalPoint *globalPoint1 = [[NCGlobalPoint alloc] initWithLatitude:55.7558 longitude:37.6176]; // Moscow
NCGlobalPoint *globalPoint2 = [[NCGlobalPoint alloc] initWithLatitude:59.9311 longitude:30.3609]; // St. Petersburg
NCGlobalPoint *globalPoint3 = [[NCGlobalPoint alloc] initWithLatitude:55.7522 longitude:37.6156]; // Moscow center
NSLog(@"Created global points: GP1(%.4f, %.4f), GP2(%.4f, %.4f)",
globalPoint1.latitude, globalPoint1.longitude, globalPoint2.latitude, globalPoint2.longitude);

Definition at line 26 of file NCGlobalPoint.h.

Method Documentation

◆ globalPointWithLatitude:longitude:

+ (nonnull instancetype) globalPointWithLatitude: (double) latitude
longitude: (double) longitude 

Factory method for class NCGlobalPoint.

◆ initWithLatitude:longitude:

- (nonnull instancetype) initWithLatitude: (double) latitude
longitude: (double) longitude 

Default constructor for class NCGlobalPoint.

Property Documentation

◆ latitude

- (double) latitude
readnonatomicassign

point's latitude.

Swift code snippet:

// Get latitude
let lat1 = globalPoint1.latitude
print("GlobalPoint1 latitude: \‍(lat1)")

Objective C code snippet:

// Get latitude
double lat1 = globalPoint1.latitude;
NSLog(@"GlobalPoint1 latitude: %.4f", lat1);

Definition at line 52 of file NCGlobalPoint.h.

◆ longitude

- (double) longitude
readnonatomicassign

point's longitude.

Swift code snippet:

// Get longitude
let lon1 = globalPoint1.longitude
print("GlobalPoint1 longitude: \‍(lon1)")

Objective C code snippet:

// Get longitude
double lon1 = globalPoint1.longitude;
NSLog(@"GlobalPoint1 longitude: %.4f", lon1);

Definition at line 66 of file NCGlobalPoint.h.


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