Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

mlegenhausen
Copy link

@mlegenhausen mlegenhausen commented Jun 21, 2016

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:

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

  • ICLA has been signed and submitted to secretary@apache.org.
  • Reported an issue in the JIRA database
  • 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.

@cordova-qa
Copy link

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

@mlegenhausen mlegenhausen changed the title Fixes the Coordinate speed and heading attribute to follow the w3c specification on all platforms [CB-11462] Fixes the Coordinate speed and heading attribute to follow the w3c specification on all platforms Jun 21, 2016
Malte Legenhausen added 2 commits June 21, 2016 10:31
…tion.

Speed can have a negative value on iOS devices when the OS is not able to determine the current speed.
This is against the w3c specification. Which only allows null and a number value >= 0.

See the following links for further informations:

 * 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/speed
…cation.

Heading (course) can have a negative value on iOS devices when the OS is not able to determine the current heading.
This is against the w3c specification. Which only allows null and a number value >= 0 and <= 360.

See the following links for further informations:

 * https://dev.w3.org/geo/api/spec-source.html#heading
 * https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/#//apple_ref/occ/instp/CLLocation/course
@cordova-qa
Copy link

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

@janpio janpio added the bug label Sep 17, 2018
@breautek breautek added this to the 5.0.0 milestone Sep 14, 2023
@breautek breautek mentioned this pull request Sep 15, 2023
5 tasks
@breautek
Copy link
Contributor

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

@breautek breautek closed this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ☠️ Closed/Abandoned
Development

Successfully merging this pull request may close these issues.

4 participants