Re: [OpenLayers-Users] doing a search with a buffer

2010-05-14 Thread Roald de Wit
Hi, What you want is more difficult than I realised. If you can retrieve the geometry of the feature you are interested in, you could use that in your filter (instead of the point). Have a look at the getfeature-wfs example on how to do that [1]. If you cannot retrieve your geometry it's

Re: [OpenLayers-Users] doing a search with a buffer

2010-05-11 Thread sunny74
Hi Roald, Thanks for your reply. If I have the center point of the selected region then your code will do the rest. But the problem is that when the box is drawn using the GEtFeature control it is not possible to get center point of the selected region or the bounds of the selected region. If

[OpenLayers-Users] doing a search with a buffer

2010-05-09 Thread sunny74
Hi Friends, I want to do a search with a buffer. My scenario is like this. I get a structure Id from the user and using that I get the geometry of that structure from the postgres DB. Now I want to do a search of all structures within a radius of say 100km from the structure selected by the

Re: [OpenLayers-Users] doing a search with a buffer

2010-05-09 Thread Roald de Wit
Hi, From your other post ('drawing a polygon over selected region'), I assume that you're using MapServer. You can quite easily add a spatial filter to your WFS request. var radius = 100 * 1000; // 100km // create point from your lat and lon of your selected feature

Re: [OpenLayers-Users] doing a search with a buffer

2010-05-09 Thread Eric Lemoine
On Sunday, May 9, 2010, sunny74 sb@hotmail.com wrote: Hi Friends, I want to do a search with a buffer. My scenario is like this. I get a structure Id from the user and using that I get the geometry of that structure from the postgres DB. Now I want to do a search of all structures