How to print and show vector tiles in QGIS via MapTiler plugin

Do you need fully customizable base maps for QGIS? Do you need to print a map that you created in MapTiler Cloud? After reading this article you will know how to do it via the MapTiler plugin. Load a map of the entire world with one of many ready-to-use map styles, customize map styles to suit your needs, or create new ones from scratch. Print vector maps based on OpenStreetMap data in high resolution with all the cartographic options that QGIS offers.

These are minimum versions of QGIS required by the MapTiler QGIS plugin:

- MapTiler QGIS plugin version 1.0 requires QGIS 3.14 or newer.
- MapTiler QGIS plugin version 2.0 requires QGIS 3.16 or newer.
- MapTiler QGIS plugin version 3.0 requires QGIS 3.24 or newer.
- MapTiler QGIS plugin version 3.2 requires QGIS 3.26 or newer.

To display predefined map styles from MapTiler, you need a MapTiler Cloud account with either:

- valid API key for MapTiler QGIS plugin version 2.0 and 1.0
- valid Credentials with Token for MapTiler QGIS plugin version 3.0 and newer.

Installation

QGIS is a cross-platform GIS application. Follow the instructions on the QGIS website to download and install it.

Installing the plugin is straightforward:

  1. Open QGIS
  2. Click on the menu Plugins → Manage and Install Plugins…
  3. Search for Maptiler
  4. Click on the Install Plugin
  5. Restart QGIS
  6. MapTiler icon appears in Browser panel

Installing fonts

The maps from MapTiler Cloud use various fonts. If you don’t have them installed, you might get warnings like these in QGIS:

readme_09.png

If you want to display these maps in QGIS, you need to have these fonts installed on your system. QGIS will use a default font if a font is not installed on your system.

A list of fonts used in maps at MapTiler Cloud can be found at MapTiler fonts.

Upgrading the plugin

You can upgrade to the latest version from QGIS Plugin menu. Just search for MapTiler plugin on the Installed tab and click on the Upgrade Plugin button.

Your plugin settings will be carried over to the new version. All the maps added using the older version of the plugin will persist on the list of maps in the Browser menu.

After upgrading the plugin, you will have to add the new default maps (e.g. OpenStreetMap and Terrain RGB) from the Add new map menu. Right-click on the MapTiler heading in the Browser menu to access this.

Authentication

MapTiler QGIS plugin versions 1.0 and 2.0

To use predefined map styles from MapTiler Cloud, you need to add your key in the Account window by right-clicking on MapTiler → Account…You can find your API key in the MapTiler Cloud administration web page, in the section AccountAPI Keys.

MapTiler QGIS plugin version 3.0

The new version of the plugin uses Tokens. To get one, go to your MapTiler Cloud Account page, and click Credentials on the left of the interface. Click on the New Credential button and copy the token (keep this token private – treat it the same way as a password).

readme_11.png

In QGIS add your Token in the Account window by right-clicking on MapTiler → Account…Token will be stored in QGIS Authentication database.

readme_08.png

Adding vector map from MapTiler Cloud

Once you have added your key or token, you can click on MapTiler in the QGIS Browser panel. An expanded list will show you the most popular map presets.

You can add more maps from MapTiler Cloud. Just right-click on MapTiler → Add a new map… → MapTiler Cloud and select any map from MapTiler Cloud.

Adding own StyleJSON

MapTiler plugin offers predefined maps but it is not limited just to them. If you want to add your own map it is easy as well. First, prepare the URL of your StyleJSON. For your maps hosted at MapTiler Cloud, you will find this StyleJSON URL on the map detail page.

Then right-click on the MapTiler plugin → Add a new map… → From URL add the name of the map and paste copied StyleJSON URL. Your own map will be added to the list of maps in the MapTiler plugin.

Customize a style in MapTiler Cloud

If you like any of MapTiler maps but want to customize them to better fit your needs, there is an easy way to do it. Right-click on a map and select Customize in Cloud. Read other articles that cover how to customize a map.

Once you have a perfect map style, you can simply publish your map. Copy URL to its StyleJSON and add it to QGIS using MapTiler plugin → Add a new map… → From URL

Adding raster map

If you want to add any of the maps from MapTiler Cloud as raster tiles, simply right-click on the map and select Add as Raster. By default raster tiles 512x512 will be added.

You can also add raster tiles to any of your maps via the MapTiler plugin. Instead of copying the StyleJSON URL (which we use for vector maps), we use the TileJSON URL for raster tiles.

On the detail page of the map you want to add, you find URL links to TileJSON for both to raster tiles 256x256 and raster tiles 512x512. Copy TileJSON and paste it into MapTiler plugin → Add a new map… → From URL and paste URL link to TileJSON to URL field.

Export & printing

Once you have your map in QGIS, you can easily export it. You can export to PNG, PDF, or DXF. Select Project → Export/Import → Export map to… You can choose DPI, scale, extent, and others to get your map in high resolution.

If you need a serious cartographic high-quality map use QGIS Print Composer (Project → New Print Layout…). Explore the full power of QGIS and use the complete cartographic suite to add a grid, north arrow, scale bar, overview, and many more. Configure page setup, DPI, extent, and export map to PNG, SVG, or PDF.

Attribution/terms

All maps must contain MapTiler and OpenStreetMap attribution. For printing terms please read the Cloud terms. For custom, print plans contact our Sales team.

Conclusion

MapTiler plugin is an open-source project with its code on GitHub. It is the easiest way to add vector tiles map to QGIS. Users can add their own map styles, or customize predefined map styles via Customize tool on Cloud. This tool is also perfect for desktop printing of maps from MapTiler Cloud.

MapTiler Cloud Terms
Download QGIS
MapTiler QGIS Plugin
MapTIler maps to QGIS - video
Introduction to QGIS
QGIS - Print composer
QGIS - Map Composer 3.16
QGIS - Map Composer 3.4
Introducing MapTiler QGIS plugin - News
Vector tiles in QGIS 3.14 - News
MapTiler QGIS plugin on GitHub