flutter_map Docs
Project Links💝 Support Us
v4
v4
  • flutter_map
  • How Does It Work?
    • Raster vs Vector Tiles
  • Getting Started
    • Installation
    • Additional Setup
    • Examples
    • Migrating To v4
  • Usage
    • Base Widget
    • Options
    • Layers
    • Controller
    • Full API Reference
  • Layers
    • Tile Layer
      • Tile Providers
    • Marker Layer
    • Polygon Layer
    • Polyline Layer
    • Circle Layer
    • Overlay Image Layer
    • Attribution Layer
    • WMS Usage
  • Plugins
    • Plugins List
    • Making A Plugin
      • Creating New Tile Providers
      • Creating New Layers
  • Tile Servers
    • Using Mapbox
    • Using Thunderforest
    • Using Stadia Maps
    • Offline Mapping
    • Other Options
  • Frequently Asked Questions
  • Contributing
  • Credits
Powered by GitBook

© flutter_map Authors & Maintainers

On this page
  • Caching & Bulk Downloading
  • Bundled Map Tiles

Was this helpful?

Export as PDF
  1. Tile Servers

Offline Mapping

PreviousUsing Stadia MapsNextOther Options

Last updated 2 years ago

Was this helpful?

Using maps without an Internet connection is common requirement. Luckily, there are a few options available to you to implement offline mapping in your app.

  • Automatically store tiles as the user loads them through interacting with the map

  • Download an entire area/region of tiles in one shot, ready for a known no-Internet situation

  • Provide a set of tiles to all users through assets or the filesystem

Caching & Bulk Downloading

The aims to solve the first two points. FMTC is designed to be easy to implement, but also sufficiently advanced to cover most (if not all) use cases.

However, using simpler packages in a DIY solution can be a better option in some cases. You'll need to implement a custom TileProvider backed by an alternative image provider or cache lookup system: see Creating New Tile Providers.

To help choose whether FMTC or DIY is more appropriate for your use case, please see:

Bundled Map Tiles

If you have a set of custom raster tiles that you need to provide to all your users, you may want to consider bundling them together, to make a them easier to deploy to your users.

There is essentially two options for doing this:

  • Using AssetTileProvider, you can bundle a set of map tiles and register them as an asset within your app's pubspec.yaml. This means that they will be downloaded together with your application, keeping setup simple, but at the expense of a larger application bundle size.

  • Using FileTileProvider, you can bundle a set of map tiles and store them on a remote web server, that can be downloaded from later. This means that the setup may be more complicated for users, but the application's bundle size will be much smaller.

Either way, the filesystem should be structured like this: 'offlineMap/{z}/{x}/{y}.png', where every .png image is a tile.

If you have a raster-format .mbtiles file, for example from TileMill, you should use to convert it to the correct structure first. Alternatively, you can use an external package such as '' to extract during runtime.

mbtilesToPngs
flutter_mbtiles_extractor
community maintained plugin 'flutter_map_tile_caching'
Caching
Bulk downloading
Bundling
LogoIs FMTC Right For Me?FMTC Docs