Hi, i'm trying to learn a bit of "pyqgis" and cannot find how to zoom to a certain scale,
here what i'm doing so far using QGIS python console: ########################################### # Set some variables to define the layer shapefile_path = r'C:\data\shp\area.shp' legend_layer_name = 'sample_area' provider_name = 'ogr' # define the layer to load layer = QgsVectorLayer(shapefile_path,legend_layer_name,provider_name) # verify if not layer.isValid(): raise IOError, "Failed to open the shapefile" # load the layer in QGIS QgsMapLayerRegistry.instance().addMapLayer(layer) # now i can zoom to active layer i.e. qgis.utils.iface.zoomToActiveLayer() # or zoomFull zoomToNext zoomToPrevious # How to zoom to say 1:10000 ? ################################################# thanks for any help, Roy # _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer