MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
Instance Methods | Class Methods | List of all members
MPPoint Class Reference

#include <MPPoint.h>

Inheritance diagram for MPPoint:
MPGeometry

Instance Methods

(id) - initWithLat:lon:
 
(id) - initWithLat:lon:zValue:
 
(double) - lat
 
(double) - lng
 
(double) - z
 
(int) - zIndex
 
(void) - setZValue:
 
(double) - distanceTo:
 
(nonnull NSString *) - latLngString
 
(CLLocationCoordinate2D) - getCoordinate
 

Class Methods

(nullable MPPoint *) + parse:
 

Additional Inherited Members

- Properties inherited from MPGeometry
NSString< Optional > * type
 
NSArray * coordinates
 
NSArray< NSNumber * >< Optional > * bbox
 

Detailed Description

Basic point geometry class.

Method Documentation

◆ distanceTo:

- (double) distanceTo: (nonnull MPPoint *) point

Calculate the 2d geographic distance to another point.

◆ getCoordinate

- (CLLocationCoordinate2D) getCoordinate

Get a CoreLocation coordinate struct representation of the MPPoint

Returns
A 2d coordinate struct

◆ initWithLat:lon:

- (id) initWithLat: (double) latitude
lon: (double) longitude 

Regular geographic point geometry initialization.

◆ initWithLat:lon:zValue:

- (id) initWithLat: (double) latitude
lon: (double) longitude
zValue: (double) z 

Indoor geographic point geometry initialization.

◆ lat

- (double) lat

Get the latitude component.

◆ latLngString

- (nonnull NSString *) latLngString

Get latitude/logitude value as a string

Returns
Latitude/logitude as comma separated string

◆ lng

- (double) lng

Get the longitude component.

◆ parse:

+ (nullable MPPoint *) parse: (nonnull NSString *) coordinate

Static MPPoint builder. Parses a comma separated string an returns an MPPoint instance.

Parameters
coordinateLatitude, longitude, floor as a comma separated string
Returns
The resulting MPPoint instance

◆ setZValue:

- (void) setZValue: (double) z

Set the z / floorIndex component.

◆ z

- (double) z

Get the z / floorIndex component.

◆ zIndex

- (int) zIndex

Get the z / floorIndex component as a rounded index.