Skip to content

Commit 235d7ef

Browse files
committed
forcing geolocation
1 parent b465415 commit 235d7ef

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

src/App.jsx

Lines changed: 40 additions & 19 deletions
Large diffs are not rendered by default.

src/components/routes/RoutePage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ function RoutePage() {
103103
}, [bottomRef, pointsOfInterest]);
104104

105105
function deviceOrientationHandler(e) {
106+
navigator.geolocation.getCurrentPosition(locationHandler);
106107
setTimeout(() => {
107-
navigator.geolocation.getCurrentPosition(locationHandler);
108108
const orientaionValue = e.webkitCompassHeading || Math.abs(e.alpha - 360);
109109
setOrientation(orientaionValue);
110110
}, 3000);

0 commit comments

Comments
 (0)