removeGeometry method
Future<void>
removeGeometry(
- List<MapsObject> mapsObjects, {
- bool autoRender = true,
})
Implementation
Future<void> removeGeometry(
List<MapsObject> mapsObjects, {
bool autoRender = true,
}) async {
await _mapBloc.isMapReady.future;
for (MapsObject obj in mapsObjects) {
_mapBloc.voyagerFeatureSet.removeFeatureFromVoyagerFeatureSet(
obj
);
}
if (autoRender) {
_mapBloc.updateMapConfig(
_mapBloc.mapConfigNotifier.value.copyWith(
polygons: _mapBloc.voyagerFeatureSet.polygons,
markers: _mapBloc.voyagerFeatureSet.markers,
polylines: _mapBloc.voyagerFeatureSet.polylines,
),
);
}
}