[Qgis-user] qgis-web-client - switching

Andreas Neumann a.neumann at carto.net
Thu Mar 20 12:19:18 PDT 2014


Hi Flavio,

This is a QGIS server issue with the cache. The "unique" index in the
layer cache is the layer id QGIS automatically generated. If you just
copy projects and do not change the id of the layer then there is
"first-come, first-served".

The solution is either:

* Do not copy layers or projects but link them (use the embedded groups
and layers) - this is my own approach. It also saves you a lot of work
if you need to do changes in the first layers

* Open the qgs files in the text editor and use find-and replace. Make
sure that the same layer id isn't used multiple times in your projects

* harder: write a plugin that "randomizes" these layer ids and make them
thus unique

* even harder: change the QGIS server layer cache that the id is a
combination of the project name and the layerid - or ask/pay someone to
do so.

Hope this helps.

Andreas



Am 20.03.2014 10:50, schrieb flavio rigolon:
> Hi all,
>  I'm trying to configure a qgis-web-client.
> The topic is a set of map (5 thematic maps) referred to the same bbox
> and almost all the same layers. When I switch (via main page or via
> theme switcher) from one map to another, some layers mantain their
> "old" style (the previous style) and not the right one configured for
> the actual istance......If I restart the web server
> (/etc/init.d/apache2 restart) the problem disappear, but re-appear in
> new sessions :-|. Perhaps I'm missing something but I can't understand
> where the problem is.
> 
> Thank in advance for any suggestion/help
> 
> ciao
> flavio
> 




More information about the Qgis-user mailing list