<?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: Using snapping during editing session in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-snapping-during-editing-session/m-p/1546452#M85837</link>
    <description>&lt;P&gt;Hi Andrea, I had the same issue.&lt;BR /&gt;I suppose this is an already reported bug &lt;A title="The Snap tool does not take into account the historical moment in the sketch and Editor widgets" href="https://support.esri.com/en-us/bug/the-snap-tool-does-not-take-into-account-the-historical-bug-000152711" target="_blank" rel="noopener"&gt;BUG-000152711&lt;/A&gt;, but it's still open and waiting for a fix.&lt;BR /&gt;&lt;BR /&gt;I solved the problem with a workarond, after the applyEdit operation i force the historicMoment of the layers used by the SnappingTool passing it throwh the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#customParameters" target="_blank" rel="noopener"&gt;customParameters&lt;/A&gt;&amp;nbsp; property.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_onApplyEditComplete: function (applyEditResult) {
  let hm = applyEditResult.historicMoment;
  this.editorWidget.snappingOptions.featureSources.items.forEach(singleItem =&amp;gt; {
     singleItem.layer.customParameters = {
          historicMoment:hm.getTime()
     };
 });
 }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;By doing so, the parameter is correctly received and the SnappingTool correctly snap on new inserted object.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2024 10:40:27 GMT</pubDate>
    <dc:creator>MauroSantarossa</dc:creator>
    <dc:date>2024-10-08T10:40:27Z</dc:date>
    <item>
      <title>Using snapping during editing session</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-snapping-during-editing-session/m-p/1544176#M85795</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;Hi&amp;nbsp;everyone,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;I'm&amp;nbsp;having&amp;nbsp;a&amp;nbsp;problem&amp;nbsp;with&amp;nbsp;the&amp;nbsp;snapping&amp;nbsp;tool&amp;nbsp;and&amp;nbsp;I&amp;nbsp;don't&amp;nbsp;know&amp;nbsp;how&amp;nbsp;to&amp;nbsp;figure&amp;nbsp;it&amp;nbsp;out.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;I'm&amp;nbsp;on&amp;nbsp;a&amp;nbsp;editing&amp;nbsp;session,&amp;nbsp;and&amp;nbsp;after&amp;nbsp;a&amp;nbsp;insert&amp;nbsp;a&amp;nbsp;new&amp;nbsp;object&amp;nbsp;the&amp;nbsp;snapper&amp;nbsp;doesn't&amp;nbsp;see&amp;nbsp;the&amp;nbsp;new&amp;nbsp;inserted&amp;nbsp;object&amp;nbsp;and&amp;nbsp;I&amp;nbsp;can't&amp;nbsp;snap&amp;nbsp;on&amp;nbsp;it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;These&amp;nbsp;are&amp;nbsp;the&amp;nbsp;steps&amp;nbsp;i&amp;nbsp;do:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&amp;nbsp;start&amp;nbsp;ad&amp;nbsp;editing&amp;nbsp;session&amp;nbsp;(startReading/startEditing)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&amp;nbsp;load&amp;nbsp;Editor&amp;nbsp;widget&amp;nbsp;and&amp;nbsp;activate&amp;nbsp;snapper&amp;nbsp;on&amp;nbsp;the&amp;nbsp;layer&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&amp;nbsp;draw&amp;nbsp;(snappingTool&amp;nbsp;works&amp;nbsp;fine)&amp;nbsp;and&amp;nbsp;insert&amp;nbsp;a&amp;nbsp;new&amp;nbsp;object&amp;nbsp;(applyEdit)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&amp;nbsp;want&amp;nbsp;to&amp;nbsp;draw&amp;nbsp;another&amp;nbsp;new&amp;nbsp;object&amp;nbsp;snapping&amp;nbsp;on&amp;nbsp;the&amp;nbsp;previously&amp;nbsp;inserted&amp;nbsp;object,&amp;nbsp;but&amp;nbsp;the&amp;nbsp;snapper&amp;nbsp;doesn't&amp;nbsp;see&amp;nbsp;it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Is&amp;nbsp;there&amp;nbsp;a&amp;nbsp;way&amp;nbsp;to&amp;nbsp;make&amp;nbsp;snappingTool&amp;nbsp;works&amp;nbsp;with&amp;nbsp;the&amp;nbsp;new&amp;nbsp;objects&amp;nbsp;inserted&amp;nbsp;during&amp;nbsp;an&amp;nbsp;editing&amp;nbsp;Session?&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Thanks&amp;nbsp;in&amp;nbsp;advance&amp;nbsp;for&amp;nbsp;your&amp;nbsp;help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 12:44:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-snapping-during-editing-session/m-p/1544176#M85795</guid>
      <dc:creator>ANDREACARVELLI</dc:creator>
      <dc:date>2024-10-01T12:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using snapping during editing session</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-snapping-during-editing-session/m-p/1544180#M85796</link>
      <description>&lt;P&gt;I'm using ArcGIS Map SDK 4.30&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 12:54:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-snapping-during-editing-session/m-p/1544180#M85796</guid>
      <dc:creator>ANDREACARVELLI</dc:creator>
      <dc:date>2024-10-01T12:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using snapping during editing session</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-snapping-during-editing-session/m-p/1546452#M85837</link>
      <description>&lt;P&gt;Hi Andrea, I had the same issue.&lt;BR /&gt;I suppose this is an already reported bug &lt;A title="The Snap tool does not take into account the historical moment in the sketch and Editor widgets" href="https://support.esri.com/en-us/bug/the-snap-tool-does-not-take-into-account-the-historical-bug-000152711" target="_blank" rel="noopener"&gt;BUG-000152711&lt;/A&gt;, but it's still open and waiting for a fix.&lt;BR /&gt;&lt;BR /&gt;I solved the problem with a workarond, after the applyEdit operation i force the historicMoment of the layers used by the SnappingTool passing it throwh the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#customParameters" target="_blank" rel="noopener"&gt;customParameters&lt;/A&gt;&amp;nbsp; property.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_onApplyEditComplete: function (applyEditResult) {
  let hm = applyEditResult.historicMoment;
  this.editorWidget.snappingOptions.featureSources.items.forEach(singleItem =&amp;gt; {
     singleItem.layer.customParameters = {
          historicMoment:hm.getTime()
     };
 });
 }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;By doing so, the parameter is correctly received and the SnappingTool correctly snap on new inserted object.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 10:40:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-snapping-during-editing-session/m-p/1546452#M85837</guid>
      <dc:creator>MauroSantarossa</dc:creator>
      <dc:date>2024-10-08T10:40:27Z</dc:date>
    </item>
  </channel>
</rss>

