IGLocation

@interface IGLocation : CLLocation

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.

  • Initializes and returns an instance of IGLocation with the specified CLLocation object and motionState.

    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.

    Declaration

    Objective-C

    + (IGLocation *)igLocationFromCLLocation:(CLLocation *)clLocation
                              andMotionState:(IGMotionState)state;

    Parameters

    clLocation

    input IGLocation object

    state

    motion state to be registered into the resulting IGLocation object

  • Returns the timestamp when this location was determined in unix time format (epoch)

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSTimeInterval unixTimestamp;
  • Returns the latitude of the location (in degrees)

    Declaration

    Objective-C

    @property (readonly, nonatomic) double latitude;
  • Returns the longitude of the location (in degrees)

    Declaration

    Objective-C

    @property (readonly, nonatomic) double longitude;
  • Returns the speed of the location in meters per second. Negative if speed is invalid.

    speed attribute provided by IGLocation is far more accurate than speed attribue provided by Apple’s CLLocation

    Declaration

    Objective-C

    - (CLLocationSpeed)speed;
  • True if IGLocation object was created during background app mode

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL createdInBG;
  • The user’s motion state on which this location was generated

    Declaration

    Objective-C

    @property (readonly, nonatomic) IGMotionState motionState;
  • Convinient method to retrieve a describing string from a IGMotionState numeric value

    Declaration

    Objective-C

    + (NSString *)stringForMotionState:(IGMotionState)motion;

    Parameters

    motion

    IGMotionState