Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I recompiled OpenLayers with minimal settings, and now Vector layer, that uses BBOX strategy, stopped adding bbox parameter to the queries.

What components do I need to add?

This is the current config:

[first]
[last]
[include]
OpenLayers/Map.js
OpenLayers/Kinetic.js
OpenLayers/Projection.js
OpenLayers/Layer/Vector.js
OpenLayers/Layer/OSM.js
OpenLayers/Layer/Bing.js
OpenLayers/Layer/WMS.js
OpenLayers/Layer/Google/v3.js
OpenLayers/Popup/FramedCloud.js
OpenLayers/Control/Navigation.js
OpenLayers/Control/Zoom.js
OpenLayers/Control/Attribution.js
OpenLayers/Control/SelectFeature.js
OpenLayers/Control/Panel.js
OpenLayers/Control/LayerSwitcher.js
OpenLayers/Renderer/SVG.js
OpenLayers/Renderer/VML.js
OpenLayers/Format/GeoJSON.js
OpenLayers/Protocol/HTTP.js
OpenLayers/Strategy/Fixed.js
OpenLayers/Strategy/BBOX.js
OpenLayers/StyleMap.js
OpenLayers/Rule.js
OpenLayers/Filter/Comparison.js
OpenLayers/Filter/Logical.js
[exclude]

This is quite important, because the complete OL is 990K, while the minimal is only 350K big, and my users may be in remote areas with very slow connections.

It was not just Filter/Spatial. I noticed that even with Spatial it didn't compose a query string. I bisected the whole list of components and it was... OpenLayers/Format/QueryStringFilter.js.

share|improve this question
    
I added Filter/Spatial, and it worked. I also found out that Format/GeoJSON was necessary. –  culebrón Apr 26 '12 at 9:19
    
culebron: the OpenLayers build tools are really supposed to do this for you. This might indicate a bug in OpenLayers that it doesn't; you might consider reporting it as an issue. –  Christopher Schmidt Apr 26 '12 at 11:30
add comment

2 Answers 2

up vote 2 down vote accepted

I think you might be missing the Filter/Spatial.js class, though it looks like it should be pulled in automatically by the BBOX Strategy without any work for you when you use the build tools. I would say that adding that should work -- and if it doesn't, I think that a simple set of OpenLayers code that demonstrated the problem with the build you're using would be helpful to attempt to reproduce the problem.

share|improve this answer
add comment

when you look at BBOX.js in lib from openlayers dir you can see sth. like this:

/**
* @requires OpenLayers/Strategy.js
* @requires OpenLayers/Filter/Spatial.js
*/

when you add this two file to system, i think your problem will be solved.

i hope it helps you...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.