[][src]Function polyline_rust::encode

pub fn encode(points: Vec<Point>, precision: u32) -> String

Encodes coordinates to the "Encoded Polyline Algorithm Format".

More info: https://developers.google.com/maps/documentation/utilities/polylinealgorithm

points: points of the polyline

precision: usually 5 or 6; Google's original algorithm uses 5 digits of decimal precision, which is accurate to about a meter. A precision of 6 gives you an accuracy of about 10cm

More info: https://mapzen.com/blog/polyline-precision/