supportsTile method

  1. @override
Future<bool> supportsTile(
  1. Tile tile,
  2. Projection projection
)
override

Returns true if MapDatabase contains the given tile.

@param tile tile to be rendered. @return true if tile is part of database.

Implementation

@override
Future<bool> supportsTile(Tile tile, Projection projection) async {
  if (tile.zoomLevel < zoomLevelMin || tile.zoomLevel > zoomLevelMax)
    return false;
  await _lateOpen();
  return tile
      .getBoundingBox(projection)
      .intersects(getMapFileInfo().boundingBox);
}