I have solved this problem (and others) using server code. In my case I'm working on a Django project which acts as a proxy between qgis-web-client and qgis-server.<div>Without something like this the only options would</div>
<div><br></div><div> - (generic) be to implement a method inside qgis-server which could pass the qgis project to the client, probably in a json-formatted fashion </div><div> - (specific) implement methods to retrieve specific informations about the qgis project, like the layer visibility</div>
<div><br></div><div>giovanni<br><br><div class="gmail_quote">2012/10/19 Dieter Becker <span dir="ltr"><<a href="mailto:webmapping.dieter@gmail.com" target="_blank">webmapping.dieter@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;WORD-SPACING:0px"></span>Dear QGIS-users,<br>

 <br>I have got a questions concerning the layer-visibility of the QGIS-Webclient:<br> <br>In some older mails (11/2011) of this mailinglist I found following information:</div>
<div> </div>
<div>---</div>
<div><span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;WORD-SPACING:0px">There is also a pending feature in QGIS server that should allow to<span> </span></span><br style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px">

<span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;WORD-SPACING:0px"> retrieve layer visibility from the GetCapabilities XML document, thus<span> </span></span><br style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px">

<span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;WORD-SPACING:0px"> eliminating the need to manually set layer visibility.<span> </span></span><br style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px">

<br style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;WORD-SPACING:0px"> Andreas<span> </span></span></div>


<div> </div>
<div>---</div>
<div> </div>
<div>Does someone of you know if there is found a convienient way in the meantime to automatically determine the visible layers of a qgis-project so that there is no need to write down everey layer for the rest-adress?</div>


<div> </div>
<div>I know that for example the qgis-cloud-plugin for QGIS produces a js-config file that has the information about visible layers and start-/maxExtent.</div>
<div>But is there also way to use something like this if I want to host my own webclient?</div>
<div> </div>
<div>best wishes,<br> <br>Dieter </div>
<div><span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;WORD-SPACING:0px"></span> </div>
<div><span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:13px Verdana,Geneva,Helvetica,Arial,sans-serif;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;WORD-SPACING:0px"><span></span></span> </div>

<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br></blockquote></div><br></div>