197

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 ...


58

Another plugin to add basemaps in QGIS - QuickMapServices: QGIS Python Plugins Repository: https://plugins.qgis.org/plugins/quick_map_services/ More info about plugin: http://nextgis.ru/en/blog/quickmapservices/ http://nextgis.ru/en/blog/quickmapservices-with-contributed-services/ http://nextgis.ru/en/blog/quickmapservices-in-gray/ http://nextgis.ru/en/...


21

No plugin required Credits/Author: @Klas Karlsson and an extension to @Matthias Kuhn's answer. Plugins > Python Console > Show Editor Copy&Paste the code below into a new Python file and press Run script """ This script should be run from the Python consol inside QGIS. It adds online sources to the QGIS Browser. Each source ...


12

Open Topo Map: https://tile.opentopomap.org/{z}/{x}/{y}.png Thunderforest (Landscape) https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=YOUR_API_KEY


12

@MatthiasKuhn has provided some examples in his answer to this post: Adding Basemaps from Google or Bing in QGIS? For Bing, you could use: http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1 For HERE maps, you will need to register in order to obtain an APP_ID and APP_CODE which can then be used for accessing satellite map tiles via the following URL:...


10

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"...


7

Here is the code which is working for me: urlWithParams = 'type=xyz&url=https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0&crs=EPSG3857' rlayer = QgsRasterLayer(urlWithParams, 'OpenStreetMap', 'wms') if rlayer.isValid(): QgsProject.instance().addMapLayer(rlayer) else: print('invalid ...


5

For such cases, it is much easier to debug in a browser. You can create a web map with your tile layer and view it in a browser such as Chrome. When you open Developer Tools, you can see the failed requests in the Network tab. I have created a simple leaflet based template using JSFiddle. You can open https://jsfiddle.net/spatialthoughts/6mz4obtw/1/ and ...


4

Although it doesn't appear in the "Add Layer" dialog, I can add XYZ tiles from this option in the "Browser" panel: Right-click to add a new tile server connection, or choose one of the existing ones. If you don't have a "Browser" panel open, use View... Panels... Browser to get one.


4

By the GeoWebCache documentation https://www.geowebcache.org/docs/current/services/tms.html the flipY parameter is what need. The TMS specification has the TileGrid Map origin located at bottom left so Y coordinates grow up moving towards north. A vendor parameter “flipY=true” can be appended to the path to support Y coordinates numbered in the opposite ...


3

That's not because of your locale. Open Street Map uses Hebrew labels in Israel by default. According to the OSM Wiki there's no web feature service of OSM data, so you're stuck using pre-generated tile sets. As far as I can tell, OSM doesn't have a tile server with English-only labels. You can add English labels to your map in this way: Use the Quick OSM ...


3

Among the basemaps provided by the QuickMapServices plugin is a set of basemaps called "TianDiTu." According to the Wikipedia article for Tianditu, this is "China’s first official free web mapping service," created and provided by the government. That seems as solid a local solution as you could possibly get without a VPN. The QuickMapServices plugin ...


3

After adding the layer to your project, you can right click it, go to Properties->Symbology. Here you can adjust brightness as well as contrast:


3

Have you made sure your maps are using the same CRS as the tiles and conform with the zoom level default scales? (see below) Use the Same Native CRS as Tiles Most XYZ tiles are produced in CRS - EPSG:3857 . When using a different CRS this can skew the image and make the labels more difficult to read. See below Conform with Zoom level default scales XYZ ...


3

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/...


3

there are several satellite base maps which can be applied to QGIS as the base map of the project and some of them are, Google Earth Base Map Bing Virtual Earth Base Map Esri Base Map please follow the following steps, Go to Layers > Data Source Management Go to the tab XYZ Connections Add a New XYZ Connection fill the name and the web URL from ...


3

Building on @IvanSanchez's comment, to get this to work in qgis2web, you'll have to get the contents out of the MBTiles file. Unzip the MBTiles into a directory on your website, retaining the XYZ folder structure. You can then add that location into QGIS as an XYZ layer. qgis2web will then export it.


3

The Difference operation is an operation that only works with vector layers (as you can see from the fact that it's located in the vector menu). You can't process any raster with that. The OpenStreetMap Layer represents raster data from raster tiles. If you want to process OpenStreetMap data with the Difference operation, you should first download OSM data ...


3

I've made a demo by adding first OpenStreetMap tiles (EPSG:3857) and then shapefile within file cadastre-77-parcelles-shp.zip from https://cadastre.data.gouv.fr/data/etalab-cadastre/2020-10-01/shp/departements/77/ that use EPSG:2154. If you use the GeoJSON version e.g https://cadastre.data.gouv.fr/data/etalab-cadastre/2020-10-01/geojson/departements/77/ your ...


2

The MBTiles specification https://github.com/mapbox/mbtiles-spec/blob/master/1.2/spec.md does not say anything about how many pixels a tile should contain. Specification defines the grid but all that is said about the BLOB that contains the image data is that it must be either jpeg or png image and therefore a MBTiles database with 512x512 sized tiles is ...


2

I had this problem to when exporting an image just now and I figured it out. I just changed the DPI it's exporting at. It has nothing to do with monitor DPI as far as I know. 72 dpi worked well for me. You can find the setting under layout > export settings > export resolution:


2

ol.source.XYZ has a maxZoom option source: new ol.source.XYZ({ url: 'http://localhost:4200/assets/tile/{z}/{x}/{y}.png', maxZoom: 13 })


2

The coordinates for the zxy tile system are based off of the Web Mercator Projection: 3857. More information on the coordinate system is here: https://epsg.io/3857 You bounds are covering the whole world, and the width and height are the size of the world, when approximating a sphere. 40075016 meters is basically the circumference of the earth at the ...


2

The suggestion that you can get the XYZ Tiles from the "Browser" Panel is misleading since there is no panel named Browser in QGIS 3. The only way to get this option is to open the "Add Layer" window and select the 'Browser' tab from there. Where the browse button is in the QGIS 3.4 Data Source Manager


2

Shot in the dark, but a nasty little source of error: you need to remove the $ before each matrix parameter, i.e. https://tile.openstreetmap.org/{z}/{x}/{y}.png Note: I also omitted the domain prefix to let QGIS/the OSM server automatically choose from the available.


2

With help from Nyall Dawson and Givanni Manghi, there appears to be an issue with transformations with limited geographic extent and xyz tiles. To correct the issue: Determine the CRS of the xyz tiles for Google Satellite this is EPSG 3857 - Pseudo-Mercator. Go to Project Properties > CRS. Select the plus button under Datum Transformations. Select ...


1

You can use this code to add tile layer in the map. This is a script based and to be run in the console, but you can integrate it into Plugin if that's what you are looking for. sources = [] sources.append(["connections-xyz","Google Maps","","","","https://mt1.google.com/vt/lyrs=m&x=%7Bx%7D&y=%7By%7D&z=%7Bz%7D","","19","0"]) sources.append(["...


1

I was having the same issue, ran the python code and it wouldn't load still, but when I went to xyz properties > set map zoning to MGA 56 then now it rasterizes.


1

Seems to be a problem with the CRS of the shapefile layer. In QGIS, it can be changed in Layer > Properties > CRS. Changing the CRS of the layer doesn't modify the coordinates of its geometries, but the way they should be interpreted. When you find and assign the correct CRS in which the coordinates of the geometries must be interpreted (always ...


1

I'm wondering that this fantastic script by Klas Karlsson has not yet been linked here: https://twitter.com/klaskarlsson/status/972757121933733889?lang=de Open your python console in QGIS (Ctrl-Alt-P or from the plugins menu), copy/paste the code from here and run: https://raw.githubusercontent.com/klakar/QGIS_resources/master/collections/Geosupportsystem/...


Only top voted, non community-wiki answers of a minimum length are eligible