cordova-plugin-geolocation icon indicating copy to clipboard operation
cordova-plugin-geolocation copied to clipboard

[CB-11462] Fixes the Coordinate speed and heading attribute to follow the w3c specification on all platforms

Open mlegenhausen opened this issue 9 years ago • 2 comments
trafficstars

iOS returns negative values for heading/course and speed when the values can not be determined. These values are exposed by the current API which leads to unwanted behavior of the API. This pull request adds extra checks to the Coordinates object and makes sure speed and heading can only have values defined in the W3C Geolocation API Specification.

See also:

  • https://dev.w3.org/geo/api/spec-source.html#heading
  • https://dev.w3.org/geo/api/spec-source.html#speed
  • https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/#//apple_ref/occ/instp/CLLocation/course
  • https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/#//apple_ref/occ/instp/CLLocation/speed

Platforms affected

Primary iOS. Fixes all invalid values provided by other platforms.

What does this PR do?

Makes sure the resulting Coordinates object follows the W3C specification.

What testing has been done on this change?

Tested on iOS.

Checklist

  • [x] ICLA has been signed and submitted to [email protected].
  • [x] Reported an issue in the JIRA database
  • [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • [ ] Added automated test coverage as appropriate for this change.

mlegenhausen avatar Jun 21 '16 08:06 mlegenhausen

Cordova CI Build has completed successfully.

Commit - Link Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Link Link Link

cordova-qa avatar Jun 21 '16 08:06 cordova-qa

Cordova CI Build has completed successfully.

Commit - Link Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Link Link Link

cordova-qa avatar Jun 21 '16 08:06 cordova-qa

superceded by #270 which is a rebased version of this PR.

breautek avatar Sep 15 '23 02:09 breautek