Hi all

I create a QgsVertexMarker and add it to the canvas:

*marker = QgsVertexMarker(self.iface.mapCanvas())
marker.setCenter(point)
marker.setColor(QColor(0,255,0))
marker.setIconSize(5)
marker.setIconType(QgsVertexMarker.ICON_CROSS)
marker.setPenWidth(3)
self.iface.mapCanvas().refresh()

*
*When I do this the marker is successfully added to the canvas. Everything
is fine, when the layers loaded to the canvas are locally available (eg:
normal raster or vector layers).
The problem comes in with remote layers such as Google layers. When I use
the code above on a canvas with a Google layer, it takes extremely long to
"add" the marker.
The problem lies in: **self.iface.mapCanvas().refresh(). As far as I can
see, refresh() reloads the entire visible area, thus requesting the image
again from the Google server and slowing done the entire process.

Is there a better way to add a vertex, without reloading the entire image?
I've tried self.iface.mapCanvas().scene().update() and marker.show() instead
of the refresh() statement, but then the vertex isn't drawn.


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

Reply via email to