I created a web map with the qgis2web plugin. The map simply contains 2 polygon and 1 point layer. Since I just wanted a static map with these 3 layer I don´t use any basemap.

The final map should be placed in a frame on website and thats where things started to get dicey. The map doesn´t scale correct when the window size of the browser is changed or on mobile devices.

I assume since the map is in a “sub”-frame of the website the


from meta doesn´t kick in since the frame always stays in the same proportion to the Website.

I´ve looked around for a solution and found this:


I would work fine, but I would prefer a more dynamical solution rather than defining the possible widths for all zoom levels..

Note that the map will always be on a fixed zoom level (all zoom controls are disabled). The zoom level should be the maxmium possible with in the frame, so that all Layer-content is visible.

1 Answer 1


This should work so long as:

  • you used the "full-screen" template in qgis2web, which sets the map div to width: 100%
  • your iframe is configured to resize responsively

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.