pub fn decode(
encoded_path: &str,
precision: 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, 5).unwrap(), vec![
(38.5, -120.2),
(40.7, -120.95),
(43.252, -126.453)
]);