Documentation says when issue the following command on a vector layer (polygon), the vertex marker will be displayed in editing mode:


But it is not displaying the vertex markers.

I found that there is a static drawVertexMarker method on QgsVectorLayer class, but do I have to manually call it to draw a marker on each vertex? Also, if I am moving vertex in editing mode, do I have to constantly re-draw all vertices?

Additionally, there is the editBuffer() property that returns the QgsVectorLayerEditBuffer reference, is it possible to display that buffer layer in editing mode for visual aid?

  • 1
    @German Carrillo, thanks, that's it. Calling the 'canvas.refresh()' does it. How to flag your comment as the answer. – For Comment Jan 12 '17 at 4:55
  • @Germán Carrillo, please post your comment as an answer – artwork21 Jan 12 '17 at 13:41
  • Just posted my comment as an answer. – Germán Carrillo Jan 12 '17 at 13:50

Perhaps you're just missing a call to


after you call startEditing() from the layer object. Doing so you can visualize vertex markers from your layer features.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.