readLabelsSingle method
Reads label data for a single tile.
Labels include POIs and named ways (roads, buildings, etc.) that have text labels for display. Implementations may return additional data.
tile The tile for which to retrieve label data
Returns label data bundle or null if no data available
Implementation
@override
Future<DatastoreBundle?> readLabelsSingle(Tile tile) async {
switch (dataPolicy) {
case DataPolicy.RETURN_FIRST:
for (Datastore mdb in List.from(datastores)) {
if (_datastoreIntersectsTile(mdb, tile) && (await mdb.supportsTile(tile))) {
return mdb.readLabelsSingle(tile);
}
}
return null;
case DataPolicy.RETURN_ALL:
return _readLabelsDedup(tile, false);
case DataPolicy.DEDUPLICATE:
return _readLabelsDedup(tile, true);
}
//throw new Exception("Invalid data policy for multi map database");
}