GeoPoint2.from constructor

GeoPoint2.from(
  1. Iterable<num> coords, {
  2. int? offset,
})

A geographic position from coords given in order: lon, lat.

Implementation

factory GeoPoint2.from(Iterable<num> coords, {int? offset}) {
  final start = offset ?? 0;
  return GeoPoint2.lonLat(
    coords.elementAt(start).toDouble(),
    coords.elementAt(start + 1).toDouble(),
  );
}