[OpenLayers-Users] Re: How to test if a point is within WMS layer?

Mark Prins mc.prins at gmail.com
Thu Jan 26 15:30:18 EST 2012


2012/1/26 maw269 <maw269 at gmail.com>:
> Thanks Greg,
> It sounds like using WFS is out of the question. The thing is I wouldn't
> know how to pass the point-in-polygon client query to the server and utilize
> the response. Can anyone show me how to do that?
> --Matt
>
> --

you could use a spatial filter to let the WFS do the work
http://dev.openlayers.org/apidocs/files/OpenLayers/Filter/Spatial-js.html
eg. Intersect with the point

essentially you would send the filter then, on returning from the WFS,
test the response for a geometry, if it has one, the point is within a
polygon.
check out the examples for filter.

-- 
Disclaimer;
This message is just a reflection of what I thought at the time of
sending. The message may contain information that is not intended for
you or that you don't understand.


More information about the Users mailing list