PWSLLocationManager Class Reference
Inherits from | NSObject |
---|---|
Conforms to | PWLocationManager |
Declared in | PWSLLocationManager.h |
Overview
The PWSLLocationManager
class defines the interface for configuring the delivery of BLE location-related events to your application. You use an instance of this class to establish the parameters that determine when location events should be delivered and to start and stop the actual delivery of those events. This class conforms to the PWLocationManager
protocol.
Determining Availability of Services
location
The last indoor location received.
@property (nonatomic, readonly) PWIndoorLocation *location
Declared In
PWSLLocationManager.h
floorIDMapping
The floor ID mapping dictionary used to define the mapping between the location provider floor ID and the Phunware floor ID. The dictionary format must adhere to the following format: @{CUSTOMER_FLOORID : PHUNWARE_FLOOR_ID}
.
@property (nonatomic, strong) NSDictionary *floorIDMapping
Declared In
PWSLLocationManager.h
mapID
The map identifier obtained from Phunware. (read-only)
@property (nonatomic, readonly) NSString *mapID
Declared In
PWSLLocationManager.h
customerID
The customer identifier obtained from Phunware (read-only)
@property (nonatomic, readonly) NSString *customerID
Declared In
PWSLLocationManager.h
– initWithMapIdentifier:customerIdentifier:location:
- (instancetype)initWithMapIdentifier:(NSString *)mapID customerIdentifier:(NSString *)customerID location:(CLLocationCoordinate2D)venueLocation
Parameters
mapID |
|
---|---|
customerID |
|
venueLocation |
|
Return Value
The location manager object.
Discussion
If the device is not within 5 kilometers of the venue location, location updates will fail.
Declared In
PWSLLocationManager.h
– initWithMapIdentifier:customerIdentifier:
Initializes the location manager with the specified map identifier and customer identifier.
- (instancetype)initWithMapIdentifier:(NSString *)mapID customerIdentifier:(NSString *)customerID
Parameters
mapID |
|
---|---|
customerID |
|
Return Value
The location manager object.
Discussion
If the device is not within 5 kilometers of the venue location, location updates will fail.
Declared In
PWSLLocationManager.h
– locationServicesAvailable
Returns a Boolean value indicating whether location services are enabled on the device.
- (BOOL)locationServicesAvailable
Discussion
In order to fetch the user’s location, the manager must be within proximity of the venue and have retrieved specific device information from Phunware’s servers.
Declared In
PWLocationManager.h
– startUpdatingLocation
Starts the generation of updates that report the user’s current location.
- (void)startUpdatingLocation
Discussion
This method returns immediately. Calling this method causes the location manager to obtain an initial location fix (which may take several seconds) and notify your delegate by calling its locationManager:didUpdateToLocation:
method.
Declared In
PWLocationManager.h
– stopUpdatingLocation
Stops the generation of location updates.
- (void)stopUpdatingLocation
Discussion
Call this method whenever your code no longer needs to receive location-related events. Disabling event delivery gives the receiver the option of disabling the appropriate hardware (and thereby saving power) when no clients need location data. You can always restart the generation of location updates by calling the startUpdatingLocation
method again.
Declared In
PWLocationManager.h