hello,
When I first loaded a map,I want to display a part of map,I used 
Qgsmapcanvas.setextent(),

But the map didn't change. The following code:

    QgsMapLayerRegistry::instance()->addMapLayer(Layer);
    mapCanvasLayerSet.append(Layer);
    mapCanvas->setLayerSet(mapCanvasLayerSet);
    mapCanvas->setVisible(true);
    QgsRectangle r(0, 0, 800, 800);
    mapCanvas->setExtent(r,true);
    mapCanvas->setCachingEnabled(true);
    mapCanvas->refresh();
How to use setextent,I could not understand this,and how to display a part of 
map,Can you tell me ?
Thanks for help!!
tong
_______________________________________________
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

Reply via email to