How do I add cartodb_voyager as a basemap to QGIS and Mapinfo? The map can be found here: https://leaflet-extras.github.io/leaflet-providers/preview/#filter=CartoDB.Voyager
I am using qgis v3.2 so some of the addons which would presumably add it have not been updated yet. I am using mapinfo v16 as well.
Best Answer
In the preview, you can see JavaScript code. QGIS uses Python, so we can't just use this code snippet to load the layer into QGIS. From reading the code, we learn that this layer is a tile layer (1). Highlight and copy the service URL (2). Use this URL to load the basemap as an XYZ tile layer in QGIS. (3) Also note that the maximum zoom level should be 19.
Now, here's where it got a bit tricky. The URL from the preview JavaScript snippet doesn't work. Fortunately, I already had a few CartoDB XYZ tile layers in my browser. I compared the URL for the Voyager layer with the URL for another CartoDB layer, and found that they have different root URLs. So I took the end of the Voyager layer link, and combined it with the root URL from a functioning layer.
Here's the non-functioning link for the Voyager layer from the JavaScript in the preview:
Here's a functional link for a different CartoDB layer:
And here's the functional link for the CartoDB Voyager layer:
Add basemap as XYZ Tile layer in QGIS
In Browser panel, right-click on XYZ Tiles and select "New Connection"
Enter layer name and service URL. Change max zoom level to 19. Click OK.
Now you have the CartoDB Voyager layer in your browser. Double-click on the layer name in the Browser panel to add it to your project.
Thanks to @JonathanWest for contributing this information:
According to github.com/CartoDB/basemap-styles - The structure of the URLs to call the service is the following:
https://{s}.basemaps.cartocdn.com/{style}/{z}/{x}/{y}{scale}.png
, where: