Functions
The following functions are available globally.
- 
                  
                  
This function encodes an
[CLLocationCoordinate2D]to aStringDeclaration
Swift
public func encodeCoordinates(_ coordinates: [CLLocationCoordinate2D], precision: Double = 1e5) -> StringParameters
coordinatesThe
ArrayofCLLocationCoordinate2Dthat you want to encodeprecisionThe precision used to encode coordinates (default:
1e5)Return Value
A
Stringrepresenting the encoded Polyline - 
                  
                  
This function encodes an
[CLLocation]to aStringDeclaration
Swift
public func encodeLocations(_ locations: [CLLocation], precision: Double = 1e5) -> StringParameters
coordinatesThe
ArrayofCLLocationthat you want to encodeprecisionThe precision used to encode locations (default:
1e5)Return Value
A
Stringrepresenting the encoded Polyline - 
                  
                  
This function encodes an
[UInt32]to aStringDeclaration
Swift
public func encodeLevels(_ levels: [UInt32]) -> StringParameters
levelsThe
ArrayofUInt32levels that you want to encodeReturn Value
A
Stringrepresenting the encoded Levels - 
                  
                  
This function decodes a
Stringto a[CLLocationCoordinate2D]?Declaration
Swift
public func decodePolyline(_ encodedPolyline: String, precision: Double = 1e5) -> [CLLocationCoordinate2D]?Parameters
encodedPolylineStringrepresenting the encoded PolylineprecisionThe precision used to decode coordinates (default:
1e5)Return Value
A
[CLLocationCoordinate2D]representing the decoded polyline if valid,nilotherwise - 
                  
                  
This function decodes a String to a [CLLocation]?
Declaration
Swift
public func decodePolyline(_ encodedPolyline: String, precision: Double = 1e5) -> [CLLocation]?Parameters
encodedPolylineString representing the encoded Polyline
precisionThe precision used to decode locations (default: 1e5)
Return Value
A [CLLocation] representing the decoded polyline if valid, nil otherwise
 - 
                  
                  
This function decodes a
Stringto an[UInt32]Declaration
Swift
public func decodeLevels(_ encodedLevels: String) -> [UInt32]?Parameters
encodedLevelsThe
Stringrepresenting the levels to decodeReturn Value
A
[UInt32]representing the decoded Levels if theStringis valid,nilotherwise 
View on GitHub
        Functions  Reference