[OpenLayers-Users] IE strategies

Yves Moisan yves.moisan at boreal-is.com
Thu Jan 8 08:52:46 EST 2009


>   
> 
> If your use case involves highlighting only up to ~100 features, you can
> just load the features to be highlighted using the WFSGetFeature control
> and display them on a vector layer overlaying the WMS layer (see the
> example in my previous post, which does exactly that). If you have more
> features to highlight, you may indeed run into trouble, because
> rendering them as vector features will be slow.

This brings us to the original issue.  In fact I need to be able to
update features so I need a vector layer.  In my case, I've got 1000
features in a GeoJSON object -- in fact I get the maxFeature=1000
features FeatureServer has hardcoded out of the 8000 I have:-) .  Using
clustering, I found I can bring the number of features to show to
something reasonable performancewise.  I managed my popups so that all
features clustered in cluster X show some attributes (eventually an url
to each object that I could shove into an edit form) so in my first zoom
level I get one cluster containing all 1000 features and as the number
of clusters grows as I zoom in I get fewer features in each cluster.  I
very much like the looks of that compared to a bunch of overlapping
points.  I don't know what it does for lines and polygons though. 

I did some tests with the maxFeature param of the vector layer to keep
the number of features down and I find that zooming in does not
invalidate the bounds so that I'm stuck with the N features I got for
the parent zoom level, irrespective of the fact that there are features
that were missed at the parent zoom level that should now show up.  For
example, if I ask for 50 features out of the 1000, I get points in the
upper right corner.  If I ask for 500, I get a better point
distribution.  I understand I'm getting the features sequentially in
some order so it may well be that the 50 first features are all bunched
up in some corner but when I zoom in in an area I did not get any point
for and for which I know there are features I should see maxFeature=50
features.  But I don't see anything.  That's the only part left for me
to clear.

Cheers,

Yves




More information about the Users mailing list