Using GDAL
The QuickMapsServices and OpenLayers plugins, as described in the Loading BaseMaps with the QuickMapServices plugin and Loading BaseMaps with the OpenLayers plugin recipes in Chapter 4, Data Exploration, are awesome as they put a reference layer in your map session. The one downside, however, is that it is a hassle to add new layers. So, if you come across or build your own Tile service and want to use it in QGIS, this recipe will let you use almost any Tile service.
Getting ready
You will need a web browser, text editor, and the URL of a web-based XYZ (sometimes called TMS) service—one that allows you to make requests without an API key. We're going to use the maps at http://www.opencyclemap.org/.
Viewing the JavaScript source (a good tool for this is Firebug, or other web-developer tools for the browser), we can view the source URLs for the tiles.
How to do it…
Open http://www.opencyclemap.org/ in a web browser.
Now, figure out the URL for the tiles by looking at the source code...