GeoPolygon constructor

GeoPolygon(
  1. GeoRing outerRing, [
  2. List<GeoRing> holes = const []
])

Create a polygon from an outerRing and a list of holes The outer ring must be a closed ring, and the holes must be non-overlapping closed rings inside the outer ring.

Implementation

GeoPolygon(this.outerRing, [this.holes = const []]) {
  outerRing.validate();
  for (final hole in holes) {
    hole.validate();
  }
}