0

I’ve downloaded QGIS Web Client Package from this link. I extracted the package, and copied it to (C:\OSGeo4W\apache\htdocs), and I can access the app using this URL (http://localhost/qgis-web-client-master/site/index.html). In this page there is “Your Local Maps” sections which contains two maps: HelloWorld (Projection WGS84/Pseudo Mercator - EPSG 3857) NaturalEarth (Projection WGS84/Pseudo Mercator - EPSG 3857) When I try to open these maps, I get a blank application that keeps loading the maps and no map loads (in the screenshot below) I think that the problem is with the (home/web/qgis-web-client/projects/) directory in the maps links (http://localhost/qgis-web-client-master/site/qgiswebclient.html?map=/home/web/qgis-web-client/projects/helloworld.qgs) I don’t understand where is this path (home/web/qgis-web-client/projects/helloworld.qgs) or where to create it.

enter image description here

  • Welcome to gis.stackexchange! Please edit the title of your question to include enough information for future visitors to be able to find this thread when looking for the same problem. – underdark Oct 4 '15 at 12:39
2

I did manage to get the QGIS web client (QWC) working in windows, but I never managed to get it to work using the hello world or the naturalearth examples. Some things to try:

  1. I have my QWC running my qgis projects directly, and as a result I'm not able to use the per project configuration options as described in the QWC documentation. That means I'm not using index.html at all. The only control I have over options in my QWC is in the GlobalOptions.js file. Remember that many of the directions for setting up the QWC client are for linux, not windows. Thus, when you see a directory structure like /home/.... that's for linux, not windows. I've disabled the theme switcher option in GlobalOptions.js

  2. I renamed the qgis-web-client folder as "web" and moved it into my apache htdocs folder.

  3. Make a test myproject.qgs project in your desktop QGIS, and put one shapefile loaded into the project in the same directory as your qgs project. Remember to set the CRS of your qgs project as 3857, as described here at this post Then put those files into a folder in the projects sub-folders of "web".

  4. This url works for me: http://localhost/web/site/qgiswebclient.html?map=C:/OSGEO4W32/apache/htdocs/web/projects/myprojectfolder/myproject.qgs Obviously I have my apache installed as a part of my OSGEO for windows installation, but I assume this should work wherever you have apache installed.

  5. If I'm not mistaken, If you want the google maps baselayers to work (rather than the openlayers baselayers), your web pages must be publicly accessible - it won't work if your apache server is behind a firewall of your network. You can enable or disable google maps base layers in the GlobalOptions.js file.

While QWC will work in windows, I think it probably is meant to work more easily in linux. I recently set it up in a Ubuntu virtualbox virtual machine, and it was quite easy.

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.