addDatastore method

Future<void> addDatastore(
  1. Datastore datastore
)

adds another mapDataStore

@param mapDataStore the mapDataStore to add

Implementation

Future<void> addDatastore(Datastore datastore) async {
  if (datastores.contains(datastore)) {
    throw Exception("Duplicate map database");
  }
  datastores.add(datastore);

  // Get and cache the datastore's boundary
  BoundingBox datastoreBoundary = await datastore.getBoundingBox();
  _datastoreBoundaries[datastore] = datastoreBoundary;

  if (_boundingBox != null) _boundingBox = _boundingBox!.extendBoundingBox(datastoreBoundary);
}