<?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: DirectLineMeasurement3D - Events in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directlinemeasurement3d-events/m-p/741092#M68586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The measurement widgets in 3D are still work in progress. However to have more control of the interaction I would advise to use the ViewModel of the widget:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state"&gt;DirectLineMeasurement3DViewModel | API Reference | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There you can watch for changes&amp;nbsp;of the `state` attribute to figure out when the measurement started. The pattern in the API is that all properties are watch-able, so we don't really use event listeners so much. You can read about it&amp;nbsp;in this guide topic:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html" title="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html"&gt;Working with properties | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, for now the only public way to stop measuring is to destroy it. We are working on a&amp;nbsp;public API that would work for all the widgets that have an enabled/disabled state, but we didn't implement it yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2018 14:34:44 GMT</pubDate>
    <dc:creator>RalucaNicola1</dc:creator>
    <dc:date>2018-05-25T14:34:44Z</dc:date>
    <item>
      <title>DirectLineMeasurement3D - Events</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directlinemeasurement3d-events/m-p/741091#M68585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't seem to be able to find any usable &lt;STRONG&gt;events&lt;/STRONG&gt; for this widget, for example, are there any events like:&lt;/P&gt;&lt;P&gt;-&amp;nbsp; OnMeasureStart&lt;/P&gt;&lt;P&gt;-&amp;nbsp; OnMeasureEnd&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(or similar)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any &lt;STRONG&gt;methods&lt;/STRONG&gt; that would allow me to partially control the widget? I know there is "clearMeasurement()", but what I'm after is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;- startMeasurement (something like letting the widget know that now it's time to attach the view click listeners)&lt;/P&gt;&lt;P&gt;&amp;nbsp;- stopMeasurement (cancelling if it's started, detach any listeners) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way how can I force this widget to &lt;STRONG&gt;cancel and stop measuring&lt;/STRONG&gt; without actually having to &lt;STRONG&gt;destroy&lt;/STRONG&gt; the widget? ClearMeasurement() method will reset the widget, but it still expects the input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No offense, but if there is nothing like that then the widget is useless for the developers who wants to reuse the widget but incorporate few more extra logic on top of it, or just simply make it to listen to the UI of their own application. (I'd like to have my own custom tool instructions for example) and I'd love to also know when the widget actually stopped drawing etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all your help.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 03:54:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directlinemeasurement3d-events/m-p/741091#M68585</guid>
      <dc:creator>MichalGasparovic</dc:creator>
      <dc:date>2018-05-23T03:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: DirectLineMeasurement3D - Events</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directlinemeasurement3d-events/m-p/741092#M68586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The measurement widgets in 3D are still work in progress. However to have more control of the interaction I would advise to use the ViewModel of the widget:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state"&gt;DirectLineMeasurement3DViewModel | API Reference | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There you can watch for changes&amp;nbsp;of the `state` attribute to figure out when the measurement started. The pattern in the API is that all properties are watch-able, so we don't really use event listeners so much. You can read about it&amp;nbsp;in this guide topic:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html" title="https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html"&gt;Working with properties | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, for now the only public way to stop measuring is to destroy it. We are working on a&amp;nbsp;public API that would work for all the widgets that have an enabled/disabled state, but we didn't implement it yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 14:34:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directlinemeasurement3d-events/m-p/741092#M68586</guid>
      <dc:creator>RalucaNicola1</dc:creator>
      <dc:date>2018-05-25T14:34:44Z</dc:date>
    </item>
  </channel>
</rss>

