PolygonLayerOptions constructor

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

screen space culling of polygons based on bounding box

Implementation

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