Function polyline_codec::decode
source · [−]pub fn decode(
encoded_path: &str,
precision: Option<u32>
) -> Result<Vec<LatLng>, InvalidEncodingError>Expand description
Decodes an encoded path string into a sequence of LatLngs.
See https://developers.google.com/maps/documentation/utilities/polylinealgorithm
Example
let encoded = "_p~iF~ps|U_ulLnnqC_mqNvxq`@";
assert_eq!(polyline_codec::decode(encoded, None),
vec![
(38.5, -120.2),
(40.7, -120.95),
(43.252, -126.453)
]);