toLatLng method

List<LatLng> toLatLng(
  1. {bool ignoreErrors = false}
)

Get a list of LatLng from this GeoSerie

Implementation

List<LatLng> toLatLng({bool ignoreErrors = false}) {
  final points = <LatLng>[];
  for (final geoPoint in geoPoints) {
    try {
      points.add(geoPoint.point);
    } catch (_) {
      if (!ignoreErrors) {
        rethrow;
      }
    }
  }
  return points;
}