Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

From the article Understanding basemaps it is clear that basemaps are not available to offline projects when the client device does not have internet connectivity.

To overcome this problem mbtiles files can be imported by Konect Manager and used as replacements for basemaps in offline projects.

MBTiles is a file format created by Mapbox for storing map tiles in a single file. They can be generated from a tile server by programs such as Mobac and MapTiler and from image files by programs such as Global Mapper. For more information see https://www.mapbox.com/help/an-open-platform/ and https://github.com/mapbox/mbtiles-spec.

When a project uses an mbtiles file and is marked as offline by konect on the client device, the mbtiles file is downloaded from the Konect server on to the client device by konect along with the datasets. Once downloaded, the mbtiles file is available irrespective of internet connectivity. Furthermore, one mbtiles file can be used by any number of offline projects and only one copy of the file is downloaded onto the client device.

Browse for the mbtiles file. When the file has been selected the import dialog box appears:

Click the ‘Ok’ button and the file is imported.

Note that mbtiles files are usually large and as part of the import process they are uploaded to the Konect server. This can take quite a while.

When the mbtiles file has been imported the user-friendly name appears in the list of basemaps.

Note that the imported mbtiles file is not a basemap even though it is listed with the basemaps. It is listed with the basemaps for convenience only.

Note also that mbtiles files are uploaded to the Konect server only for the purpose of being available for downloading to client devices. No tiles are served from the Konect server to client devices or Konect Manager in the manner of basemaps.

Before an mbtiles file is uploaded to the Konect server a copy of the file is created by Konect Manager on the local computer. Konect Manager reads map tiles from the local copy of the file when rendering a map or a project that uses the mbtiles file.

If Konect Manager on another computer accesses a project that uses an mbtiles file, then Konect Manager has to download the mbtiles file from the Konect server before it can render the project in in a map. It will ask the user if the mbtiles file can be downloaded.

Clicking on ‘Yes’ will download the mbtiles file from the Konect server to the local computer and the contents of the file can then be rendered on the map.

To use an mbtiles file in a project click on the project in the ‘Projects’ list in the ‘Catalogue’ tab. Then click on the dropdown list of basemaps.

Image Added

The user-friendly names of the mbtiles files are listed at the bottom of the dropdown list under the heading ‘Offline Basemap’. Click on the required mbtiles file and save the project.