MPPoint

@interface MPPoint : MPGeometry

Basic point geometry class.

  • Regular geographic point geometry initialization.

    Declaration

    Objective-C

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

    Swift

    init!(lat latitude: Double, lon longitude: Double)
  • Indoor geographic point geometry initialization.

    Declaration

    Objective-C

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

    Swift

    init!(lat latitude: Double, lon longitude: Double, zValue z: Double)
  • Get the latitude component.

    Declaration

    Objective-C

    - (double)lat;

    Swift

    func lat() -> Double
  • Get the longitude component.

    Declaration

    Objective-C

    - (double)lng;

    Swift

    func lng() -> Double
  • -z

    Get the z / floorIndex component.

    Declaration

    Objective-C

    - (double)z;

    Swift

    func z() -> Double
  • Get the z / floorIndex component as a rounded index.

    Declaration

    Objective-C

    - (int)zIndex;

    Swift

    func zIndex() -> Int32
  • Set the z / floorIndex component.

    Declaration

    Objective-C

    - (void)setZValue:(double)z;

    Swift

    func setZValue(_ z: Double)
  • Calculate the 2d geographic distance to another point.

    Declaration

    Objective-C

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

    Swift

    func distance(to point: MPPoint!) -> Double
  • Get latitude/logitude value as a string

    Declaration

    Objective-C

    - (NSString *)latLngString;

    Swift

    func latLngString() -> String!

    Return Value

    Latitude/logitude as comma separated string

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

    Declaration

    Objective-C

    + (MPPoint *)parse:(NSString *)coordinate;

    Swift

    class func parse(_ coordinate: String!) -> MPPoint!

    Parameters

    coordinate

    Latitude, longitude, floor as a comma separated string

    Return Value

    The resulting MPPoint instance

  • Get a CoreLocation coordinate struct representation of the MPPoint

    Declaration

    Objective-C

    - (CLLocationCoordinate2D)getCoordinate;

    Swift

    func getCoordinate() -> CLLocationCoordinate2D

    Return Value

    A 2d coordinate struct