tileProvider property

TileProvider tileProvider
final

Provider to load the tiles. The default is NonCachingNetworkTileProvider() which doesn't cache tiles and won't retry the HTTP request. Use NetworkTileProvider() for a provider which will retry requests. For the best caching implementations, see the flutter_ek_osm_map readme.

In order to use images from the asset folder set this option to AssetTileProvider() Note that it requires the urlTemplate to target assets, for example:

urlTemplate: "assets/map/anholt_osmbright/{z}/{x}/{y}.png",

In order to use images from the filesystem set this option to FileTileProvider() Note that it requires the urlTemplate to target the file system, for example:

urlTemplate: "/storage/emulated/0/tiles/some_place/{z}/{x}/{y}.png",

Furthermore you create your custom implementation by subclassing TileProvider

Implementation

final TileProvider tileProvider;