MBTiles Tile Maps
MBTiles is the primary format for offline background maps in Mapit GIS Professional. It allows you to carry detailed raster or vector tile maps on your device and use them in areas without internet connectivity - perfect for fieldwork in remote locations.
What are MBTiles?
MBTiles is an open specification created by Mapbox for storing tiled map data in a single SQLite database file. Instead of thousands of individual tile image files organized in folders, MBTiles packages everything into one portable .mbtiles file.
An MBTiles file contains:
- Map tiles - pre-rendered image tiles (PNG or JPEG for raster) or vector tiles (PBF format) organized by zoom level, column, and row
- Metadata - information about the tileset such as name, format, bounds, min/max zoom levels, and description
- Tile index - an SQLite index that enables fast lookup of any tile by its coordinates
Raster vs vector MBTiles
| Feature | Raster MBTiles | Vector MBTiles |
|---|---|---|
| Tile format | PNG or JPEG images | PBF (Protocol Buffer) |
| File size | Larger (pixel data) | Smaller (geometry data) |
| Zoom quality | Fixed resolution per zoom level | Sharp at any zoom |
| Styling | Baked into the tiles | Can be styled client-side |
| Best for | Satellite imagery, scanned maps | Street maps, topographic maps |
Mapit GIS supports both raster and vector MBTiles.
Creating MBTiles
There are several tools available for creating MBTiles files from various map sources.
QGIS
QGIS is a free, open-source desktop GIS that can export MBTiles from any map project.
- Open your project in QGIS and set up the layers and styling you want
- Go to Processing > Toolbox and search for Generate XYZ tiles (MBTiles)
- Configure the export:
- Extent - the geographic area to include
- Minimum zoom / Maximum zoom - typically 10-16 for fieldwork
- Tile format - PNG (supports transparency) or JPEG (smaller file size)
- Click Run to generate the
.mbtilesfile
Each additional zoom level roughly quadruples the number of tiles and file size. For most fieldwork, zoom levels 12-16 provide a good balance between detail and file size. Going beyond zoom 18 creates very large files.
| Zoom level | Approximate scale | Typical use |
|---|---|---|
| 10-12 | Regional overview | Navigation to site |
| 13-15 | Local detail | General fieldwork |
| 16-18 | Street/parcel level | Detailed surveying |
MapTiler
MapTiler Desktop is a commercial tool with a free tier that can convert various raster formats (GeoTIFF, ECW, JPEG2000) into MBTiles.
- Drag your source file into MapTiler Desktop
- Select the coordinate system if not auto-detected
- Choose MBTiles as the output format
- Set zoom levels and run the export
MapTiler is particularly useful for converting georeferenced aerial imagery or scanned maps into tiled offline maps.
GDAL
GDAL is the Swiss Army knife of geospatial data conversion. The gdal_translate command can create MBTiles from any GDAL-supported raster format:
gdal_translate -of MBTiles input.tif output.mbtiles
To add additional zoom levels (overviews):
gdaladdo -r average output.mbtiles 2 4 8 16
Maperitive
Maperitive is a free desktop application that can render OpenStreetMap data into MBTiles:
- Navigate to your area of interest
- Use Tools > Generate Tiles to export the visible area
- Set the zoom range and output to MBTiles format
OpenMapTiles
For vector MBTiles based on OpenStreetMap data, the OpenMapTiles project provides pre-built downloads covering the entire world, broken down by region. These are vector tiles that render with high quality at any zoom level.
Using MBTiles in Mapit GIS
Adding an MBTiles file
- Transfer the
.mbtilesfile to your device (via USB, cloud storage, email, etc.) - Open Offline Maps from the main menu
- On the Tile Maps tab, tap the + button
- Browse to and select your
.mbtilesfile - The file will be imported into the app's storage and appear in the list
Large MBTiles files (hundreds of MB) may take some time to import as they are copied to the app's internal storage for reliable access.
Managing offline maps
Once imported, you can:
- Toggle visibility - tap the checkbox to show or hide a map layer
- Adjust transparency - use the transparency slider to blend with other layers
- Reorder layers - drag and drop to change the stacking order
- Zoom to extent - jump to the geographic area covered by the tileset
- Delete - remove the map from the list and delete the file from app storage
Multiple offline maps
You can add multiple MBTiles files and stack them. Use the layer ordering and transparency controls to combine different map sources - for example, a satellite imagery base with a semi-transparent topographic overlay.
Troubleshooting
Map tiles not showing
- Verify the MBTiles file is not corrupted by opening it in QGIS
- Check that the file covers the geographic area you are viewing
- Ensure the current map zoom level falls within the tile zoom range of the MBTiles file
- Make sure the layer is toggled visible (checkbox is checked)
Poor quality or blurry tiles
- This usually means you are zoomed in beyond the maximum zoom level stored in the MBTiles file
- Re-export the file with higher maximum zoom levels (but note the file size increase)
File too large to transfer
- Reduce the geographic extent to only the area you need
- Lower the maximum zoom level
- Use JPEG format instead of PNG for raster tiles (smaller file size, no transparency)
- Consider splitting into multiple MBTiles files by area