← Back to context

Comment by flanbiscuit

5 years ago

> Magnetometer API - Allows websites to access data about the local magnetic field around a user, as detected by the device's primary magnetometer sensor.

I have never heard of this API, what's a use case for it?

If you had access to the magnetometer, you could make a navigation compass. Or, you could animate a map to rotate as the phone rotates. It might be good for implementing a GeoCaching helper app as a website.

The same as with native apps, sensing the device's orientation. For AR, navigation, what have you.