addMapDataStore method
adds another mapDataStore
@param mapDataStore the mapDataStore to add @param useStartZoomLevel if true, use the start zoom level of this mapDataStore as the start zoom level @param useStartPosition if true, use the start position of this mapDataStore as the start position
Implementation
Future<void> addMapDataStore(Datastore mapDataStore, bool useStartZoomLevel, bool useStartPosition) async {
if (this.mapDatabases.contains(mapDataStore)) {
throw new Exception("Duplicate map database");
}
this.mapDatabases.add(mapDataStore);
if (mapDataStore is MapDataStore) {
if (useStartZoomLevel) {
this.startZoomLevel = await mapDataStore.getStartZoomLevel();
}
if (useStartPosition) {
this.startPosition = await mapDataStore.getStartPosition();
}
}
// if (null == this.boundingBox) {
// this.boundingBox = mapDataStore.boundingBox;
// } else {
// this.boundingBox =
// this.boundingBox!.extendBoundingBox(mapDataStore.boundingBox!);
// }
}