On Thu, Oct 7, 2010 at 1:47 PM, Sarah Schuessler <[email protected]> wrote: > Hi list, > > I´m using a OpenLayers.Layer.Vector with a Strategy.BBOX() but I get a > OpenLayers.Filter.Spatial is undefined (BBOX.js at line 229) error at > firebug and no request is sent. With .Fixed() it´s all ok. > My layer comes from geoserver and is available. > wfs2 = new OpenLayers.Layer.Vector("Mylayer", > { styleMap: wfsStyle, > strategies: [new OpenLayers.Strategy.BBOX() ], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://myserver/geoserver/wfs", > featureNS: "http://www.openplans.org/topp", > featureType: "mylayer", > geometryName: "SHAPE", > srsName: "EPSG:4326", > version: "1.1.0" > }), > projection: new OpenLayers.Projection("EPSG:4326") > > }); > > My map (I use it with a viewport) is this: > var options = { > projection: new OpenLayers.Projection("EPSG:4326"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > scales: [1500000,1000000,750000 ,500000, 350000 ,300100, 250000, > 150000 ,90000, 75000, 50000, 40000, 30000, 20000 ], > units: "dd", > numZoomLevels: 14, > maxResolution: 1000, > maxExtent: new OpenLayers.Bounds(7.7,47.57,10.501,49.571), > allOverlays: false, > controls: [] > }; > > map = new OpenLayers.Map('map', options); > > Any hints about that?
It looks like OpenLayers/Filter/Spatial.js isn't loaded in your page. I just checked and OpenLayers/Strategy/BBOX has the @requires directive to OpenLayers/Filter/Spatial.js though. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
