[OpenLayers-Users] Re: Confusing behaviour of GetFeature control in BBox based selection

Wouter van Nifterick wouter at ars.nl
Mon Feb 20 14:21:11 EST 2012


Alex <zeitalex at ...> writes:
> 
> 
> To keep in the same thread, I post it again.Solution is to disable "Loose 
bbox" in Geoserver's Datastore
> 2011/2/10 Alex <zeitalex at googlemail.com>
> Dear Charles,
> Thank you very much for your answer.Yes, I tried. I even set
> it to 0. It does not change anything. The problem is that selection is done on
> the base of the Bounding Box of a Line. In some cases if user clicks near one
> line then another (longer) line located far from mouse click is selected. It 
is due to fact that mouse click is inside of the BBox of the longer
> line and not inside of the line that is closer to the click point. I 
desperately
> trying to figure out how to disable BBox based selection. I don’t know why it
> is default behaviour, it is so confusing. Probably the reason is that BBox 
based
> selection is faster. But why there is no easy way to change this default 
behaviour?2011/2/10 Charles Galpin <cgalpin at lhsw.com>
> 
> 
> Have you tried a lower "clickTolerance"? The default is 5 pixels.
> hth,charles
> 
> 
> 
> On Feb 10, 2011, at 5:46 AM, Alex wrote:
> > We use Geoserver with PostGIS and OpenLayers to display a river network as 
WMS Layer. The user should be able to click on the river and get its name as 
Popup. It is no problem so far. But if one is clicking between several rivers 
then selection becomes very confusing. In some cases rivers that are located 
much farer from mouse click then others are selected

..

Late reaction, but thanks man! 
I found your message via Google, because I had the same problem.

I've been trying to nail this one for a couple of hours now. Your solution 
(disabling "loose box") did the trick.  You've probably saved a couple of more 
hours/days. I didn't even know that this option was there on the data store 
level (I'd expect something like this on a layer or request level).

Regards,
Wouter




More information about the Users mailing list