getImage method

  1. @override
ImageProvider<Object> getImage(
  1. Coords<num> coords,
  2. TileLayerOptions options
)

Get a browsed tile as an image, paint it on the map and save it's bytes to cache for later (dependent on the CacheBehavior)

Implementation

@override
ImageProvider getImage(Coords<num> coords, TileLayerOptions options) =>
    FMTCImageProvider(
      provider: this,
      options: options,
      coords: coords,
      httpClient: httpClient,
      headers: {
        ...headers,
        'User-Agent': headers['User-Agent'] == null
            ? 'flutter_map_tile_caching for flutter_map (unknown)'
            : 'flutter_map_tile_caching for ${headers['User-Agent']}',
      },
    );