[qgis-qwc2] Transitioning from QWC1 to QWC2

Adriano Kaulich adriano.kaulich at gmail.com
Fri May 5 08:55:40 PDT 2017


Thank you Sandro for your reply, it got me onto the right track. For 
anyone wondering, here is how I made the transition.

When I first executed the 'yarn run prod' command from within the the 
demo app directory, I copied the results (the 'prod'-folder) into the 
/var/www/html/ directory and got the QWC2-Demo-App running under 
'http://localhost'.

I also had a QGIS-Server running a project of mine, and get a valid 
response from it under

http://localhost:81/cgi-bin/project/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

What I had to do is paste the first part of the project-URL, 
http://localhost:81/cgi-bin/project/qgis_mapserv.fcgi, into the first 
entry in themes.config.js of the original qwc2-demo-app folder, adapt 
the first entry's properties accordingly (title, attribution, etc.), 
delete the other, unwanted theme entries that are all part of the demo 
application, and rerun 'yarn run prod'. And then replace the files in 
'/var/ww/html/' with the newly created ones. Under the URL 
'http://localhost', there is now my QGIS Project with the shiny new QWC2 
look.

I don't know if setting this up was easier back then with QWC1, but it 
certainly looks nicer now :)

Great work, thank you very much!

On 10.04.2017 14:07, Sandro Mani wrote:
> Hi
>
> The idea with QWC2 is that you have a QGIS Server up and running which 
> serves the projects you want to use as WMS, and then in 
> themesConfig.json you specify the url to the WMS. The themesConfig.js 
> script (invoked via yarn run themesconfig) will then query the QGIS 
> Server and generate a themes.json file which contains all the infos 
> QWC2 needs to display a theme. So the location where you need to place 
> the qgs files depends on your QGIS Server configuration, as far as 
> QWC2 is concerned, what matters is that the project is served as WMS.
>
> Hope this helps
> Sandro
>
>
> On 10.04.2017 13:56, Adriano Kaulich wrote:
>> Hi all,
>>
>> I was exited to learn at FOSSGIS 2017 that QWC2 was already at beta 
>> and wanted to try it out. I didn't realize though, that the 
>> architecture is very different to that of the original QWC. Once I 
>> got the demo app running (which was comfortably easy to do), I tried 
>> to investigate how the new QWC works.
>>
>> In the original QWC, *.qgs-files could be saved in the project 
>> folder, where the demo projects where located as well. With QWC2 
>> though, I have a hard time finding the location of the demo projects, 
>> or understanding how I would implement my own. I have several 
>> QWC-Projects with the original Version that I wanted to move to the 
>> new QWC2. What I took away from the German documentation is, that 
>> projects are now called themes. But I didn't understand how to edit a 
>> theme with QGIS Desktop, nor was it made clear where the demo themes 
>> are stored as QGIS-Project files. Is there a tutorial out there that 
>> eases the transition from QWC1 to QWC2?
>>
>> With best regards,
>> Adriano
>> _______________________________________________
>> qgis-qwc2 mailing list
>> qgis-qwc2 at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
>
> _______________________________________________
> qgis-qwc2 mailing list
> qgis-qwc2 at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-qwc2



More information about the qgis-qwc2 mailing list