BDPoint
Objective-C
@interface BDPoint : BDGeometry <NSCopying, NSSecureCoding>
Swift
class BDPoint : BDGeometry, NSCopying, NSSecureCoding
A geographic point expressed in latitude and longitude coordinates.
-
Convenience constructor to create a
BDPoint“point” with a longitude and latitude, in degrees.Declaration
Objective-C
+ (instancetype)pointWithLongitude:(BDLocationDegrees)longitude latitude:(BDLocationDegrees)latitude;Parameters
longitudeThe longitude in degrees. Values should be in the range -180 < 0 <= 180.
latitudeThe latitude in degrees. Values should be in the range -90 < 0 <= 90.
-
Initializes a point with values for for longitude and latitude, in degrees.
Declaration
Objective-C
- (instancetype)initWithLongitude:(BDLocationDegrees)longitude latitude:(BDLocationDegrees)latitude;Swift
init!(longitude: BDLocationDegrees, latitude: BDLocationDegrees)Parameters
longitudeThe longitude in degrees. Values should be in the range -180 < 0 <= 180.
latitudeThe latitude in degrees. Values should be in the range -90 < 0 <= 90.
-
Initializes a point with longitude and latitude in degrees.
Declaration
Objective-C
- (instancetype)initWithCoordinate:(BDLocationCoordinate2D)coordinate;Swift
init!(coordinate: BDLocationCoordinate2D)Parameters
coordinateThe coordinate as a Core Location structure.
-
@returns a string representation of this points’ degrees latitude, e.g. “12.34°”
Declaration
Objective-C
- (NSString *)latitudeString;Swift
func latitudeString() -> String! -
@returns a string representation of this points’ degrees longitude, e.g. “359.99°”
Declaration
Objective-C
- (NSString *)longitudeString;Swift
func longitudeString() -> String! -
The longitudinal component of this points location, in the range -180 < 0 <= 180 degrees.
Declaration
Objective-C
@property (nonatomic) BDLocationDegrees longitude;Swift
var longitude: BDLocationDegrees { get set } -
The latitudinal component of this points location, in the range -90 < 0 <= 90 degrees.
Declaration
Objective-C
@property (nonatomic) BDLocationDegrees latitude;Swift
var latitude: BDLocationDegrees { get set } -
This points location, expressed as a BDLocationCoordinate2D structure.
Declaration
Objective-C
@property (nonatomic, readonly) BDLocationCoordinate2D coordinate;Swift
var coordinate: BDLocationCoordinate2D { get } -
Declaration
Objective-C
- (CGPoint)cgPoint;Swift
func cgPoint() -> CGPointReturn Value
A CGPoint with longitude/latitude in degrees for the x/y coordinates.
-
Declaration
Objective-C
- (BOOL)isEqualToPoint:(BDPoint *)point;Swift
func isEqual(to point: BDPoint!) -> BoolReturn Value
YES if current point and the passing point have the same latitude and longitude.
-
@returns YES if the point is at 0 degrees latitude and longitude. NO otherwise.
Declaration
Objective-C
- (BOOL)isOrigin;Swift
func isOrigin() -> Bool
View on GitHub
Install in Dash