Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 609c1b0 commit b80fe3cCopy full SHA for b80fe3c
21 - Geolocation/index-START.html
@@ -57,6 +57,14 @@ <h1 class="speed">
57
/*Compass: https://thenounproject.com/search/?q=compass&i=592352*/
58
</style>
59
<script>
60
+ const arrow = document.querySelector('.arrow');
61
+ const speed = document.querySelector('.speed-value');
62
+ navigator.geolocation.watchPosition((data) => {
63
+ console.log(data);
64
+ speed.textContent = data.coords.speed;
65
+ arrow.style.transform = `rotate(${data.coords.heading}deg)`;
66
+ })
67
+
68
</script>
69
</body>
70
</html>
0 commit comments