79591039

Date: 2025-04-24 16:03:19
Score: 1
Natty:
Report link

the GeolocationCoordinates object returned by Geolocation API already contains calculated speed property. So that before calculating anything by a custom code you can just check whether the speed was returned and if so, then just use it.

Although it is not mandatory for a browser to return it, on modern phones with modern browsers it is usually returned.

https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/speed

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Dmitriy Buldakov