AW: [Qgis-developer] Number of features to draw before updating thedisplay..

Hugentobler Marco marco.hugentobler at karto.baug.ethz.ch
Tue Apr 7 06:48:44 EDT 2009


Hi Bonar

To update the display after 1000 features, you may do the following:

QSetting s;
s.setValue( "/Map/updateThreshold", 1000);

Like this, the vector layer sends the signal QgsMapLayer::screenUpdateRequested each 1000 features and the slot QgsMapCanvas:: updateMap refreshes the map image. If you are using QgsMapCanvas in your application, the signals of the layers are automatically connected to the refresh slot.

In a similar way, you may set other properties., e.g. to make your map appear nicer, do 

s.setValue( "/qgis/enable_anti_aliasing", true);

You might have a look at src/app/qgsoptions.cpp for the other options.

Regards,
Marco



-----Ursprüngliche Nachricht-----
Von: qgis-developer-bounces at lists.osgeo.org im Auftrag von bonar
Gesendet: Di 07.04.2009 08:38
An: qgis-developer at lists.osgeo.org
Betreff: [Qgis-developer] Number of features to draw before updating thedisplay..
 

hi devs and Dr.Marco,

I have a question regarding how can i make a rendering to my vector layer display. Lets me explain a little bit of my scenario; i need to load a building layer that contain a lot of data and it take some time to load. So, my plan is to render it by drawing a certain number of features first before updating the display. It's look like on QGis Edit>>Options>>Rendering>>Rendering Behavior panel and we can set "Number of features to draw before updating the display" = 10000(or some others value).
Hope you guys can help me on this matters.


Thanks in advance,
bonar


-- 
View this message in context: http://n2.nabble.com/Number-of-features-to-draw-before-updating-the-display..-tp2597278p2597278.html
Sent from the qgis-developer mailing list archive at Nabble.com.

_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list