[Qgis-developer] Adding vertex marker to Google layers -> very slow
goocreations at gmail.com
Fri Apr 8 05:28:41 EDT 2011
I create a QgsVertexMarker and add it to the canvas:
*marker = QgsVertexMarker(self.iface.mapCanvas())
*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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer