PolygonLayerOptions constructor

PolygonLayerOptions({
  1. Key? key,
  2. List<Polygon> polygons = const [],
  3. bool polygonCulling = false,
  4. Stream<void>? rebuild,
})

screen space culling of polygons based on bounding box

Implementation

PolygonLayerOptions({
  Key? key,
  this.polygons = const [],
  this.polygonCulling = false,
  Stream<void>? rebuild,
}) : super(key: key, rebuild: rebuild) {
  if (polygonCulling) {
    for (final polygon in polygons) {
      polygon.boundingBox = LatLngBounds.fromPoints(polygon.points);
    }
  }
}