class SpoofLocationService (Niantic.ARDK.LocationService.SpoofLocationService)

Overview

class SpoofLocationService: Niantic.ARDK.LocationService.ILocationService {
public:
    // properties

    LocationInfo LastData;
    LocationServiceStatus Status;

    // events

    event CompassUpdated();
    event LocationUpdated();
    event StatusUpdated();

    // methods

    void SetCompass(float trueHeading, double timestamp = double.NaN);

    void SetLocation(
        double latitude,
        double longitude,
        double altitude = double.NaN,
        double horizontalAccuracy = double.NaN,
        double verticalAccuracy = double.NaN
    );

    void SetLocation(LatLng coordinates);
    void SetStatus(LocationServiceStatus status);
    void Start();
    void Start(float desiredAccuracyInMeters, float updateDistanceInMeters);
    void StartTravel(double bearing, double distance, float speed);
    void StartTravel(LatLng destination, float speed);
    void Stop();
};

Inherited Members

public:
    // properties

    LocationInfo LastData;
    LocationServiceStatus Status;

    // events

    event CompassUpdated();
    event LocationUpdated();
    event StatusUpdated();

    // methods

    void Start();
    void Start(float desiredAccuracyInMeters, float updateDistanceInMeters);
    void Stop();

Detailed Documentation

Note

Will start near front of the Ferry Building in San Francisco, California, USA unless SetLocation is called before Start to specify a different starting location.

Methods

void Start()

Starts location service updates.

void StartTravel(double bearing, double distance, float speed)

Uses linear interpolation to travel from the current location to the specified location at a constant speed. Noticeable errors may appear when locations are close to the poles. Travel will only commence when the location service’s status is Running.

Parameters:

bearing

In degrees, clockwise from north

distance

In meters

speed

Meters per second

void Stop()

Stops location service updates. This could be useful for saving battery life.