fake-geolocation
    Preparing search index...

    Function createPosition

    • Create a fake W3C GeolocationPosition object.

      Parameters

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

        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.