[OpenLayers-Users] passing attributes in OpenLayers.Layers.Vector addFeatures()
Max Demars
burton449geo at gmail.com
Wed Sep 10 11:57:30 PDT 2014
Hi,
I am trying to pass attributes in the same time I add features to a vector
layer in a loop like this:
for (var i = 0; i < inputFeatures.geometry.components.length; i++){
vectorLayer.addFeatures(new
OpenLayers.Feature.Vector(inputFeatures.geometry.components[i]), {
'attributes': inputFeatures.attributes });
}
This obviously doest not work. Anybody can help with my problem?
Thanks
-Max Demars
--
Stack Overflow: http://stackoverflow.com/users/1914034/burton449
GIS Overflow: http://gis.stackexchange.com/users/14426/burton449
LastFm: http://www.lastfm.fr/user/burton449
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140910/7ac6fa71/attachment.html>
More information about the Users
mailing list