[Qgis-developer] QGIS Server and OL3 GetFeatureInfo requests issue
Mathias Walker
mwa at sourcepole.ch
Thu Sep 17 06:39:51 PDT 2015
Hi Giovanni
QGIS Server uses a fixed percentage (1 or 2%) of the image size as a default
tolerance for GetFeatureInfo requests. This works nicely with a full sized
image e.g. in the QGIS WebClient. But with the smaller image size in the OL3
GetFeatureInfo request this results in a single pixel tolerance which requires
pixel perfect clicks.
There are new parameters in QGIS Server to set the tolerance in GetFeatureInfo
requests (should be available from QGIS 2.10):
FI_POINT_TOLERANCE
FI_LINE_TOLERANCE
FI_POLYGON_TOLERANCE
The tolerances can be set in pixels per geometry type.
If you add these parameters to your OL3 getGetFeatureInfoUrl() calls, the
feature info requests should respond to less precise clicks.
Cheers
Mathias
Am Donnerstag, 17. September 2015, 12.07:32 schrieb G. Allegri:
OL3 has changed the way GetFeatureInfo request parameters are generated.
The nre way uses fixed WIDTH/HEIGHT and X/Y (I/J) params: 101 for the first and
50 latters. Then it builds the BBOX parameter consequently.
The old way they were built from the size and extent of the map, and the query
coordinate.
The new style makes QGIS Server respond with empty results if the click is not
exactly on the feature coordinates.
I've tested the same request on the same layer served by Geoserver, which
responds even with not so precise clicks.
Can this be caused by coordinates rounding happening inside QGIS Server?
giovanni
--
Giovanni Allegri
http://about.me/giovanniallegri
Gis3W - http://gis3w.it
Ikare - http://ikare.it
Twitter: https://twitter.com/_giohappy_
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
--
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, 8004 Zürich, Switzerland
Tel: 044 440 77 11 Direkt: 044 515 67 71
mwa at sourcepole.ch http://www.sourcepole.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150917/aae5171e/attachment-0001.html>
More information about the Qgis-developer
mailing list