Hi, <br>

<br>
There are &quot;params&quot; -&gt;&nbsp; WFS call, and &quot;options&quot; -&gt; JS object properties.<br><br>
Try moving &quot;extractAttributes:true&quot; from &quot;params&quot; to &quot;options&quot;, 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" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div 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 &quot;extractAttributes: true&quot; as in:</div>
<div>&nbsp;</div>
<div>var apiwfs = new OpenLayers.Layer.WFS(&quot;API WFS&quot;, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;<a href="http://10.65.192.1/cgi-bin/apinzmg.exe" target="_blank">http://10.65.192.1/cgi-bin/apinzmg.exe</a>?&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{typename: &#39;apiaries_dev&#39;, 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(&#39;apiary&#39;).innerHTML = &quot;&lt;strong&gt;Apiary_id:&lt;/strong&gt;&quot; + feature.fid + &quot; &lt;strong&gt;Geometry:&lt;/strong&gt;&quot; + feature.geometry + &quot;:&quot; + feature.attributes[0] + &quot;:&quot; + feature.attributes[1] + &quot;:&quot; + 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 &quot;undefined&quot; (I have also tried &quot;feature.data[n]&quot;.</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 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 &quot;data&quot; and<br>&gt; &gt; &quot;attributes&quot; properties, which contain the same arrays AFAICT?<br>&gt; <br>
&gt; I may be wrong but I&#39;d say: &quot;historical reasons&quot; [*].<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 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 style="background-color: rgb(255, 255, 255);" color="#000000">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>