VMLocationsManager Class Reference
Inherits from | VMRequestManager : NSObject |
Declared in | VMLocationsManager.h VMLocationsManager.m |
Overview
VMLocationsManager
is a subclass of VMRequestManager
providing methods for getting the states and cities lists. This API should be used to select a location if gps/network location is not available on mobile device.
Tasks
-
currentLocation
Current location.
property -
isUpdatingLocation
Read-only variable showing if location is being updated: YES if the location is being updated, else NO.
property -
updateLocationTimeInterval
Read-only variable showing the Time interval for updating location.
property -
+ sharedInstance
Returns the shared locations manager object for the system.
-
– statesListWithCompletionBlock:failBlock:
Provides a list of all States.
-
– citiesListWithCompletionBlock:failBlock:
Provides a list of all Cities.
-
– stopLocation
Stop updating locations.
-
– startLocation
Start updating locations.
-
– startLocationWithCompletionBlock:failBlock:
Start updating locations.
-
– setUpdateLocation:
Set block called on successful location update
-
– setUpdateErrorBlock:
Set block called on errorreceived when updating location
-
– setUpdateActivityLocation:
Set block called on adding current location to activity batch
Properties
currentLocation
Current location.
@property (readonly, nonatomic, strong) CLLocation *currentLocation
Declared In
VMLocationsManager.h
Instance Methods
citiesListWithCompletionBlock:failBlock:
Provides a list of all Cities.
- (VMHTTPRequestOperation *)citiesListWithCompletionBlock:(ObjectBlock)completionBlock failBlock:(ErrorBlock)errorBlock
Parameters
- completionBlock
The block to be executed on the completion of a successful request. This block has no return value and takes one argument: the object constructed from the response data of the request.
- errorBlock
The block to be executed on the completion of an unsuccessful request. This block has no return value and takes one argument: the error that occurred during the request.
Return Value
A new request operation.
Declared In
VMLocationsManager.h
setUpdateActivityLocation:
Set block called on adding current location to activity batch
- (void)setUpdateActivityLocation:(ObjectBlock)updateActivityLocationBlock
Parameters
- updateActivityLocationBlock
block called on adding current location to activity batch
Declared In
VMLocationsManager.h
setUpdateErrorBlock:
Set block called on errorreceived when updating location
- (void)setUpdateErrorBlock:(ErrorBlock)errorBlock
Parameters
- errorBlock
block called on errorreceived when updating location
Declared In
VMLocationsManager.h
setUpdateLocation:
Set block called on successful location update
- (void)setUpdateLocation:(ObjectBlock)updateLocationBlock
Parameters
- updateLocationBlock
block called on successful location update
Declared In
VMLocationsManager.h
startLocationWithCompletionBlock:failBlock:
Start updating locations.
- (void)startLocationWithCompletionBlock:(ObjectBlock)updateLocationBlock failBlock:(ErrorBlock)errorBlock
Parameters
- updateLocationBlock
block called on successful location update
- errorBlock
block called on errorreceived when updating location
Declared In
VMLocationsManager.h
statesListWithCompletionBlock:failBlock:
Provides a list of all States.
- (VMHTTPRequestOperation *)statesListWithCompletionBlock:(ObjectBlock)completionBlock failBlock:(ErrorBlock)errorBlock
Parameters
- completionBlock
The block to be executed on the completion of a successful request. This block has no return value and takes one argument: the object constructed from the response data of the request.
- errorBlock
The block to be executed on the completion of an unsuccessful request. This block has no return value and takes one argument: the error that occurred during the request.
Return Value
A new request operation.
Declared In
VMLocationsManager.h