clearTileCache method

  1. @override
Future<void> clearTileCache(
  1. TileOverlayId tileOverlayId, {
  2. required int mapId,
})
override

Clears the tile cache so that all tiles will be requested again from the TileProvider.

The current tiles from this tile overlay will also be cleared from the map after calling this method. The Google Maps SDK maintains a small in-memory cache of tiles. If you want to cache tiles for longer, you should implement an on-disk cache.

Implementation

@override
Future<void> clearTileCache(
  TileOverlayId tileOverlayId, {
  required int mapId,
}) {
  return channel(mapId)
      .invokeMethod<void>('tileOverlays#clearTileCache', <String, Object>{
    'tileOverlayId': tileOverlayId.value,
  });
}