<!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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>&nbsp;&nbsp;&nbsp;&nbsp; 
*&nbsp; - *featureadded* Triggered after a feature is added.&nbsp; The 
event<BR>&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object passed 
to listeners will have a *feature* property with a<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; 
this.attributes['name'] = 'name';</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>&nbsp;&nbsp;&nbsp; 
this.attributes['description'] = 'description';</SPAN></DIV></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=875103917-15102008>}</SPAN></DIV>
<DIV>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV>How can I specify one or more attribute fields?</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am using the following construct:</DIV>
<DIV>&nbsp;</DIV>
<DIV>var crop_layer = new 
OpenLayers.Layer.Vector();&nbsp;<BR>map.addLayer(crop_layer);</DIV>
<DIV>&nbsp;</DIV>
<DIV>Many thanks,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson</DIV><BR><BR>
<TABLE style="COLOR: black" bgColor=white>
  <TBODY>
  <TR>
    <TD><BR>------------------------------------------------------------------<BR>The&nbsp;contents&nbsp;of&nbsp;this&nbsp;email&nbsp;are&nbsp;confidential&nbsp;to&nbsp;AsureQuality.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;delete&nbsp;the&nbsp;message&nbsp;and&nbsp;any&nbsp;attachments.&nbsp;The&nbsp;opinions&nbsp;expressed&nbsp;in&nbsp;this&nbsp;email&nbsp;are&nbsp;not&nbsp;necessarily&nbsp;those&nbsp;of&nbsp;AsureQuality.&nbsp;This&nbsp;message&nbsp;has&nbsp;been&nbsp;scanned&nbsp;for&nbsp;known&nbsp;viruses&nbsp;before&nbsp;delivery.&nbsp;AsureQuality&nbsp;supports&nbsp;the&nbsp;Unsolicited&nbsp;Electronic&nbsp;Messages&nbsp;Act&nbsp;2007.&nbsp;If&nbsp;you&nbsp;do&nbsp;not&nbsp;wish&nbsp;to&nbsp;receive&nbsp;similar&nbsp;communications&nbsp;in&nbsp;future,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;of&nbsp;this&nbsp;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>