getImage method

  1. @override
AssetImage getImage(
  1. TileCoordinates coordinates,
  2. TileLayer options
)
override

Retrieve a tile as an image, based on it's coordinates and the current TileLayerOptions

Implementation

@override
AssetImage getImage(TileCoordinates coordinates, TileLayer options) {
  final fallbackUrl = getTileFallbackUrl(coordinates, options);
  return AssetImage(
    getTileUrl(coordinates, options),
    bundle: fallbackUrl == null
        ? null
        : _FlutterMapAssetBundle(fallbackUrl: fallbackUrl),
  );
}