I have a vector polygon and vector polyline layer. I want to enable the snapping for both the layer with tolerance value? How can i do that using python programming. I have tried this code but getting the following error:
snapper = QgsMapCanvasSnapper(canvas) snapper.setSnapSettingsForLayer(aLayer,True,SnapToVertexAndSegment,pixels,0.0001,True)
Traceback (most recent call last): File "", line 1, in AttributeError: 'QgsMapCanvasSnapper' object has no attribute 'setSnapSettingsForLayer'
Can anyone help me in setting the snapping options to the currentLayer using python programming?