<html dir="ltr">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 11:57:55 Friday, 22 January 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
LI.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
DIV.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
TABLE.414e7b50-9f91-49ff-842d-fa8ec507eb62Table {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Thanks for help so far.<br>
<br>
These suggestions seem to be more complicated than I require.  I do not need to use the snapper to modify geometries in a custom tool, just to turn snapping on for the current layer when the user begins editing it.  I tried the following, based on Etienne's
 inasafe example, but nothing happens:<br>
<br>
layer = canvas.layer(0)<br>
point_locator = QgsPointLocator(layer)<br>
units = QgsTolerance.LayerUnits<br>
layer_config = QgsSnappingUtils.LayerConfig(layer, point_locator.Types(), 50, units)<br>
snapper = QgsSnappingUtils()<br>
snapper.setLayers([layer_config])<br>
snapper.setSnapToMapMode(QgsSnappingUtils.SnapAdvanced)<br>
<br>
Is there another snapper already created by QGIS when editing begins that I can access?<br>
<br>
Cheers<br>
John<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px"></div>
</div>
<br>
<table class="414e7b50-9f91-49ff-842d-fa8ec507eb62Table" borderColor="black" cellspacing="0" cols="1" cellpadding="0" width="450" border="0">
<tbody>
<tr>
<td>
<p><span style="font-family:Arial; color: #009F94; font-weight: bold; ">John Stevenson</span><br>
<span style="font-family:Arial; font-size:x-small; ">Senior Developer</span> </p>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
<p class="414e7b50-9f91-49ff-842d-fa8ec507eb62"><a href="http://www.thinkwhere.com"><img id="IMG1" border="0" align="right" src="cid:image8bc20c.PNG@67520999.41b46f51"></a></p>
</td>
</tr>
<tr>
<td>
<p><font size="2" face="Arial"><font color="#009f94">t:</font> 01786 476060 (Office)<br>
<font color="#009f94">t:</font> 01786 476093 (Direct Dial)<br>
<font color="#009f94">w:</font><a href="http://www.thinkwhere.com">www.thinkwhere.com</a></font>
</p>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
<p align="right"><font size="2" face="Arial">Glendevon House<br>
Castle Business Park<br>
Stirling FK9 4TZ</font></p>
</td>
</tr>
<tr>
<td><a href="https://twitter.com/thinkWhere1"><img id="IMG1" border="0" align="left" src="cid:image295644.PNG@b1051cba.4e97df2b"></a>
<a href="http://www.linkedin.com/company/1509510?trk=companies_home_ycp_logo_forth-valley-gis">
<img id="IMG1" border="0" align="left" src="cid:imagea7a708.PNG@070b5c8d.4fa6e904"></a>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
</td>
</tr>
</tbody>
</table>
<br>
<p align="justify"><font color="#7f7f7f" size="1" face="Verdana">This email and its attachments are private and confidential. If you believe you have received this email in error, please contact the sender immediately on 01786 476060. If you are not the intended
 recipient, you may not rely on, use or disclose this email or any attachments in any way.<br>
<br>
thinkWhere Limited does not accept any liability for any damage that may be caused to the recipient's system or data by this email or any attachments. Please note that our email system may be subject to random monitoring by us. This Company accepts no liability
 for personal emails.<br>
<br>
thinkWhere is a limited company registered in Scotland with Registered Number SC315349 and having its Registered Office at Glendevon House, Castle Business Park, Stirling, FK9 4TZ.
</p>
<br>
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF133410"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Qgis-developer [qgis-developer-bounces@lists.osgeo.org] on behalf of Thomas Gratier [osgeo.mailinglist@gmail.com]<br>
<b>Sent:</b> 21 January 2016 11:04<br>
<b>To:</b> Tom Chadwin<br>
<b>Cc:</b> qgis-developer<br>
<b>Subject:</b> Re: [Qgis-developer] Setting snapping settings via Python<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>Hi,<br>
<br>
I'm maybe wrong but you'd better look at QgsSnappingUtils <a href="http://qgis.org/api/classQgsSnappingUtils.html" target="_blank">
http://qgis.org/api/classQgsSnappingUtils.html</a><br>
</div>
<div>It seems more simple and should do the job for you.<br>
</div>
<div><br>
</div>
Cheers<br>
<br>
</div>
Thomas Gratier<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-01-20 20:32 GMT+01:00 Tom Chadwin <span dir="ltr"><<a href="mailto:tom.chadwin@nnpa.org.uk" target="_blank">tom.chadwin@nnpa.org.uk</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
This old thread might also help:<br>
<br>
<a href="http://osgeo-org.1560.x6.nabble.com/getting-QgsMapCanvasSnapper-to-work-td4147067.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/getting-QgsMapCanvasSnapper-to-work-td4147067.html</a><br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Setting-snapping-settings-via-Python-tp5246362p5246373.html" rel="noreferrer" target="_blank">
http://osgeo-org.1560.x6.nabble.com/Setting-snapping-settings-via-Python-tp5246362p5246373.html</a><br>
<div class="HOEnZb">
<div class="h5">Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">
http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">
http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</font>
<p></p>
<p></p>
<p></p>
</body>
</html>