addMapDataStore method

Future<void> addMapDataStore(
  1. Datastore mapDataStore,
  2. bool useStartZoomLevel,
  3. bool useStartPosition
)

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!);
  // }
}