We are happy to announce that we have just released an update for cordova-plugin-geolocation
!
To upgrade:
cordova plugin remove cordova-plugin-geolocation cordova plugin add cordova-plugin-geolocation@5.0.0
The JavaScript of the plugin has been upgraded to use ES6 features, such as let
and const
.
NOTE: This release has failed to upgrade required engines. Despite the declared requirement on cordova-android
>= 6.3.0 and no declared requirement on iOS, the new minimum requirements will be:
Earlier versions of these platforms may not work as expected. As always, it will be recommended to use the latest version available. The engines may be corrected in a patch release at a later date.
Support for the deprecated cordova-windows platform has been dropped and entirely removed in this release.
Sanity check on Geolocation serialization on iOS
A rare occurrence of Infinity
values would cause a crash during JSON serialization on iOS. This is now caught and will now produce a Position Unavailable error gracefully.
Improved Android Permission Handling
Android has received fixes for when handling coarse vs fine location permissions for improved compatibility on Android 12+ devices. Android will now handle the following situations:
COARSE
location.COARSE
and FINE
(high accuracy) location.COARSE
is granted, but FINE
is required.For more details on these changes, see the PR.
Fixes has been made to the heading
and speed
to better conform to the W3C Geolocation API specification. If either of these values are not determined to be expected valid range, they will now return null
to provide better consistency between Cordova and other web environments.
Please report any issues you find by following the this How to File a Bug guide!
Breaking Changes:
Fixes:
Other Changes:
cordova-android
@11 (#247)