SPLocation
Objective-C
@interface SPLocation : CLLocation
Swift
class SPLocation : CLLocation
Extends CLLocation with extra metadata.
-
Recommended constructor for SPLocation objects
Declaration
Objective-C
- (nonnull instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate floor:(NSInteger)floor horizontalAccuracy:(CLLocationAccuracy)hAccuracy course:(CLLocationDirection)course source:(SPLocationSource)source;Swift
init(coordinate: CLLocationCoordinate2D, floor: Int, horizontalAccuracy hAccuracy: CLLocationAccuracy, course: CLLocationDirection, source: SPLocationSource)Parameters
coordinateGPS coordinate
floorindex
hAccuracyhorizontal accuracy
coursedegrees
sourcelocation provider
Return Value
new instance of SPLocation
-
Constructor for SPLocation objects.
Declaration
Objective-C
- (nonnull instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate floor:(NSInteger)floor horizontalAccuracy:(CLLocationAccuracy)hAccuracy course:(CLLocationDirection)course;Swift
init(coordinate: CLLocationCoordinate2D, floor: Int, horizontalAccuracy hAccuracy: CLLocationAccuracy, course: CLLocationDirection)Parameters
coordinateGPS coordinate
floorindex
hAccuracyhorizontal accuracy
coursedegrees
Return Value
new instance of SPLocation
-
Unique identifier for a building if location is determined to be inside a known building.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *building;Swift
var building: String? { get set } -
Use this to store any extra information about a location.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *info;Swift
var info: String? { get set } -
Use this to store any properties about a location.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSDictionary *properties;Swift
var properties: [AnyHashable : Any]? { get set } -
Modify the location source.
Declaration
Objective-C
- (void)setSource:(SPLocationSource)source;Swift
func setSource(_ source: SPLocationSource)Parameters
sourcenew source type
-
The source where this location was received. If no source was provided when the object was initialized, this will return ‘unknown’ by default.
Return Value
source location source type
-
Used for debug information.
Declaration
Objective-C
- (void)setDebugData:(nonnull void *)data;Swift
func setDebugData(_ data: UnsafeMutableRawPointer)Parameters
datacontaining debug information
SPLocation Class Reference