How to display self-hosted maps from MapTiler Server in QGIS
This article demonstrates how to display self-hosted maps from MapTiler Server in QGIS. It contains the setup process and adds a few useful tips on performance improvements of the integration.
Support for vector tiles was introduced to QGIS in version 3.14 (Pi). You need QGIS 3.14 or newer to fully take advantage of vector tiles. To add maps into QGIS you need to know its StyleJSON URL or have an access to the administration of the MapTiler Server. Your MapTiler Server should be running on an open port (3650 by default).
MapTiler Server Administration
You should be able to see your maps on the MapTiler Server administration page. Read the article How to add data to MapTiler Server and this article to get even more information.
Select the map you want to add to QGIS a click on the Detail button.
On the detail page, find the Use vector style section and link to StyleJSON.
Open QGIS with installed MapTiler plugin. For further information about the plugin read this article.
Right-click on MapTiler plugin → Add a new map… Insert the name of the map and paste copied StyleJSON from MapTiler Server.
Your self-hosted map will be added to the list of maps under the MapTiler Plugin. Double-click on the map and your map will be added to the QGIS map canvas.
How to connect raster tiles from MapTiler Server to QGIS
The process of connecting raster tiles to QGIS via MapTiler QGIS plugin is simple. Follow these steps:
- Install MapTiler QGIS plugin according to this guide.
- Set up the authentication for the QGIS plugin according to this guide.
- Install MapTiler Server for Win, Linux, or Docker.
- In MapTiler Server, go to Maps.
- Click to select a map you want to connect to QGIS.
- Scroll down to Map service (raster tiles).
- Copy link “tiles.json” to the map.
- In QGIS, Right-click the MapTiler plugin in the left vertical menu.
- Select Add a new map
- Select the “from URL” tab
- Copy the link from MapTiler Server here.
- Double-click the map you have just selected to add it to your layer view.
- Continue working on your edits.
How to connect XYZ tiles from MapTiler Server to QGIS
The process of connecting XYZ tiles to QGIS via MapTiler QGIS plugin is simple. Follow these steps:
- In MapTiler Server, go to Maps.
- Click to select a map you want to connect to QGIS.
- Scroll down to XYZ tiles (raster tiles).
- Copy link to the map (https://localhost:3650/api/maps/your_style_name_/{z}/{x}/{y}.png).
- In QGIS, Right-click the XYZ tiles in the left vertical menu.
- Select New connection.
- Put in the name and the URL link to the map (from step 4).
- Double-click the map you have just selected to add it to your layer view.
- Continue working on your edits.
How to connect WMTS from MapTiler Server to QGIS
The process of connecting WMTS to QGIS via MapTiler QGIS plugin is simple. Follow these steps:
- In MapTiler Server, go to Maps.
- Click to select a map you want to connect to QGIS.
- Scroll down to WMTS.
- Copy link (https://localhost:3650/api/maps/your_map_style_name/WMTSCapabilities.xml).
- In QGIS, Right-click the WMS/WMTS in the left vertical menu.
- Select New connection.
- Put in the name and the URL link to the map (from step 4).
- Double-click the map you have just selected to add it to your layer view.
- Continue working on your edits.
Conclusion
With a combination of MapTiler Server and MapTiler Plugin in QGIS, you can easily add a self-hosted map to your QGIS project.
Useful links
How to add data to MapTiler Server
How map styles work in MapTiler Server