[OpenLayers-Users] DWITHIN Spatial Filter

Shadin w_ward_W at hotmail.com
Mon Dec 5 03:11:36 EST 2011


*hi list

I'm using a WFS protocol on Vector layer and I wanna filter some features
using a spatial filter. My filter is of type: DWITHIN
i need to reduce amount of data retrieved so that they could appear fast
here is a peace of y code:*

var point =  new OpenLayers.Geometry.Point(45,25)
point.transform(new OpenLayers.Projection("EPSG:4326"), new
OpenLayers.Projection("EPSG:3857"));
	
	
var vessels = new OpenLayers.Layer.Vector("WFS", { 
styleMap: styles,
strategies:
 [new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.BBOX()],
 protocol: new OpenLayers.Protocol.WFS({ 
url: "http://IP/geoserver/wfs", 
featureType: "Initial", 
featureNS: "http://mapmap.org", 
srsName: "EPSG:3857", 
version: "1.1.0", 
extractAttributes: true, 
isBaseLayer: false, 
visibility: true 
 })
filters: [
new OpenLayers.Filter.Spatial({
              type: OpenLayers.Filter.Spatial.DWITHIN,
              property: "the_geom",
              value: point,
              distance : 2000,
			  distanceUnits: 'mi' 
			 
               }) 
        		]
			  });

*this is my point (45,25) and my distance 2000 m
but i haven't noticed any improvement in the displaying speed *
   

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/DWITHIN-Spatial-Filter-tp7062101p7062101.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list