<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SnapManager not drawing point at the snap in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840321#M9181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elizabeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You need to capture the draw end event data to use it:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;onDrawEnd&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; line &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleLineSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setColor&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Color&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;168&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setWidth&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; marker &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleMarkerSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; marker&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setOutline&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;line&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; marker&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setStyle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SimpleMarkerSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;STYLE_X&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; marker&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:15:00 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-12T10:15:00Z</dc:date>
    <item>
      <title>SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840318#M9178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/169357"&gt;SnapManager fails to complete snap in Javascript&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem similar to the one Tyler described but the previous post did not solve my problem. I have a custom widget with a click event that uses the snapping manager to guide the user to place a point along a road. The road is in a feature service and I am using the draw toolbar to create the point. Snapping at first seems to be working great to the point of creating the little blue X that is constrained to follow the road, however, when the user actually clicks the point will be created at the actual click point and not where the blue X is showing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make the snapped point graphic actually be created on the line where the blue X seems to indicate it will be?&lt;/P&gt;&lt;P&gt;Right now I am adding the featurelayer to the map every time the user clicks, which is not practical in the long run, but I am just trying to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any help in solving this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myfunction: function (evt) {&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; var parcelsLayer = new FeatureLayer(&lt;BR /&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fmyurl%2FMapServer%2F0" rel="nofollow" target="_blank"&gt;http://myurl/MapServer/0&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; {&lt;BR /&gt; mode: FeatureLayer.MODE_ONDEMAND,&lt;BR /&gt; outFields: ["*"]&lt;BR /&gt; });&lt;BR /&gt; this.map.addLayer(parcelsLayer);&lt;/P&gt;&lt;P&gt;var snapManager = this.map.enableSnapping({&lt;BR /&gt; tolerance: 20, &lt;BR /&gt; alwaysSnap: true&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; var layerInfos = [{&lt;BR /&gt; layer: parcelsLayer&lt;BR /&gt; }];&lt;BR /&gt; &lt;BR /&gt; snapManager.setLayerInfos(layerInfos);&lt;/P&gt;&lt;P&gt;var tb;&lt;BR /&gt; tb = new Draw(this.map);&lt;BR /&gt; tb.activate(Draw["POINT"]);&lt;/P&gt;&lt;P&gt;var line = new SimpleLineSymbol();&lt;BR /&gt; line.setColor(new Color([168, 0, 0, 1]));&lt;BR /&gt; line.setWidth(2);&lt;BR /&gt; var marker = new SimpleMarkerSymbol();&lt;BR /&gt; marker.setOutline(line);&lt;BR /&gt; marker.setStyle(SimpleMarkerSymbol.STYLE_X);&lt;BR /&gt; &lt;BR /&gt; var graphic = new Graphic(evt.mapPoint, marker);&lt;BR /&gt; &lt;BR /&gt; this.map.graphics.add(graphic);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 21:25:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840318#M9178</guid>
      <dc:creator>ElizabethMiller</dc:creator>
      <dc:date>2018-05-14T21:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840319#M9179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elizabeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;It looks like you are using a map click event when you are using:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The snapping happens to the Draw toolbars graphic result geometry. It does not adjust the click events geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So on the DrawEnd event you would get the graphic and use its geometry that has been snapped:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; marker&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 23:46:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840319#M9179</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-14T23:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840320#M9180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not coming together for me.&amp;nbsp;I can't pass the draw point because it's not a graphic, and it's not an evt. What is it? I know this isn't right, but I am not able to grab the draw point. if I try this,&amp;nbsp;I get the error "cannot&amp;nbsp;read property&amp;nbsp;geometry of undefined."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var toolbar;
 toolbar = new Draw(this.map);
 toolbar.activate(Draw["POINT"]);
toolbar.on("draw-end", lang.hitch(this, 'onDrawEnd'));

onDrawEnd: function(){
var line = new SimpleLineSymbol();
 line.setColor(new Color([168, 0, 0, 1]));
 line.setWidth(2);
 var marker = new SimpleMarkerSymbol();
 marker.setOutline(line);
 marker.setStyle(SimpleMarkerSymbol.STYLE_X);
 
 var graphic = new Graphic(graphic.geometry, marker);
 this.map.graphics.add(graphic);
 },&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried using something like this but get an error 'cannot read property&amp;nbsp; 'add' of undefined." It does not seem to want to use screenPoint. I'm not sure if either of these methods is the right way to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var deferred = this.map.snappingManager.getSnappingPoint(evt.screenPoint);
 deferred.then(function(value){
 var point;
 if(value !== undefined){
 point = value;
 console.log(point);
 } else {
 point = evt.mapPoint;
 }
 console.log(point);
 var graphic = new Graphic(evt.mapPoint, marker);
 this.map.graphics.add(graphic);
 });&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:14:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840320#M9180</guid>
      <dc:creator>ElizabethMiller</dc:creator>
      <dc:date>2021-12-12T10:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840321#M9181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elizabeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You need to capture the draw end event data to use it:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;onDrawEnd&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; line &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleLineSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setColor&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Color&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;168&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setWidth&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; marker &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleMarkerSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; marker&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setOutline&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;line&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; marker&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setStyle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SimpleMarkerSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;STYLE_X&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; marker&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840321#M9181</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840322#M9182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again! Maybe I'm missing some other piece of code but for me that still places the point where the user clicks and not along the line where the blue snap is showing, so it is like not using the snapping manager at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a fiddle example I found of what I am trying to do &lt;A class="link-titled" href="https://jsfiddle.net/katah/6uweoank/2/" title="https://jsfiddle.net/katah/6uweoank/2/" rel="nofollow noopener noreferrer" target="_blank"&gt;Add Graphic to Snap Point - JSFiddle&lt;/A&gt;&amp;nbsp;, but I'm still having trouble adapting it to a WAB widget format. I'm using the following but getSnappingPoint does not seem to return a value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var deferred = map.snappingManager.getSnappingPoint(evt.screenPoint);

 deferred.then(function(value){
 var point;
 
 if(value !== undefined){
 point = value;
 
 } else {
 point = evt.mapPoint;
 }
 
 var graphic = new Graphic(point, sms);
 this.map.graphics.add(graphic);
 }, function(error){
 console.log('Error');
 });
 },‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840322#M9182</guid>
      <dc:creator>ElizabethMiller</dc:creator>
      <dc:date>2021-12-12T10:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840323#M9183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elixabeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;It would be :&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; deferred &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;snappingManager&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getSnappingPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;screenPoint&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;notice "this.map" is how you get the map object in a widget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 15:39:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840323#M9183</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-16T15:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840324#M9184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ugh, I'm so sorry I included that mistake in my example. I have in fact been using the correct format of "this.map."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The problem is that nothing happens after the "&lt;STRONG&gt;deferred.then&lt;/STRONG&gt;." "&lt;STRONG&gt;Value&lt;/STRONG&gt;" is always "undefined." It seems like snappingManager.getSnappingPoint isn't working. I do have valid coordinates for evt.screenPoint though.&lt;/P&gt;&lt;P&gt;Are there any other prerequisites for getting &lt;STRONG&gt;snappingManager&lt;/STRONG&gt; or &lt;STRONG&gt;deferred&lt;/STRONG&gt; to work? I have them both loaded in my widget's define().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var deferred = this.map.snappingManager.getSnappingPoint(evt.screenPoint);
 
 deferred.then(function(value){
 var point;
 
 console.log("value is: " + value);
 //nothing happens after this

 if(value !== undefined){
 point = value;
 
 } else {
 point = evt.mapPoint;
 }
var graphic = new Graphic(point, marker);
 this.map.graphics.add(graphic);
 
 }, function(error){
 console.log('Error');
 });&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840324#M9184</guid>
      <dc:creator>ElizabethMiller</dc:creator>
      <dc:date>2021-12-12T10:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840325#M9185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elizabeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; have you checked to be sure&amp;nbsp;this.map.snappingManager is not null?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 17:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840325#M9185</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-16T17:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840326#M9186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to be good. I am getting lots of attributes back for it and they match the attributes I get back when I look at the &lt;STRONG&gt;map.snappingManager&lt;/STRONG&gt; in the JSfiddle example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I compared the &lt;STRONG&gt;deferred&lt;/STRONG&gt; object in my example and the JSFiddle example too. I don't see any differences except that the example contains a valid array in the &lt;STRONG&gt;results&lt;/STRONG&gt; attribute (see below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I am now using the sample esri feature service layer instead of my own just to rule out any problem with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message I get in the console now is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Uncaught TypeError: Cannot read property 'offset' of undefined
 at Object.getSnappingPoint (SnappingManager.js:7)
 at Object.&amp;lt;anonymous&amp;gt; (Widget.js?wab_dv=2.6:338)
 at Object.&amp;lt;anonymous&amp;gt; (init.js:63)
 at Object.&amp;lt;anonymous&amp;gt; (init.js:655)
 at Object.c [as onDrawEnd] (init.js:119)
 at Object._drawEnd (draw.js:18)
 at Object._onClickHandler (draw.js:31)
 at Object.&amp;lt;anonymous&amp;gt; (init.js:63)
 at Object.c [as onClick] (init.js:119)
 at Object._fire (init.js:1299)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how the example's &lt;STRONG&gt;deferred&lt;/STRONG&gt; result looks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/406763_deferred_example.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's mine!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/406764_my_deferred.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840326#M9186</guid>
      <dc:creator>ElizabethMiller</dc:creator>
      <dc:date>2021-12-12T10:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840327#M9187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elizabeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What about the evt.screenPoint is that a valid object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 20:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840327#M9187</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-16T20:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: SnapManager not drawing point at the snap</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840328#M9188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally solved the problem.&amp;nbsp;It turned out the error function tagged on at the end disrupted everything else. I removed it and the point and value started working fine. Thank you for helping me work through this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var deferred = this.map.snappingManager.getSnappingPoint(evt.screenPoint);

var sms = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_DIAMOND, 12,
 new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([70, 0, 130, 1]), 1), new Color([70, 0, 130, 1]));
 
 deferred.then(lang.hitch(this, function(value){

 var point;
 
 if (value !== undefined){
 point = value;
 
 } else {
 point = evt.mapPoint;

 } 

 var graphic = new Graphic(point, sms);
 this.map.graphics.add(graphic);
 
 }, 
 
 /* function(error){
 
 console.log('Error');
 
 } */
 
 ));‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/snapmanager-not-drawing-point-at-the-snap/m-p/840328#M9188</guid>
      <dc:creator>ElizabethMiller</dc:creator>
      <dc:date>2021-12-12T10:15:12Z</dc:date>
    </item>
  </channel>
</rss>

