fake-geolocation
    Preparing search index...

    Function createPosition

    • Create a fake W3C GeolocationPosition object.

      Parameters

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

        The coordinates to use.

      • timestamp: number = 0

        The timestamp to use.

      • isHighAccuracy: boolean = true

        Whether the position should be considered "high accuracy".

      Returns GeolocationPosition

      The GeolocationPosition object.