pub fn decode(encoded_path: &str, precision: i32) -> Vec<[f64; 2]>Expand description
Decodes an encoded path string into a sequence of coordinates
§Arguments
encoded_path- The encoded polyline stringprecision- The precision factor (default: 5)
§Examples
use toolbox_rs::polyline::decode;
let encoded = "_p~iF~ps|U_ulLnnqC_mqNvxq`@";
let points = decode(encoded, 5);
assert_eq!(points.len(), 3);
assert!((points[0][0] - 38.5).abs() < 1e-10);