Hi Francesco On Sat, Feb 2, 2013 at 4:24 PM, francescobocca...@libero.it <francescobocca...@libero.it> wrote: > i have some problem to adapt my old code to new API. > i have below piece of code: > > index = vproviderA.fieldNameIndex(field) > atMap = inFeat.attributeMap() > idVar = atMap[ index ] > > to get a value of a this features in a field. > Now is it no possbile because QgsFeature hasn't attributeMap().
attributeMap() has been replaced by attributes(), but there's additionally an easier way how to access attributes by indices: >>> idVar = inFeat[0] And now there is even easier way for accessing attributes - directly by field name: >>> idVar = inFeat["name"] Martin _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer