[OpenLayers-Users] removing oldest feature from vector layer

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Thu Jun 30 15:56:21 EDT 2011


Hi all,

I've been playing with a script that dynamically adds features to a vector
layer. I'd like to limit this to 100 or less features. How would I go about
implementing this? clearly it should start something like

if (features.length > 100){
//code to remove oldest feature
}

any suggestion?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110630/fe0e05ea/attachment.html


More information about the Users mailing list