133

ArcGIS Desktop has the option of using basemaps from ArcGIS online.

Does QGIS have any such options?

113

Update 2019: No plugin needed, see new answer: https://gis.stackexchange.com/a/217670/187

Update 2015: A new plugin with even more background map options is QuickMapServices

Original: Use the OpenLayers plugin to get Google Maps, Bing, OSM or Yahoo background maps.

Note that these layers are NOT SUITABLE FOR PRINTING! (see open tickets in the answer to https://gis.stackexchange.com/a/42141/187)

enter image description here

  • Recommend editing to take XYZ tile services into account. tks :) – tony gil Nov 17 '18 at 9:53
  • See other/newer answer on this page. Should be highest voted as I write this. No plugin required. – mankoff Aug 5 at 16:29
119

No plugin required

There is a core functionality XYZ Tile Server provider which was implemented with some other nice UX enhancements for tiled services (available since QGIS 2.18). This means, that there is no need for an external plugin although for an easy setup you can still use external plugins (see bottom of this post) and it offers various improvements over pure plugin based solutions.

In the browser panel, locate the Tile Server entry and right click it to add a new service.

enter image description here

Enter the URL of the service which you would like to use, replacing x, y and z parts with curly brackets substitution as can be seen below.

enter image description here

Double Click the newly created entry to add the layer to the map.

Layers added this way:

  • Load faster
  • Support reprojection
  • Support printing
  • Are cached in a powerful way
  • Are compatible with QField

Some example URLs

OpenTopoMap

https://tile.opentopomap.org{z}/{x}/{y}.png

(See comment below for attribution)

OpenStreetMap

http://tile.openstreetmap.org/{z}/{x}/{y}.png

Google Hybrid

https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}

Google Satellite

https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}

Google Road

https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}

(Codes for other tile types from Google found here)

Bing Aerial

http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1

Configuration GUI

Since version 0.18.7 and in combination with QGIS >= 2.18.8 it's possible to use QuickMapServices as a very easy to use tool for configuring layers. Just check the "Use native renderer" checkbox (thanks @DmitryBaryshnikov)

  • 1
    These connection options should be added to the QGIS browser list by default. I think any GIS software should ship with basemap capabilities a click or two away. – Jwely Feb 11 at 21:37
  • 3
    OpenStreetMap has been added by default. Others bear the risk that shipping these will trigger legal issues. If anyone is aware of other services which are safe to ship by default (or can provide legal advice) please contact the QGIS mailing list qgis.org/en/site/getinvolved/mailinglists.html. – Matthias Kuhn May 14 at 7:02
  • 1
    just was told about OpenTopoMap - use: tile.opentopomap.org{z}/{x}/{y}.png and add citation like this to your maps "map data: © OpenStreetMap contributors, SRTM | map style: © OpenTopoMap (CC-BY-SA)" (thanks to @JakobMiksch) – Juhele Aug 18 at 20:21
50

Another plugin to add basemaps in QGIS - QuickMapServices:

enter image description here

QGIS Python Plugins Repository: https://plugins.qgis.org/plugins/quick_map_services/

More info about plugin:

  • I have QGIS 2.18.3 (Mac OS X) but I don't have an option to add XYZ Tiles. you sure all 2.18.x versions have XYZ Tiles? – RutgerH Jan 14 at 17:00
  • @RutgerH I'm using QGIS 3 (Mac OS X) and it has the XYZ Tiles option. – Blundering Ecologist Mar 5 at 20:47
7

If you're looking to add the ESRI basemaps to QGIS, follow the steps in this blogpost using the QGIS Python console:

Copy and paste this code into the QGIS Python Console:

Adds ESRI_Imagery_World_2D service:

qgis.utils.iface.addRasterLayer("http://server.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer?f=json&pretty=true","raster")

Adds ESRI World_Street_Map service:

qgis.utils.iface.addRasterLayer("https://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer?f=json&pretty=true","raster")

Then you can save these as QGIS Layer Definition Files and add them later to any project

And here's the REST endpoint of all the ArcGIS Online basemaps you can add using the above code:

https://services.arcgisonline.com/arcgis/rest/services

protected by Aaron Jun 4 at 17:19

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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