Thanks Tom , got it what i find confusing is
###################### # This below does not work canvas = QgsMapCanvas() canvas.zoomScale(10000) ###################### # This below does work ####################### canvas = qgis.utils.iface.mapCanvas() canvas.zoomScale(10000) so there seems to be a difference between "QgsMapCanvas" and "mapCanvas" maybe because working into QGIS there already is an existing QgsMapCanvas(); the map canvas istance of QGIS itself, called mapCanvas() ? Il 27/01/2016 15:47, Tom Chadwin ha scritto: > Try searching for "zoom" on this page: > > http://qgis.org/api/classQgsMapCanvas.html > > That should get you some of the methods you require. > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Learning-to-zoom-with-PyQGIS-tp5247589p5247595.html > Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. > _______________________________________________ > Qgis-developer mailing list > [email protected] > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer _______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
