updateGeometries method

Future<void> updateGeometries({
  1. Set<Polygon> polygons = const {},
  2. Set<Marker> markers = const {},
  3. Set<Polyline> polylines = const {},
  4. bool autoRender = true,
})

Implementation

Future<void> updateGeometries({
  Set<Polygon> polygons = const {},
  Set<Marker> markers = const {},
  Set<Polyline> polylines = const {},
  bool autoRender = true,
}) async {

  await _mapBloc.isMapReady.future;

  _mapBloc.updateGeometries(
      polygons: polygons,
      markers: markers,
      polylines: polylines,
    );

    if (autoRender) {
      _mapBloc.updateMapConfig(
        _mapBloc.mapConfigNotifier.value.copyWith(
          polygons: _mapBloc.voyagerFeatureSet.polygons,
          markers: _mapBloc.voyagerFeatureSet.markers,
          polylines: _mapBloc.voyagerFeatureSet.polylines,
        ),
      );
    }
}