<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV dir=ltr align=left><SPAN class=875103917-15102008>Hi Robert,</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>perhaps this is a
way</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>register 'featureadded'
for the vector layer</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>
* - *featureadded* Triggered after a feature is added. The
event<BR> * object passed
to listeners will have a *feature* property with a<BR>
* reference to the added feature.<BR></DIV></SPAN>
<DIV dir=ltr align=left><SPAN
class=875103917-15102008>crop_layer.events.register('featureadded', crop_layer,
regFeatureAdded);<BR></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>function
regFeatureAdded()</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>{</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>
this.attributes['name'] = 'name';</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>
this.attributes['description'] = 'description';</SPAN></DIV></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>}</SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=875103917-15102008></SPAN>b<SPAN class=875103917-15102008>ut I
have it not tested.</SPAN></DIV>
<DIV><SPAN class=875103917-15102008></SPAN> </DIV>
<DIV><SPAN class=875103917-15102008>Arnd Wippermann</SPAN></DIV>
<DIV><BR></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<B>Von:</B> users-bounces@openlayers.org [mailto:users-bounces@openlayers.org]
<B>Im Auftrag von </B>Robert Sanson<BR><B>Gesendet:</B> Mittwoch, 15. Oktober
2008 05:46<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B>
[OpenLayers-Users] Adding an attribute field to a vector layer<BR><BR></DIV>
<DIV></DIV>
<DIV>I am developing an application that allows a user to digitise crop areas.
The areas created will then be uploaded to a SQL-server database via a geoJSON
string sent to a ColdFusion service.</DIV>
<DIV> </DIV>
<DIV>How can I specify one or more attribute fields?</DIV>
<DIV> </DIV>
<DIV>I am using the following construct:</DIV>
<DIV> </DIV>
<DIV>var crop_layer = new
OpenLayers.Layer.Vector(); <BR>map.addLayer(crop_layer);</DIV>
<DIV> </DIV>
<DIV>Many thanks,</DIV>
<DIV> </DIV>
<DIV>Robert Sanson</DIV><BR><BR>
<TABLE style="COLOR: black" bgColor=white>
<TBODY>
<TR>
<TD><BR>------------------------------------------------------------------<BR>The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.<BR>------------------------------------------------------------------</TD></TR></TBODY></TABLE><BR><BR>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been
scanned for malware by SurfControl plc. </FONT><A
href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff"
color=#000000>www.surfcontrol.com</FONT></A></P></BODY></HTML>