encodePoint method

String encodePoint({
  1. num previous = 0,
  2. int accuracyExponent = 5,
})

encodePoint

Encodes a single geographic point into a String via Encoded Polyline Algorithm Format.

The previous parameter is the previous geographic point, used to calculate the delta between the two points. The accuracyExponent parameter determines the precision of the encoded coordinates, with a default value of 5.

Returns a String representing the encoded geographic point.

Implementation

String encodePoint({num previous = 0, int accuracyExponent = 5}) {
  return _encode(this, previous, math.pow(10, accuracyExponent));
}