You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "fudom (via GitHub)" <gi...@apache.org> on 2024/03/22 12:47:36 UTC
[I] Heading is set to NaN if speed is 0 or null. [cordova-plugin-geolocation]
fudom opened a new issue, #274:
URL: https://github.com/apache/cordova-plugin-geolocation/issues/274
https://github.com/apache/cordova-plugin-geolocation/blob/09e3d893b95838764e8b2d5b7052ff940704fe78/www/Coordinates.js#L53-L61
Why? Why not just let heading as it is? And why `NaN` and not `null`. I don't know what the (raw) heading value is on speed 0 or null. But the user can decide to don't use heading if speed is not set. It's just a code review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Heading is set to NaN if speed is 0 or null. [cordova-plugin-geolocation]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #274:
URL: https://github.com/apache/cordova-plugin-geolocation/issues/274#issuecomment-2015042556
> Initialize coord's [heading](https://www.w3.org/TR/geolocation/#dom-geolocationcoordinates-heading) attribute in degrees, or null if the implementation cannot provide heading information. If the hosting device is stationary (i.e., the value of the [speed](https://www.w3.org/TR/geolocation/#dom-geolocationcoordinates-speed) attribute is 0), then initialize the [heading](https://www.w3.org/TR/geolocation/#dom-geolocationcoordinates-heading) to NaN.
https://www.w3.org/TR/geolocation/#constructing-a-geolocationposition
The `this.speed === null` might not be according to spec, but if speed is 0, then the device is stationary and by spec heading should be `NaN`, which will match browser implementations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Heading is set to NaN if speed is 0 or null. [cordova-plugin-geolocation]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #274: Heading is set to NaN if speed is 0 or null.
URL: https://github.com/apache/cordova-plugin-geolocation/issues/274
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org