Hi all,<br><br>Im new qgis and gis in general so sorry for the newbie question.<br><br>im currently having a problem with adding attributes to the vector layor.<br><br>Im using qgis 0.9.1 development libraries and creating my own application using Open Suse 10.3.&nbsp; I was following Tim Sutton tutorial 6 to implement this but have noticed that QgsFeatureAttribute class has been removed from the 0.9.1 release.<br>


<br>I have changed the the tutorial code:<br><pre><i>    while ((mypFeature = mypProvider-&gt;getNextFeature</i><i>(true)))<br>    {<br>      //get the attributes of this feature<br>      const std::vector &lt; QgsFeatureAttribute &gt;&amp; myAttributes = mypFeature-&gt;attributeMap();<br>
<br>      for (int i = 0; i &lt; myAttributes.size(); i++)</i>
</pre><br>with the following:<br><br><i><font size="1">&nbsp;&nbsp;&nbsp; //now iterate through each feature<br>&nbsp;&nbsp;&nbsp; while (mypProvider-&gt;getNextFeature(mypFeature))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //get the attributes of this feature<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // const std::vector &lt; QgsFeatureAttribute &gt;&amp; myAttributes = mypFeature-&gt;attributeMap();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const QgsAttributeMap&amp; myAttributes = mypFeature.attributeMap();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( myAttributes.isEmpty() ) cout &lt;&lt; &quot;attribute map is empty &quot; &lt;&lt; endl;</font></i><br>&nbsp;&nbsp; <br><br>Iv tried replacing the&nbsp; QgsFeatureAttribute with the QgsAttributeMap, but when calling the attributeMap() function i do not seem to be pulling in the attribute data.<br>
<br>Is this a problem with the shapefile datastore.&nbsp; (i.e. i am using the same source shapefile data that was used for Tim&#39;s tutorial 6)<br><br>thanks in advance,<br><br>nlev.<br><br>