QGIS 3 Data Source – Troubleshooting XYZ Tiles in QGIS 3 on Mac

data-sourceqgis-3

I am trying to load background map from OSM and having problems. The data source browser->XYZ Tile comes 'pre loaded' with a link for standard OSM and this works fine. When I try to add a new source (right click -> new connection…) and fill out the dialogue with the Tile url from OSM the item appears in the menu but when I click on it I get a legend entry but no layer is displayed.

enter image description here

I have looked through the message but could not find anything relevant.

I have also tried Thunderforest links with api key but got the same result.

Best Answer

Cause of Problem and Solution

The problem is subtle. What he had entered was:

"http://a.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png "

Notice the extra trailing space after ".png" !

So, the problem is easily rectified as follow:-

(1) In the Layers panel, delete the problematic layer.

(2) In the Browser panel, edit the connection details , ie remove the trailing space.

(3) Re-Add the selected connection to canvas.

Misc Information

In the link given by the questioner, OpenStreetMap gave the URL for OpenCycleMap as "http://tile.thunderforest.com/cycle/${z}/${x}/${y}.png".

For QGIS on Windows, User can enter the URL where-is-as-is. For QGIS on MacOS, User must omit the "$", ie "http://tile.thunderforest.com/cycle/{z}/{x}/{y}.png".

As a recommendation, instead of using "a.tile.opencyclemap.org", the Questioner may wish to use "tile.thunderforest.com" as Host "a" be not be load-balanced.