0

I'm trying to produce a web map using the QGIS2web plug in and leaflet output, but the background image is not visible when I zoom in beyond some scale. Is there a way to control the scales a background image is visible?

My map is set up with 5 vector layers displayed over a Google Satellite image. It exports quickly to Leaflet, but the background layer disappears when zoomed in too much.

The background shows up fine when zoomed out enter image description here

But disappears when you zoom in. enter image description here

I've tried exporting when zoomed in to different scales, but that does not appear to have any effect on the output. I haven't been able to find any settings in the Export to Web window that would allow me to change the visibilty settings, as there are for the vector layers.

  • 1
    I assume your basemap is through a web service rather than a raster image you have saved on your computer. Try manually loading that layer as an XYZ tile layer, and setting a lower max zoom level (eg if the default is 19, try setting it to 18). This should force it to keep the lower-resolution tile when you zoom in past the level where it runs out of tiles. The method is explained here: gis.stackexchange.com/a/286172/81764 – csk Apr 12 '19 at 20:02
  • @csk My basemap is through a web service loaded as an XYZ tile layer. I tried changing the max zoom level (it was 18, and I tired 12, 17, and 20). At a lower level the resolution was terrible. There is no visible difference between the look or behavior of the exported map between 17 and 20. Within QGIS the higher settings look better when zoomed in, as expected. In the leaflet version, both are visible at identical scales. – Brian Fisher Apr 13 '19 at 20:14
0

The background image probably has a certain resolution that only allows a particular zoom level. If this is the cause, I would approach the issue differently and limit the zoom scale that you permit for your own map. If the deep zoom is absolutely necessary, you might want to look for a different raster image on the web.

| improve this answer | |

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.