Instead of wfs you can use a WMS GetFeatureInfo Request. I use this approach to determine which country the user clicked.
Arnd -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von maw269 Gesendet: Donnerstag, 26. Januar 2012 22:42 An: [email protected] Betreff: [OpenLayers-Users] Re: How to test if a point is within WMS layer? So I created a test polygon in GeoServer called test:allPoly and a test geometry point in OL called 'point'. Currently the point is outside the polygon but the wfstest layer still shows up. Shouldn't the wfs polygon be 'filtered out' with the code below? var wfstest = new OpenLayers.Layer.Vector("Flood Vector Test", { strategies: [new OpenLayers.Strategy.BBOX()], visibility: false, protocol: new OpenLayers.Protocol.WFS({ url: url, featurePrefix: "test", featureType: "allPoly", version: "1.1.0", srsName: "EPSG:900913" }), filters: [new OpenLayers.Filter.Spatial({ type: OpenLayers.Filter.Spatial.INTERSECTS, value: point}) ] }); -- View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-test-if-a-point-is-within-WMS-lay er-tp4341265p4341763.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
