if you want access every attribute, you can use something like this
function ftAttributes(ft)
{
var theHTML = "<table>\n";
for(var key in ft.attributes)
{
theHTML += '<tr><td>' + key + '</td><td>' + ft.attributes[key] +
'</td></tr>\n';
}
theHTML += "</table>\n";
return(theHTML);
}
Arnd
_____
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Vishal
Mehta
Gesendet: Freitag, 10. Juni 2011 22:57
An: [email protected]
Betreff: [OpenLayers-Users] referring to vector layer attributes byattribute
column index?
Is it possible to refer to an attribute by an index instead of its name?
I want to programmatically be able access any vector layer's attributes in a
popup when a feature is selected. Each vector layer has different number and
names of attributes.
Thanks,
Vishal
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users