Hi all<br><br>I create a QgsVertexMarker and add it to the canvas:<br><br><div style="margin-left: 40px;"><i>marker = QgsVertexMarker(self.iface.mapCanvas())<br>marker.setCenter(point)<br>marker.setColor(QColor(0,255,0))<br>
marker.setIconSize(5)<br>marker.setIconType(QgsVertexMarker.ICON_CROSS)<br>marker.setPenWidth(3)<br>self.iface.mapCanvas().refresh()<br><br></i></div><i>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).<br>
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 &quot;add&quot; the marker.<br>The problem lies in: </i><i>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.<br>
<br>Is there a better way to add a vertex, without reloading the entire image? I&#39;ve tried self.iface.mapCanvas().scene().update() and marker.show() instead of the refresh() statement, but then the vertex isn&#39;t drawn.<br>
<br><br>Chris<br></i>