[Qgis-developer] Pyqgis 2.2 : get signal on feature added + zoom to layer extent?

dandrigo lcelati at latitude-geosystems.com
Thu Jul 31 01:42:24 PDT 2014


Hello,

1/ For my pyqgis plugin 2.2, i try to 
-----------------------------------------------------------------------
def logFeatureAdded(self,layerId,addfeatures):
		message = str(layerId) + " has features added: "
		for feature in addedFeatures:
			message += str( feature.id() ) + ", "
		QgsMessageLog.logMessage(message)
		QApplication.beep() 
------------------------------------------------------------------------

When i try to add a feature, this following error message appears: 

/TypeError : logFeaturesAdded() takes exactly 3 arguments (2 given). /

2/ Always for my plugin, i can load a vector layer succesfully. But when i
try to zoom to the layer extent. But it does not work. How to do in order to
zoom to the layer extent? 



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Pyqgis-2-2-get-signal-on-feature-added-zoom-to-layer-extent-tp5154353.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list