<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014/1/3 Bernhard Ströbl <span dir="ltr"><<a href="mailto:bernhard.stroebl@jena.de" target="_blank">bernhard.stroebl@jena.de</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Alessandro,<br></blockquote><div><br></div><div>Hello Bernard, thanks for your comments!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
new ideas are always welcome. I comment below<br>
<br>
Am <a href="tel:03.01.2014%2012" value="+390301201412" target="_blank">03.01.2014 12</a>:30, schrieb Alessandro Pasotti:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello,<br><br>
1. remove as many as possible hardcoded values from wsgi search scripts<br>
(even if I prefer Python I did a re-implementation in PHP of these<br>
scripts mainly because my customer needs them, this implementation has<br>
no hardcoded values, no need for special columns and almost no<br>
configuration)<br>
</blockquote>
<br></div>
+1 for the php implementation as on an average web server php is more likely already installed than wsgi<br>
Could you elaborate which hardcoded values and columns you removed?<br></blockquote><div><br></div><div>This is all the configuration you need:</div><div><a href="https://github.com/elpaso/QGIS-Web-Client/blob/master/php/config.php">https://github.com/elpaso/QGIS-Web-Client/blob/master/php/config.php</a><br>
</div><div><br></div><div>I removed:</div><div>* the DB connection parameters (they are already in the project file)</div><div>* the search table name (it's now the layer name)</div><div>* the  displaytext, and search_category fields</div>
<div><br></div><div>The idea is that you should not have to modify your table and create any particular column to make it work (it might be usefult to do that in any case for performance reasons).</div><div><br></div><div>
 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Be aware of SQL injection!</blockquote><div><br></div><div>Since most parameters are now taken directly from the project file, the only parameters that need to be passed on the URL are the search text, the layer name (which doesn't go directly in the query).</div>
<div>I'm using PDO prepare statements whenever possible to avoid injections and a preg_replace to strip away everything  potentially harmful.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
2. remove as many as possible hardcoded values from GlobalOptions.js and<br>
Customizations.js or  try to guess smart defaults from ProjectSettings<br>
response<br>
</blockquote>
<br></div>
which are you aiming at removing?</blockquote><div><br></div><div>Not much yet. First I want to get the map parameter from the query string:</div><div><br></div><div>var project_map = Ext.urlDecode(window.location.search.substring(1)).map;<br>
</div><div><br></div><div>Then I would like to get layer from the ProjectSettings and automatically select layers for the reference map.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
3. resurrect the right panel (trying to solve the map reload issue) and<br>
make it optional<br>
</blockquote>
<br></div>
we were happy to have got rid of the right panel because the map always redraws when it is opened. What info do you put in there?</blockquote><div><br></div><div><br></div><div>Ideally, I would like to have the option to configure and use an additional panel (south or east) to put one or all of the following accordion tabs:</div>
<div>* the search results</div><div>* the legend</div><div>* the feature attributes</div><div><br></div><div>I'm aware of the map resize->reload problem, I'm convinced that it can be solved (and I would like to see an option here too: fo simple maps someone maybe wants to keep the map resize active)</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
3.1 make this info panel optionally available in the south area instead<br>
of the east one<br>
4. implement HTML tooltips taken from the HTML tooltip templates used in<br>
QGIS desktop (done)<br>
5. find a way to get reference map layers from ProjectSettings instead<br>
of hardcoding them<br>
</blockquote>
<br></div>
are you talking about the BGMaps?</blockquote><div><br></div><div>No, a discussed in point 2, I would like to have a way to (optionally) automatically guess the reference (mini-map) layers.</div><div><br></div><div>First option would be: take all visible layers at start.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
6. this might be difficult or not possible: it would be nice to have an<br>
interactive legend so that the user can directly click on a legend item<br>
to filter->zoom to the features that match the selected legend item. I<br>
feel this would require changes to the server side too....<br>
</blockquote>
<br></div>
the legend as created with GetLegendGraphic is - well - a graphic. I cannot see how you could implement this<br></blockquote><div><br></div><div><br></div><div>I also think it's not possible at the moment.</div><div>
But I like the way it was implemented in other frameworks, all I need is a way to get the style image for a single "class". I guess we need to add a custom WMS method to the QGIS Server.</div></div><div class="gmail_extra">
<br></div><br clear="all"><div><br></div>-- <br>Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it">www.itopen.it</a>
</div></div>