toText method

String toText({
  1. String delimiter = ',',
  2. String? positionDelimiter = ',',
  3. int? decimals,
  4. bool swapXY = false,
})

A string representation of coordinate values of all positions (in this iterable) separated by delimiter.

If positionDelimiter is given, then positions are separated by positionDelimiter and coordinate values inside positions by delimiter.

Use decimals to set a number of decimals (not applied if no decimals).

Set swapXY to true to print y (or latitude) before x (or longitude).

Implementation

String toText({
  String delimiter = ',',
  String? positionDelimiter = ',',
  int? decimals,
  bool swapXY = false,
}) {
  final buf = StringBuffer();
  writeValues(
    buf,
    delimiter: delimiter,
    positionDelimiter: positionDelimiter,
    decimals: decimals,
    swapXY: swapXY,
  );
  return buf.toString();
}