<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Thanks for the clarification Oscar.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Tried:</DIV>
<DIV>&nbsp;</DIV>
<DIV>var apiwfs = new OpenLayers.Layer.WFS("API WFS", <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<A href="http://10.65.192.1/cgi-bin/apinzmg.exe">http://10.65.192.1/cgi-bin/apinzmg.exe</A>?",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{typename: 'apiaries_dev', maxfeatures: 100},<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{scales: [150000, 10], extractAttributes: true});</DIV>
<DIV>&nbsp;</DIV>
<DIV>feature.attributes[0] still yields "undefined"</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert</DIV>
<DIV><BR><BR>&gt;&gt;&gt; "Oscar Fonts" &lt;oscar.fonts.lists@gmail.com&gt; 3/06/2008 7:06 p.m. &gt;&gt;&gt;<BR></DIV>
<DIV style="COLOR: #000000">Hi, <BR><BR>There are "params" -&gt;&nbsp; WFS call, and "options" -&gt; JS object properties.<BR><BR>Try moving "extractAttributes:true" from "params" to "options", as is an OL fuctionality, not WFS protocol.<BR><BR><A href="http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Layer/WFS-js.html#OpenLayers.Layer.WFS.OpenLayers.Layer.WFS">http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Layer/WFS-js.html#OpenLayers.Layer.WFS.OpenLayers.Layer.WFS</A><BR><BR>Oscar.<BR>---<BR><BR><BR>
<DIV class=gmail_quote>2008/6/2 Robert Sanson &lt;<A href="mailto:SansonR@asurequality.com">SansonR@asurequality.com</A>&gt;:<BR>
<BLOCKQUOTE class=gmail_quote defanghtml_style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<DIV defanghtml_style="margin: 4px 4px 1px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<DIV>I am still struggling with attributes from a WFS layer.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have a WFS layer, which I understand inherits from OpenLayers.Feature.Vector. I set "extractAttributes: true" as in:</DIV>
<DIV>&nbsp;</DIV>
<DIV>var apiwfs = new OpenLayers.Layer.WFS("API WFS", <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"<A href="http://10.65.192.1/cgi-bin/apinzmg.exe" target=_blank>http://10.65.192.1/cgi-bin/apinzmg.exe</A>?",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{typename: 'apiaries_dev', maxfeatures: 100, extractAttributes: true},<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{scales: [150000, 10]});</DIV>
<DIV>&nbsp;</DIV>
<DIV>The layer loads fine and displays on my map. When I try to extract the attributes with:</DIV>
<DIV>&nbsp;</DIV>
<DIV>var options = {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hover: true,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onSelect: function(feature) {&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.Util.getElement('apiary').innerHTML = "&lt;strong&gt;Apiary_id:&lt;/strong&gt;" + feature.fid + " &lt;strong&gt;Geometry:&lt;/strong&gt;" + feature.geometry + ":" + feature.attributes[0] + ":" + feature.attributes[1] + ":" + feature.attributes[2];<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR></DIV>
<DIV>I can get at the feature.fid and feature.geometry, but calls to feature.attributes[n] return "undefined" (I have also tried "feature.data[n]".</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any pointers appreciated.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson</DIV>
<DIV><BR>&gt;&gt;&gt; Christopher Schmidt &lt;<A href="mailto:crschmidt@metacarta.com" target=_blank>crschmidt@metacarta.com</A>&gt; 3/06/2008 2:21 a.m. &gt;&gt;&gt;<BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV defanghtml_style="color: rgb(0, 0, 0);">On Mon, Jun 02, 2008 at 09:38:34AM +0200, Eric Lemoine wrote:<BR>&gt; On Mon, Jun 2, 2008 at 9:03 AM,&nbsp; &lt;<A href="mailto:bartvde@osgis.nl" target=_blank>bartvde@osgis.nl</A>&gt; wrote:<BR>&gt; &gt; Hi list,<BR>&gt; &gt;<BR>&gt; &gt; why does an OpenLayers.Feature.Vector instance have both "data" and<BR>&gt; &gt; "attributes" properties, which contain the same arrays AFAICT?<BR>&gt; <BR>&gt; I may be wrong but I'd say: "historical reasons" [*].<BR><BR>Yes.<BR><BR>Regards,<BR>-- <BR>Christopher Schmidt<BR>MetaCarta<BR>_______________________________________________<BR>Dev mailing list<BR><A href="mailto:Dev@openlayers.org" target=_blank>Dev@openlayers.org</A><BR><A href="http://openlayers.org/mailman/listinfo/dev" target=_blank>http://openlayers.org/mailman/listinfo/dev</A><BR><BR></DIV><BR><BR></DIV></DIV>
<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 defanghtml_style="background-color: rgb(255, 255, 255);">This message has been scanned for malware by SurfControl plc. </FONT><A href="http://www.surfcontrol.com/" target=_blank><FONT color=#000000 defanghtml_style="background-color: rgb(255, 255, 255);">www.surfcontrol.com</FONT></A></P></DIV><BR>_______________________________________________<BR>Dev mailing list<BR><A href="mailto:Dev@openlayers.org">Dev@openlayers.org</A><BR><A href="http://openlayers.org/mailman/listinfo/dev" target=_blank>http://openlayers.org/mailman/listinfo/dev</A><BR><BR></BLOCKQUOTE></DIV><BR><BR><BR><FONT style="BACKGROUND-COLOR: #ffffff">
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">Click <A href="https://www.mailcontrol.com/sr/V0DxUzW9P5jTndxI!oX7UmBDHWqdmev3aeaqsShuP9lvpOOimEGnQtEIgGBnpAHxQsiovm37qtteTFI5G433hQ==">here</A> to report this email as spam.</FONT></P></FONT></DIV><br><br><table bgcolor=white style="color:black"><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></table></BODY></HTML>