[Qgis-developer] QGIS Web Client improvements
Alessandro Pasotti
apasotti at gmail.com
Fri Jan 3 04:06:47 PST 2014
2014/1/3 Bernhard Ströbl <bernhard.stroebl at jena.de>
> Hi Alessandro,
>
Hello Bernard, thanks for your comments!
>
> new ideas are always welcome. I comment below
>
> Am 03.01.2014 12:30, schrieb Alessandro Pasotti:
>
> Hello,
>>
>> 1. remove as many as possible hardcoded values from wsgi search scripts
>> (even if I prefer Python I did a re-implementation in PHP of these
>> scripts mainly because my customer needs them, this implementation has
>> no hardcoded values, no need for special columns and almost no
>> configuration)
>>
>
> +1 for the php implementation as on an average web server php is more
> likely already installed than wsgi
> Could you elaborate which hardcoded values and columns you removed?
>
This is all the configuration you need:
https://github.com/elpaso/QGIS-Web-Client/blob/master/php/config.php
I removed:
* the DB connection parameters (they are already in the project file)
* the search table name (it's now the layer name)
* the displaytext, and search_category fields
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).
> Be aware of SQL injection!
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).
I'm using PDO prepare statements whenever possible to avoid injections and
a preg_replace to strip away everything potentially harmful.
>
>
> 2. remove as many as possible hardcoded values from GlobalOptions.js and
>> Customizations.js or try to guess smart defaults from ProjectSettings
>> response
>>
>
> which are you aiming at removing?
Not much yet. First I want to get the map parameter from the query string:
var project_map = Ext.urlDecode(window.location.search.substring(1)).map;
Then I would like to get layer from the ProjectSettings and automatically
select layers for the reference map.
>
>
> 3. resurrect the right panel (trying to solve the map reload issue) and
>> make it optional
>>
>
> 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?
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:
* the search results
* the legend
* the feature attributes
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)
>
>
> 3.1 make this info panel optionally available in the south area instead
>> of the east one
>> 4. implement HTML tooltips taken from the HTML tooltip templates used in
>> QGIS desktop (done)
>> 5. find a way to get reference map layers from ProjectSettings instead
>> of hardcoding them
>>
>
> are you talking about the BGMaps?
No, a discussed in point 2, I would like to have a way to (optionally)
automatically guess the reference (mini-map) layers.
First option would be: take all visible layers at start.
>
>
> 6. this might be difficult or not possible: it would be nice to have an
>> interactive legend so that the user can directly click on a legend item
>> to filter->zoom to the features that match the selected legend item. I
>> feel this would require changes to the server side too....
>>
>
> the legend as created with GetLegendGraphic is - well - a graphic. I
> cannot see how you could implement this
>
I also think it's not possible at the moment.
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.
--
Alessandro Pasotti
w3: www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140103/ebcda556/attachment.html>
More information about the Qgis-developer
mailing list