[OpenLayers-Users] BBOX update fails when moving the map (since update from OL 2.10 to OL 2.11)

rscxdev rscxdev at gmx.de
Tue Dec 27 07:01:34 EST 2011


Hello

i'm struggling a few hours now with the following problem:

I use a vector layer + BBOX strategy to get features when panning/zooming
the map:


var prot = new OpenLayers.Protocol.HTTP({
                        url: getfeat_url,
			readWithPOST: true,
			params: {
				
				... (a few parameters for the request)
							
			},
                        format: new JSON({
				'internalProjection': new OpenLayers.Projection("EPSG:900913"),
				'externalProjection': new OpenLayers.Projection("EPSG:4326")
			})
												
                    });

var feat_layer = new OpenLayers.Layer.Vector("Features", {
                strategies: [new OL_BBOX({resFactor: 1.1})],
                protocol: prot,
		styleMap: styleMap
					
                   });

var osm_layer = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
map.addLayers([osm_layer, feat_layer]);

(standard code which you can find in examples)

I used this code in openlayers 2.10 and all was fine.
Now i changed to openlayers 2.11 and all is working fine except for features
that aren't loaded when moving the map. 
But
- if i set visibility of the feature layer to false, then to true, the
features are loaded.
- if i zoomed in/out, the features are loaded.
Only, when i move the map, no feature is loaded (there's no HTTP request
resp.).

I read other posts concerning similar problems and therefore tried to set
ratio (in BBOX class) to 1, to 1.4, to 1.8, but the problem remained. Also
changing the maxfeatures parameter of the HTTP class didnt solve the
problem.

Could someone give me a hint how to solve this, please?

Best regards
Ralph








--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/BBOX-update-fails-when-moving-the-map-since-update-from-OL-2-10-to-OL-2-11-tp7129963p7129963.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list