<?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: What is the event thrown by the Lasso Seletion Tool in the Sketch Widget? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1341185#M82547</link>
    <description>&lt;P&gt;Hi Andrew, This has been quite helpful. I'm having trouble retrieving the geometry of the lasso selection. Any suggestions on that?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2023 22:16:12 GMT</pubDate>
    <dc:creator>DanielScholes</dc:creator>
    <dc:date>2023-10-24T22:16:12Z</dc:date>
    <item>
      <title>What is the event thrown by the Lasso Seletion Tool in the Sketch Widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1322594#M82078</link>
      <description>&lt;P&gt;Good Day&lt;BR /&gt;&lt;BR /&gt;I have a user who wants to do a reasonably complex selection using the Sketch Widget.&amp;nbsp; Currently, I'm exposing the Draw Polygon, Rectangle and Circle functions, which react to the "create" event:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this._sketchWidget.on("create", async (event) =&amp;gt; {})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is fine, that works and I can select the map segment using those thee tools.&amp;nbsp; The point selector responds to my "click" handler, which is also working properly, but what does the Lasso Tool throw for an event?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It's not a click event, it's not the Sketch View create or update event, and according to the documentation, none of the other events would make any sense:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#events-summary" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#events-summary&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Just so we're clear, this is the tool I'm talking about:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 48px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79161i4243BDBFD5BDE1FF/image-size/small?v=v2&amp;amp;px=200" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Are there any examples to show this feature working?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 16:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1322594#M82078</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2023-08-25T16:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: What is the event thrown by the Lasso Seletion Tool in the Sketch Widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1322616#M82079</link>
      <description>&lt;P&gt;Got it!&amp;nbsp; Use a pointer-down, and pointer-up event, with a set flag:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this._view.on("pointer-down", (event) =&amp;gt; {
  this._view.hitTest(event).then((response) =&amp;gt; {
    if (response.results.length &amp;amp;&amp;amp; this._sketchWidget.activeTool === 'lasso-selection') {
      this.lassoSet = true;
    }
  });
});

this._view.on("pointer-up", (event) =&amp;gt; {
  this._view.hitTest(event).then((response) =&amp;gt; {
    if (response.results.length &amp;amp;&amp;amp; this.lassoSet) {
      this.lassoSet = false;

      console.log('Response from Lasso Selection');
      console.log(response);
    }
  });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Now I have a list of selected assets, so I can query them &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; - Hope this helps someone!&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 17:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1322616#M82079</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2023-08-25T17:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is the event thrown by the Lasso Seletion Tool in the Sketch Widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1341185#M82547</link>
      <description>&lt;P&gt;Hi Andrew, This has been quite helpful. I'm having trouble retrieving the geometry of the lasso selection. Any suggestions on that?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 22:16:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1341185#M82547</guid>
      <dc:creator>DanielScholes</dc:creator>
      <dc:date>2023-10-24T22:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is the event thrown by the Lasso Seletion Tool in the Sketch Widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1341776#M82557</link>
      <description>&lt;P&gt;hopefully not too cryptic but on the code above on line 13 put something like:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const geom - response&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;results&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;graphic&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;geometry;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this worked for me to do a selection by the lasso polygon geometry&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Oct 2023 02:25:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1341776#M82557</guid>
      <dc:creator>AaronFischer1</dc:creator>
      <dc:date>2023-10-26T02:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: What is the event thrown by the Lasso Seletion Tool in the Sketch Widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1344168#M82641</link>
      <description>&lt;P&gt;Hi Aaron. Thanks for the tip. I'm making progress with that.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 21:29:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-event-thrown-by-the-lasso-seletion/m-p/1344168#M82641</guid>
      <dc:creator>DanielScholes</dc:creator>
      <dc:date>2023-10-31T21:29:32Z</dc:date>
    </item>
  </channel>
</rss>

