BuiltLocation Class Reference

Inherits from NSObject
Declared in BuiltLocation.h

Overview

Location represents a geological location.

Properties

  longitude

Longitude of the location in degrees

@property (nonatomic, assign) double longitude

Discussion

 //Obj-C
 BuiltLocation *locationObject = [BuiltLocation locationWithLongitude:19.48571 andLatitude:72.04571];
 double longitude = locationObject.longitude;

 //Swift
 var locationObject:BuiltLocation = BuiltLocation(longitude:19.48571, andLatitude:72.04571)
 locationObject.longitude

Declared In

BuiltLocation.h

  latitude

Latitude of the location in degrees

@property (nonatomic, assign) double latitude

Discussion

 //Obj-C
 BuiltLocation *locationObject = [BuiltLocation locationWithLongitude:19.48571 andLatitude:72.04571];
 double latitude = locationObject.latitude;

 //Swift
 var locationObject:BuiltLocation = BuiltLocation(longitude:19.48571, andLatitude:72.04571)
 locationObject.latitude

Declared In

BuiltLocation.h

BuiltLocation Instance

+ locationWithLongitude:andLatitude:

Returns a BuiltLocation object for the given longitude and latitude

+ (BuiltLocation *)locationWithLongitude:(double)longitude andLatitude:(double)latitude

Parameters

longitude

longitude of the location in degrees

latitude

latitude of the location in degrees

Return Value

BuiltLocation object with the given longitude and latitude

Discussion

 //Obj-C
 BuiltLocation *locationObject = [BuiltLocation locationWithLongitude:19.48571 andLatitude:72.04571];


 //Swift
 var locationObject:BuiltLocation = BuiltLocation(longitude:19.48571, andLatitude:72.04571)

Declared In

BuiltLocation.h

Current Location

+ currentLocationOnCompletion:

Gets the current location and returns as in BuiltLocation object.

+ (void)currentLocationOnCompletion:(void ( ^ ) ( BuiltLocation *BUILT_NULLABLE_P currentLocation , NSError *BUILT_NULLABLE_P error ))completionBlock

Parameters

completionBlock

Completion block with params current location and error object in any.

Discussion

 //Obj-C
 [BuiltLocation currentLocationOnCompletion:^(BuiltLocation *currentLocation, NSError *error) {
     double latitude = currentLocation.latitude;
     double longitude = currentLocation.longitude;
 }];

 //Swift
 BuiltLocation.currentLocationOnCompletion { (BuiltLocation!, NSError!) -> Void in
     var latitude:Double = BuiltLocation.latitude
     var longitude:Double = BuiltLocation.longitude
 }

Declared In

BuiltLocation.h