The qgis2web plugin exports complete rasters. But in my case these files are too large... so instead of using the entire layer I'd like to use a tiled layer that I created (with TileMill).
What would be the best way to do this? I thought of a few ideas, but being a beginner in JS I couldn't get it to work:
- Insert the ol.layer.Tile + view: new ol.View code in the index.html?
- Insert the above codes in the qgis2web.js file (I suspect this is the right way but couldn't get it to work).
- Is it possible to add the tile layer as a separate .js file and launch it from index.html?
- I also assume I have to change the background color of the map in index.html to be transparent.
The zipfile of the qgis2web output (with only two small vector layers, 200KB) can be downloaded from:
http://www.tempgis.com.au/wp-content/uploads/stackexch/ol_qgis2web.zip
The link to one of the XYZ tiled images is:
http://www.tempgis.com.au/wp-content/uploads/stackexch/regional/{z}/{x}/{y}.png