1

I have created tiles via Qtiles plugin in QGIS.

Here is the code snippet I have so far:

QString url = "file:///C:/Users/USER/Desktop/TiledMap/{z}/{x}/{y}.png";
QgsRasterLayer * lyr = new QgsRasterLayer ( url, "tiledLayer", "wms" );
QgsMapLayerRegistry::instance()->addMapLayer(lyr , true);

The layer does not show up though. What am I missing? Is there something wrong with the URL?

I originally created the tiles via QTiles plugin using the following options:

Minimum zoom level: 5, Mazimum zoom level: 12

  • 1
    Which qgis version are you using? – ndawson Aug 25 at 20:43
  • I'm using version 2.14 – Salman Ahmed Aug 26 at 5:14
  • Upgrade to a recent version -- support for this was added in qgis 3. – ndawson Aug 26 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.