[OpenLayers-Users] IE strategies

Andreas Hocevar ahocevar at opengeo.org
Fri Jan 9 17:52:20 EST 2009


Yves Moisan wrote:
>> My bad. It should read
>> new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}})
> 
> Well, I was dumb enough to stick it in the Cluster() strategy of my
> 2-strategy layer on my side of the story :-(.  At any rate, I can
> confirm that an XHR is done on zoom in now.
> 
> I still have issues though.  One peculiar thing is that for some reason
> the BBOX issued by OL to the server is consistenly larger than the one
> specified in map.zoomToExtent.  Here are numbers (HTML =
> map.zoomToExtent(new OpenLayers.Bounds()); and "Output BBOX" is sent out
> to the server) :

See the ratio property of the BBOX strategy. You may want to set it to 1 
(the default is 2, which means it will request a bbox twice as large as 
the viewport).

> There are also issues with the masfeatures parameter : a small number of
> maxfeatures might bring in less features than maxfeatures even though
> the number of features definitely is more than maxfeatures.  To
> illustrate results comparing BBOX alone and Cluster, see :
> 
> http://www.flickr.com/photos/30818159@N05/3182451399/ shows BBOX +
> Cluster (maxFeatures = 200) on the left and BBOX alone on the right.
> Both return 101 features.  Good
> 
> http://www.flickr.com/photos/30818159@N05/3182451587/ shows BBOX +
> Cluster maxFeatures = 200 on the left (results in 101 features) and
> maxFeatures = 10 on the right (results in 9 features ???).  There
> clearly should be 10 features returned.

This obviously has to do with the ratio property mentioned above: 
maxFeatures applies to the bbox requested from the server, which is 
twice as large as the visible viewport (if using the default ratio of 2).

Regards,
Andreas.

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list