DEV Community


Discussion on: Real Compass on mobile browsers with Javascript

emiltoteb profile image
Emil Totev

Hey, thank you for the great tutorial! I've got it working flawlessly on iOS, but there appears to be an issue on Android - North is always in the direction the phone is pointing when the page loads, and if you're not looking north, all the directions are miscalculated. Have you faced this issue and were you able to overcome it?

orkhanjafarovr profile image
Orkhan Jafarov Author

I hope your Android device was using GPS with high accuracy mode. If not it will not work as expected. Try to get or debug heading value from geolocation or compassHeading. I didn’t faced this issue on Android