react-native-nitro-geolocation 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -148,9 +148,15 @@ class NitroGeolocation: HybridNitroGeolocationSpec {
|
|
|
148
148
|
private struct ParsedHeadingOptions {
|
|
149
149
|
let headingFilter: CLLocationDegrees
|
|
150
150
|
|
|
151
|
+
// Apple's documented `CLLocationManager.headingFilter` default is 1°.
|
|
152
|
+
// Defaulting to `0` here propagates through `mergeHeadingFilter` into
|
|
153
|
+
// `kCLHeadingFilterNone` (-1), which fires the delegate on every
|
|
154
|
+
// CLHeading tick (sub-degree firehose for stationary users). 1° matches
|
|
155
|
+
// CL's documented behavior and lets the delegate fire only on
|
|
156
|
+
// perceptible changes.
|
|
151
157
|
static func parse(from options: HeadingOptions?) -> ParsedHeadingOptions {
|
|
152
158
|
return ParsedHeadingOptions(
|
|
153
|
-
headingFilter: options?.headingFilter ??
|
|
159
|
+
headingFilter: options?.headingFilter ?? 1
|
|
154
160
|
)
|
|
155
161
|
}
|
|
156
162
|
}
|