getValues static method

Iterable<num> getValues(
  1. Position position
)

Coordinate values of position as an iterable of 2, 3 or 4 items.

For projected or cartesian coordinates, the coordinate ordering is: (x, y), (x, y, z), (x, y, m) or (x, y, z, m).

For geographic coordinates, the coordinate ordering is: (lon, lat), (lon, lat, elev), (lon, lat, m) or (lon, lat, elev, m).

Implementation

static Iterable<num> getValues(Position position) sync* {
  yield position.x;
  yield position.y;
  if (position.is3D) {
    yield position.z;
  }
  if (position.isMeasured) {
    yield position.m;
  }
}