PROJLocationCoordinate3D

Objective-C

@interface PROJLocationCoordinate3D : NSObject

Swift

class PROJLocationCoordinate3D : NSObject

3D Location Coordinate

  • Location Coordinate

    Declaration

    Objective-C

    @property (nonatomic) CLLocationCoordinate2D coordinate;

    Swift

    var coordinate: CLLocationCoordinate2D { get set }
  • z

    Z Altitude

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDecimalNumber *z;

    Swift

    var z: NSDecimalNumber! { get set }
  • Initialize as 2D coordinate

    Declaration

    Objective-C

    + (PROJLocationCoordinate3D *)coordinateWithCoordinate:
        (CLLocationCoordinate2D)coordinate;

    Swift

    class func coordinate(with coordinate: CLLocationCoordinate2D) -> PROJLocationCoordinate3D!

    Parameters

    coordinate

    coordinate

    Return Value

    new coordinate

  • Initialize as 2D or 3D coordinate

    Declaration

    Objective-C

    + (PROJLocationCoordinate3D *)coordinateWithCoordinate:
                                      (CLLocationCoordinate2D)coordinate
                                                      andZ:(NSDecimalNumber *)z;

    Swift

    class func coordinate(with coordinate: CLLocationCoordinate2D, andZ z: NSDecimalNumber!) -> PROJLocationCoordinate3D!

    Parameters

    coordinate

    coorindate

    z

    z coordinate

    Return Value

    new coordinate

  • Initialize as 2D coordinate

    Declaration

    Objective-C

    - (instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate;

    Swift

    init!(coordinate: CLLocationCoordinate2D)

    Parameters

    coordinate

    coordinate

    Return Value

    new coordinate

  • Initialize as 2D or 3D coordinate

    Declaration

    Objective-C

    - (instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate
                                  andZ:(NSDecimalNumber *)z;

    Swift

    init!(coordinate: CLLocationCoordinate2D, andZ z: NSDecimalNumber!)

    Parameters

    coordinate

    coorindate

    z

    z coordinate

    Return Value

    new coordinate

  • Has z coordinate?

    Declaration

    Objective-C

    - (BOOL)hasZ;

    Swift

    func hasZ() -> Bool

    Return Value

    true if 3D, false if 2D