IGLocation Class Reference
Inherits from | CLLocation |
---|---|
Declared in | IGLocation.h |
Overview
IGLocation is a CLLocation subclass with additional information generated by IngeoSDK.
A IGLocation object represents the location data generated by a IGLocationManager object.
This object incorporates the geographical coordinates and altitude of the device’s location
along with values indicating the accuracy of the measurements and when those measurements were made.
The user Motion State (see motionState
) provided by IGLocation represents the physical activity of
the user (Standing, Started moving, Walking, Driving slow or Driving fast) while this measurements were made.
Initialize
+ igLocationFromCLLocation:andMotionState:
Initializes and returns an instance of IGLocation with the specified CLLocation object and motionState.
+ (IGLocation *)igLocationFromCLLocation:(CLLocation *)clLocation andMotionState:(IGMotionState)state
Parameters
clLocation |
input IGLocation object |
---|---|
state |
motion state to be registered into the resulting IGLocation object |
Discussion
Typically, you acquire IGLocation objects from the IGLocationManager service, but you can use this method to create new IGLocation objects for other uses in your application.
Declared In
IGLocation.h
Location Attributes
unixTimestamp
Returns the timestamp when this location was determined in unix time format (epoch)
@property (readonly, nonatomic) NSTimeInterval unixTimestamp
Declared In
IGLocation.h
latitude
Returns the latitude of the location (in degrees)
@property (readonly, nonatomic) double latitude
Declared In
IGLocation.h
longitude
Returns the longitude of the location (in degrees)
@property (readonly, nonatomic) double longitude
Declared In
IGLocation.h
– speed
Returns the speed of the location in meters per second. Negative if speed is invalid.
- (CLLocationSpeed)speed
Discussion
speed attribute provided by IGLocation is far more accurate than speed attribue provided by Apple’s CLLocation
Declared In
IGLocation.h
createdInBG
True if IGLocation object was created during background app mode
@property (readonly, nonatomic) BOOL createdInBG
Declared In
IGLocation.h
motionState
The user’s motion state on which this location was generated
@property (readonly, nonatomic) IGMotionState motionState
Declared In
IGLocation.h
Helper Methods
+ stringForMotionState:
Convinient method to retrieve a describing string from a IGMotionState numeric value
+ (NSString *)stringForMotionState:(IGMotionState)motion
Parameters
motion |
---|
Declared In
IGLocation.h