MapMultiPolygon constructor

MapMultiPolygon(
  1. List<MapPolygon> polygons
)

Implementation

factory MapMultiPolygon(List<MapPolygon> polygons) {
  Rect bounds = polygons.first.bounds;
  for (int i = 1; i < polygons.length; i++) {
    bounds = bounds.expandToInclude(polygons[i].bounds);
  }
  return MapMultiPolygon._(
      UnmodifiableListView<MapPolygon>(polygons), bounds);
}