removeMapDataStore method
Implementation
Future<void> removeMapDataStore(double minLatitude, double minLongitude, double maxLatitude, double maxLongitude) async {
BoundingBox toRemove = BoundingBox(minLatitude, minLongitude, maxLatitude, maxLongitude);
this.boundingBox = null;
for (Datastore datastore in List.from(mapDatabases)) {
BoundingBox boundingBox = await datastore.getBoundingBox();
if (toRemove.intersects(boundingBox)) {
mapDatabases.remove(datastore);
} else {
if (null == this.boundingBox) {
this.boundingBox = boundingBox;
} else {
this.boundingBox = this.boundingBox!.extendBoundingBox(boundingBox);
}
}
}
}