fake-geolocation
    Preparing search index...

    Interface UserParameters

    Parameters for creating a virtual user.

    createUser to create a virtual user.

    interface UserParameters {
        createCoordinates?: (
            params: Partial<
                {
                    accuracy: number;
                    altitude: null
                    | number;
                    altitudeAccuracy: null | number;
                    heading: null | number;
                    latitude: number;
                    longitude: number;
                    speed: null | number;
                },
            >,
        ) => GeolocationCoordinates;
        handleAccessRequest?: HandleAccessRequest;
        locationServices: MutableLocationServices;
        lowAccuracyTransform?: (
            coords: GeolocationCoordinates,
        ) => GeolocationCoordinates;
        permissionStore: PermissionStore;
    }

    Hierarchy

    Index

    Properties

    createCoordinates?: (
        params: Partial<
            {
                accuracy: number;
                altitude: null
                | number;
                altitudeAccuracy: null | number;
                heading: null | number;
                latitude: number;
                longitude: number;
                speed: null | number;
            },
        >,
    ) => GeolocationCoordinates

    A factory function to create coordinates objects.

    Type declaration

      • (
            params: Partial<
                {
                    accuracy: number;
                    altitude: null
                    | number;
                    altitudeAccuracy: null | number;
                    heading: null | number;
                    latitude: number;
                    longitude: number;
                    speed: null | number;
                },
            >,
        ): GeolocationCoordinates
      • Parameters

        • params: Partial<
              {
                  accuracy: number;
                  altitude: null
                  | number;
                  altitudeAccuracy: null | number;
                  heading: null | number;
                  latitude: number;
                  longitude: number;
                  speed: null | number;
              },
          >

          The parameters to use.

        Returns GeolocationCoordinates

        The coordinates object.

    A function that behaves like createCoordinates, except that accuracy defaults to 10 meters.

    handleAccessRequest?: HandleAccessRequest

    The handler to use for permission access requests.

    If omitted, permission access requests will be immediately dismissed.

    async () => {}

    locationServices: MutableLocationServices

    The location services to use.

    lowAccuracyTransform?: (
        coords: GeolocationCoordinates,
    ) => GeolocationCoordinates

    A function to transform high accuracy coordinates to low accuracy coordinates.

    Type declaration

    (coords) => coords

    permissionStore: PermissionStore

    The permission store to use.