1

I’m working with a fresh install of QGIS 3.0.3 on Ubuntu 18.04 and am not able to get my XYZ Tiles to render. When I add an XYZ Tile to the Map View it doesn’t appear. When I look at the XYZ Tile properties they look normal, as if the coverage was part of the project. If the XYZ tile is the first coverage that I open in a new project the project projection is set to the tile’s projection.

Although it’s quite possible that it’s a user problem, I followed several tutorials and the process seems quite simple. Any suggestions on ways to fix this or troubleshoot are welcome.

  • An XYZ file isn't a coverage, a cover is an old ArcINFO data storage type desktop.arcgis.com/en/arcmap/10.3/manage-data/coverages/… How are you adding the XYZ? As a raster or as vector points? Do you know what coordinate system the XYZ is in? Can you give a sample of the first dozen or so rows in your question? (read stackoverflow.com/questions/159521/… about opening large files partially) – Michael Stimson Jun 4 '18 at 22:13
  • These are the steps: Right-click “XYZ Tiles” in the Browser then click on “New Connection”. In the window that opens I paste “mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}” into the URL text box and type “GoogleSatellite” in the Name text box. I click “OK” and “GoogleSatellite” appears under “XYZ Tiles”. To display the tile layer I double click on “GoogleSatellite” and it appears in the Layers list but it is not rendered in the map display window. CRS: EPSG:3857 Pseudo Mercator I’m not sure what you mean by: “Can you give a sample of the first dozen or so rows in your question”. – Ned Horning Jun 5 '18 at 13:49
  • You could try running this script: raw.githubusercontent.com/klakar/QGIS_resources/master/…. It automatically adds many useful XYZ layers. If the issue is user error, this should solve it. – csk Jun 5 '18 at 18:25
  • Thanks for the script. That worked like a charm so I guess it is a user problem but I'd still like to know what I'm doing wrong. I notice the URLs are slightly difference but from the tutorials I gather that QGIS fills in the "{x}&y={y}&z={z}" portion of the URL I was using. – Ned Horning Jun 5 '18 at 20:33
  • I see, I was thinking file-based XYZ. It wasn't clear from your question that the XYZ was a service, that's important information as it completely changes the context of your question. If the comment by @csk has helped you achieve your goal then perhaps csk would like to answer this thread. – Michael Stimson Jun 5 '18 at 22:37
2

The issue here was probably user error in the process of adding XYZ tiles. The issue was solved by running a python script to load the XYZ tiles.

Link to the python script: https://raw.githubusercontent.com/klakar/QGIS_resources/master/collections/Geosupportsystem/python/qgis_basemaps.py

The script was created by Klas Karlsson: https://twitter.com/klaskarlsson/status/972757121933733889

enter image description here

Paraphrased from this answer.

  • 1
    All of the tutorials I read suggest using links that include “x”, “y” and “z” between brackets “{}” and I am not able to use those URLs to create an XYZ Tile. The URLs in the python script work. For example, for Google Maps, this works: mt1.google.com/vt/… but this does not: mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z} – Ned Horning Jun 7 '18 at 19:25
-1

Make sure you have a correct xyz tile path. See this tutorial: How to Add Google Maps Layers in QGIS for more explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.