<?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: Sketchwidget performs a lot of unexpected queries in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1163074#M76978</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/39681"&gt;@ChristopheSuter&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This is an issue with the SnappingControls widget, and is currently being worked on for 4.24. The widget is currently fetching the layer extent for all the layers on the Map, even if you disable feature snapping. This was originally reported in the following thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1145254/highlight/true#M76386" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-javascript-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1145254/highlight/true#M76386&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the only way to resolve this is to use the SketchViewModel without Sketch and programmatically configure the SnappingOptions. This is of course not ideal for anyone working with the Sketch widget. This will be fixed for 4.24.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
    <pubDate>Mon, 11 Apr 2022 16:32:58 GMT</pubDate>
    <dc:creator>JoseBanuelos</dc:creator>
    <dc:date>2022-04-11T16:32:58Z</dc:date>
    <item>
      <title>Sketchwidget performs a lot of unexpected queries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1162822#M76966</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm having a quite unexpected behaviour with sketchWidget, which performs hundreds of queries (for snapping ?) even with snappingOptions disabled.&lt;/P&gt;&lt;P&gt;Here is a Codepen that shows it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/christophesuter/pen/zYpjVrm" target="_blank"&gt;https://codepen.io/christophesuter/pen/zYpjVrm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Maps loads, and after 10 seconds Sketchwidget loads after an alert.&lt;/P&gt;&lt;P&gt;Is there any parameter in sketchWidget that I could you to prevent this ?&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 10:56:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1162822#M76966</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2022-04-09T10:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sketchwidget performs a lot of unexpected queries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1163074#M76978</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/39681"&gt;@ChristopheSuter&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This is an issue with the SnappingControls widget, and is currently being worked on for 4.24. The widget is currently fetching the layer extent for all the layers on the Map, even if you disable feature snapping. This was originally reported in the following thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1145254/highlight/true#M76386" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-javascript-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1145254/highlight/true#M76386&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the only way to resolve this is to use the SketchViewModel without Sketch and programmatically configure the SnappingOptions. This is of course not ideal for anyone working with the Sketch widget. This will be fixed for 4.24.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 16:32:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1163074#M76978</guid>
      <dc:creator>JoseBanuelos</dc:creator>
      <dc:date>2022-04-11T16:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sketchwidget performs a lot of unexpected queries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1163079#M76979</link>
      <description>&lt;P&gt;ok thanks for the reply&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 15:37:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1163079#M76979</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2022-04-11T15:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sketchwidget performs a lot of unexpected queries</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1175961#M77417</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/39681"&gt;@ChristopheSuter&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/349741"&gt;@JoseBanuelos&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I'm having the same problem using the Editor widget. We've made it an official bug in the meantime and hoping for a fix in 4.24.&lt;BR /&gt;Here's what I did to mitigate:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;esriConfig&lt;/SPAN&gt;&lt;SP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&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;Cancelling the requests from here doesn't seem to be possible, because we only get the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal" target="_self"&gt;AbortSignal&lt;/A&gt; from the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions" target="_self"&gt;RequestOptions&lt;/A&gt;&amp;nbsp;, but not the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/AbortController" target="_self"&gt;AbortController&lt;/A&gt;. So I'm setting the timeout of the unwanted requests to 1 ms, causing the client to cancel the requests before anything downloads (probably still causing unwanted server load - but I didn't look into that).&lt;BR /&gt;&lt;BR /&gt;Plus a bit of logic to update the interceptor regarding the "flUrls" (which are the feature layer URLs being 'blocked') when layer visibility changes (watcher on the visibility prop of every layer).&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;Cheers, Nik&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 15:59:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketchwidget-performs-a-lot-of-unexpected-queries/m-p/1175961#M77417</guid>
      <dc:creator>esride-nik</dc:creator>
      <dc:date>2022-05-20T15:59:57Z</dc:date>
    </item>
  </channel>
</rss>

