From 7bf4bea79d7073e647d4a488883500409acd1bda Mon Sep 17 00:00:00 2001 From: Alexander Harding <2166114+aeharding@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:48:28 -0500 Subject: [PATCH] fix build --- src/services/position.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/services/position.ts b/src/services/position.ts index 5c347ad..41278b1 100644 --- a/src/services/position.ts +++ b/src/services/position.ts @@ -3,24 +3,9 @@ export function getPosition( ): Promise { return new Promise((resolve, reject) => navigator.geolocation.getCurrentPosition( - (pos) => resolve(objectify(pos)), + (pos) => resolve(pos.toJSON()), reject, options, ), ); } - -function objectify(geoposition: GeolocationPosition): GeolocationPosition { - return { - timestamp: geoposition.timestamp, - coords: { - accuracy: geoposition.coords.accuracy, - altitude: geoposition.coords.altitude, - altitudeAccuracy: geoposition.coords.altitudeAccuracy, - heading: geoposition.coords.heading, - latitude: geoposition.coords.latitude, - longitude: geoposition.coords.longitude, - speed: geoposition.coords.speed, - }, - }; -}