cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlegenhausen <...@git.apache.org>
Subject [GitHub] cordova-plugin-geolocation pull request #77: Fixes the Coordinate speed and ...
Date Tue, 21 Jun 2016 08:09:21 GMT
GitHub user mlegenhausen opened a pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/77

    Fixes the Coordinate speed and heading attribute to follow the w3c specification on all
platforms

    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](https://dev.w3.org/geo/api/spec-source.html).
    
    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 provides 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](http://www.apache.org/licenses/icla.txt) has been signed and submitted to
secretary@apache.org.
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 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.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/werk85/cordova-plugin-geolocation master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-geolocation/pull/77.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #77
    
----
commit 94752245ff79e26120c9870e54143d93c3a18293
Author: Malte Legenhausen <mlegenhausen@gmail.com>
Date:   2016-06-21T07:49:26Z

    Make sure Coordinates#speed follows the w3c specification.
    
    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

commit a18093a823dc80828df5b3c829a8ef786ad99fe9
Author: Malte Legenhausen <mlegenhausen@gmail.com>
Date:   2016-06-21T07:58:14Z

    Make sure Coordinates#heading follows the w3c specification.
    
    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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message