polygonArea static method

num polygonArea(
  1. List<LatLng> points, {
  2. List<List<LatLng>> holes = const [],
})

in Acres

Implementation

static num polygonArea(List<LatLng> points, {List<List<LatLng>> holes = const []}) {

  num _area = 0;

  if (points.isNotEmpty) {
    _area += ringArea(points).abs();
    for (var hole in holes) {
      _area -= ringArea(hole).abs();
    }
  }

  return _area * 0.000247105;
}