3

I have a problem in exporting a QGIS project to an OpenLayers web map using QGIS2Web.

While exporting the project the browser opened and showed the correct map (index.html). Then I saved the file for later use. But after clicking on the file name I ran into a problem:

The browser started, but showed an empty screen.

0

1 Answer 1

3

When you move the output index.html to somewhere else, you need to move the subfolders (layers, resources, styles) along with it. Does that fix it?

6
  • That fixes the problem! It seems to me, as if index.html gets data out of these 3 folders: <script src="layers/......js"></script ..... <script src="styles/.......js"></script ..... Is it possible to integrate the contents (scripts) of the 3 folders into the html file? I thought, that QGIS2Web would take that part?
    – Juergen
    Commented Dec 8, 2015 at 19:01
  • If you add a pair of script tags to index.html <script></script>, you can then copy the contents of all the .js files in between those opening and closing tags. I'm not sure where in index.html would be best, but that could work for you. However, you will end up with an enormous and messy page. Commented Dec 8, 2015 at 20:07
  • Thank you for your comment. This would result in a lot of work (there are more than 60 scripts). Is there any piece of software available that does the final job of qgis2web?
    – Juergen
    Commented Dec 8, 2015 at 20:38
  • Why are multiple files and folders a problem in your situation? Commented Dec 9, 2015 at 0:36
  • In a first step I want to use the html file only for passing the map to somebody else without having the need for intalling qgis in the other place. In a second step I think of using the html file as a web map, in this case multiple files and Folders wouldn´t be a problem.
    – Juergen
    Commented Dec 9, 2015 at 9:08

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.