I use this on the client side for tolerance. I use GeoServer and I don't know
if it supports the tolerance and MapServer does. I used different pixel
tolerance on each side of the point click to suit my own case.
map.events.register("click",map, function (e) {
var tolerance = { north : 3, south : 3, east : 1, west : 5};
//px
var bounds = new OpenLayers.Bounds();
bounds.extend(map.getLonLatFromPixel(e.xy.add(tolerance.east,tolerance.north)));
bounds.extend(map.getLonLatFromPixel(e.xy.add(-1 *
tolerance.west,-1 * tolerance.south)));
var coordinates = bounds.left + "," + bounds.bottom + " " +
bounds.right + "," + bounds.top;
//make getfeatureinfo request with coordinates as BBOX ;
careful the format might not be the same as above...
Event.stop(e);
});
> Date: Tue, 11 Dec 2007 09:39:38 -0800
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: [email protected]
> Subject: Re: [OpenLayers-Users] getFeatureInfo
>
> hi,
> that's really a server-side change. in mapserver for example, you'd
> set TOLERANCE in your layer.
>
>
> On Dec 11, 2007 4:38 AM, R. Ortner
> <[EMAIL PROTECTED]> wrote:
> >
> > hi,
> >
> > is there a way to expand the area of getFeatureInfo.
> > If I click on a feature in a scale of e.g. 1:1M i have to click very
> > precisely on the object to get a result (in a scale of 1:10000 it´s
> > basically ok).
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/getFeatureInfo-tp14273029p14273029.html
> > Sent from the OpenLayers Users mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > Users mailing list
> > [email protected]
> > http://openlayers.org/mailman/listinfo/users
> >
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users