File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public func encode(path: [CLLocation]) -> Polyline {
19
19
/// - Parameter path: A path to encode.
20
20
///
21
21
/// - Returns: The encode path as a `Polyline`.
22
- public func encode( path: [ CLLocationCoordinate2D ] ) -> String {
22
+ public func encode( path: [ CLLocationCoordinate2D ] ) -> Polyline {
23
23
var lastLat = 0 , lastLng = 0
24
24
25
25
return path. reduce ( " " , { result, point in
@@ -32,7 +32,12 @@ public func encode(path: [CLLocationCoordinate2D]) -> String {
32
32
} )
33
33
}
34
34
35
- private func encode( value: Int ) -> String {
35
+ /// Encode a value into a `Polyline`.
36
+ ///
37
+ /// - Parameter value: The value to encode.
38
+ ///
39
+ /// - Returns: A `Polyline`.
40
+ private func encode( value: Int ) -> Polyline {
36
41
var result : String = " "
37
42
38
43
var v = value < 0 ? ~ ( value << 1 ) : value << 1
You can’t perform that action at this time.
0 commit comments