File tree 2 files changed +7
-24
lines changed
arcgis_map_sdk_ios/ios/arcgis_map_sdk_ios/Sources/arcgis_map_sdk_ios
2 files changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,19 @@ import ArcGIS
10
10
11
11
final class CustomLocationProvider : LocationProvider {
12
12
private var locationContinuation : AsyncThrowingStream < Location , Error > . Continuation ?
13
+ private var headingContinuation : AsyncThrowingStream < Double , Error > . Continuation ?
14
+
13
15
14
16
// Exposed stream
15
17
var locations : AsyncThrowingStream < Location , Error > {
16
18
AsyncThrowingStream { continuation in
17
19
self . locationContinuation = continuation
18
20
}
19
21
}
20
-
22
+
21
23
var headings : AsyncThrowingStream < Double , Error > {
22
24
AsyncThrowingStream { continuation in
23
- Task {
24
- while !Task. isCancelled {
25
- continuation. yield ( . random( in: 0 ... 360 ) )
26
- await Task . yield ( )
27
- }
28
- continuation. finish ( )
29
- }
25
+ self . headingContinuation = continuation
30
26
}
31
27
}
32
28
@@ -41,6 +37,9 @@ final class CustomLocationProvider: LocationProvider {
41
37
isLastKnown: false
42
38
)
43
39
locationContinuation? . yield ( loc)
40
+ if let heading = position. heading {
41
+ headingContinuation? . yield ( heading)
42
+ }
44
43
}
45
44
}
46
45
Original file line number Diff line number Diff line change @@ -13,19 +13,3 @@ struct AnimationOptions: Codable {
13
13
var animationCurve : String
14
14
}
15
15
16
- extension AnimationOptions {
17
- // func arcgisAnimationCurve() -> AGSAnimationCurve {
18
- // switch animationCurve {
19
- // case "linear":
20
- // return .linear
21
- // case "easeIn":
22
- // return .easeInCirc
23
- // case "easeOut":
24
- // return .easeOutCirc
25
- // case "easeInOut":
26
- // return .easeInOutCirc
27
- // default:
28
- // return .linear
29
- // }
30
- // }
31
- }
You can’t perform that action at this time.
0 commit comments