[OpenLayers-Users] VectorLayer - getFeaturesByAttribute

Daniel Degasperi daniel.degasperi at r3-gis.com
Mon Apr 26 04:35:27 EDT 2010


Hi,
I've the necessity to grep features from my VectorLayer on basis of a 
attribute. As it is now, I have to go through all the features and check 
their attribute:

var features = []
for(key in vectorLayer.features) {
     if (vectorLayer.features[key].attributes.type == 'something')
         features.push(layerRouting.features[key]);
}

Could it be interessting to have such Feature (getFeaturesByAttribute) 
in a offical Release for OpenLayers?

Best regards,
Daniel

-- 
   Daniel Degasperi
   Software Developer
   daniel.degasperi at r3-gis.com

---------------------------
   R3 GIS Srl
   Via Johann Kravogl 2
   I-39010 Merano - Sinigo (BZ)
   Tel. +39 0473 494949
   Fax. +39 0473 069902
   Web  http://www.r3-gis.com
-----------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100426/10ef2d27/attachment.html


More information about the Users mailing list