I have successfully set up a QGIS Server and can access the default world map when I go to the corresponding url.
I also set up qwc2 using the qwc2-demo-app
repo and I can access the default map from myapp.com/qwc
I would like to display the map that the QGIS Server is serving from the qwc2 web client. I have tried to change the url parameter of the themes.json
to the url of the QGIS Server URL but it is still displaying the default map published with the qwc2 demo app.
How do I make this web client app serve the QGIS Server map?
Best Answer
After cloning the
qwc2-demo-app
you need to edit thethemesConfig.json
file and addyour-custom-url
that is serving the qgis maps under:and under:
Determine whether the included
backgroundLayers
andexternalLayers
are relevant for your use case. Include others or remove these objects from the config altogether.Save
themesConfig.json
and then runyarn run prod
.You can now point your webserver to the resulting
prod
directory or copy it to your preferred html root. Make sure to add a location block pointing this directory in your htaccess or nginx conf files.