1

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

layer.startEditing()

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?

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

1 Answer 1

1

Perhaps you're just missing a call to

iface.mapCanvas().refresh()

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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