supportsTile method

  1. @override
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
bool supportsTile(Tile tile, Projection projection) {
  // you may want to show neighbouring tiles too in order to display labels.
  return true;
  // Projection projection = MercatorProjection.fromZoomlevel(tile.zoomLevel);
  // for (PointOfInterest poi in pointOfInterests) {
  //   if (projection.boundingBoxOfTile(tile).containsLatLong(poi.position)) return true;
  // }
  // for (Way way in ways) {
  //   for (List<ILatLong> list in way.latLongs) {
  //     for (ILatLong latLong in list) {
  //       if (projection.boundingBoxOfTile(tile).containsLatLong(latLong)) return true;
  //     }
  //   }
  // }
  // return false;
}