AW: [Qgis-developer] Rendering single layer from mapcanvas
bonar
bonar_reddevil at yahoo.com
Tue May 26 02:25:09 EDT 2009
Hi Dr.Marco,
Thanks for your reply, i will try to work around with your suggestions and i
will inform the output as soon as possible.=)
Thanks and regard,
Bonar
Hugentobler Marco wrote:
>
> Hi Bonar
>
> QGIS renders the map into one image canvas item (QgsMapCanvasMap).
> Currently, it is not possible to refresh only one layer in this item.
> However, it is possible to render the content of the three layers that
> stay constant into a QgsMapCanvasMap (as you do now with all the four
> layers). For the layer that changes you could create a new canvas item (as
> a new subclass of QgsMapCanvasItem). In this subclass you need to create a
> QgsVectorLayer configured with your database instance . Then you could
> implement the paint method, there query all the features inside the view
> extent, use the transformation methods of QgsMapCanvasItem
> (toCanvasCoordinates()) and finally use QPainter to draw the objects as
> you want. Important is that the new item has the same size as the
> mapcanvas and also a transparent background such that you may see the
> content of the other three background layers.
>
> If then something in the datasource changes, you update your item class
> and only the item with one layer is repainted. The background with the
> three other layers stays the same.
>
>
> Regards,
> Marco
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: qgis-developer-bounces at lists.osgeo.org im Auftrag von bonar
> Gesendet: Mo 25.05.2009 11:41
> An: qgis-developer at lists.osgeo.org
> Betreff: [Qgis-developer] Rendering single layer from mapcanvas
>
>
--
View this message in context: http://n2.nabble.com/Rendering-single-layer-from-mapcanvas-tp2968794p2973090.html
Sent from the qgis-developer mailing list archive at Nabble.com.
More information about the Qgis-developer
mailing list