[OpenLayers-Users] control.SelectFeature

Sarah Schuessler sarah_flip at yahoo.de
Tue Apr 27 07:47:58 EDT 2010


Hi,

I did not use a filter yet. But I think you can find some examples at example page of OL (http://dev.openlayers.org/releases/OpenLayers-2.9/examples/filter.html for example). 
There is no filter named "buffer". You can make a GetFeature request with param "buffer"(distance).
DWITHIN is using a distance property, so all features that are all within that area is selected. With intersect you can select features that are overlay that area with only part of their geometry. But you will find some more information about that kind of filters at web.

Hope that helped a little bit.

best regards
Sarah


________________________________


Hi Sarah,

thanks for your reply.

If I look at the spatial filter documentation
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html 
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html 

I find that there are 3 things that need to be mentioned in all except the
DWITHIN filter.

What do I specify for 1) property 2) value parameter of the Spatial Filter
constructor.

the value parameter  requires either bounds or the geometry.How do I get
that for the box I am creating?

My code is:

control = new OpenLayers.Control.GetFeature({

                   protocol: OpenLayers.Protocol.WFS({

                       formatOptions: {
                           outputFormat: "text/xml"
                       },
                       url:
"/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/Shape/Rail_wfs.map",
                       featureType: 'RailwayStations',
                       featurePrefix: 'ms',
                       geometryName: 'msgeometry',
                       maxFeatures: 100,
                       var defaultFilter: new OpenLayers.Filter.Spatial({
type: OpenLayers.Filter.Spatial.INTERSECTS}, {value: bounds}) 
                   }),
                   box: true,
                   multipleKey: "shiftKey"

               });

Pls change the defaultFilter so that it gets the above two parameters.

What is the purpose of DWITHIN,BBOX Filter?
There is no Filter by the name of "buffer"?

Thanks a lot for your help.
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/control-SelectFeature-tp4930933p4968003.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100427/42801789/attachment.html


More information about the Users mailing list