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

maw269 maw269 at gmail.com
Thu Jan 26 16:41:58 EST 2012


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-layer-tp4341265p4341763.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list