1

How do I add tiles that have been created using the Qtiles plugin as a layer into QGis and show in my project?

Ideally I would like to be able to export this as part of a QGis2Web project. I have seen the tutorial here which shows how to add the layer as a basemap after exporting through QGis2web, but I would like to be able to have in in my project as a working layer rather than a base map.

1

I've not tried this myself, but can you add your tiled layer back into QGIS as an XYZ layer (find out how here: https://www.lutraconsulting.co.uk/blog/2016/10/26/qgis-xyz-tile-wmts-preview/)? I've never tried it with a relative URL, so I don't know whether it will work. In turn, even if it does, I don't then know whether qgis2web will handle the relative path.

If it doesn't work, upload your tiles to your server, and then add the uploaded tiles back into QGIS as an XYZ using its full (non-relative) URL. That should work.

I'd be very interested to hear whether this works, so do leave a comment if you are able to try it out.

  • Thanks for the information. I checked this out and have tried adding it using the suggested format. Unfortunately it did not work for me, even when the images are already hosted. I tried every combination of {z},{x},{y} but so far have had no success. – Darren Noble Jan 18 '18 at 15:23
  • If you can post some URLs/addresses, that could help, and describe the folder structure of the exported tiles. – Tom Chadwin Jan 18 '18 at 16:05
  • Thanks,I have opted to edit the layers.js file to point to a hosted tileset. This is all I could get to work The folder structure was the default setting on QTiles with nothing checked in Parameters other than "Lock 1:1 ratio". – Darren Noble Jan 20 '18 at 17:00
  • 1
    Update. I was able to add the tiles to my QGis project once they were hosted using the suggested method and the image format "../{z}/{x}/{y}.png" I have successfully exported form qgis2web. There was One problem which I was able to fix manually. qgis2web assigns the "base" property to the tileset, so manual deletion of that in the layers.js file is required. Thank you @Tom_Chadwin for your assistance – Darren Noble Jan 22 '18 at 8:29
  • Hi I'm trying to do the same in QGIS 3 running on OSX Mojave, what's the address I have to use in order to have the locale tiles show up? – Luca Moiana May 4 at 14:19

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.