<?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 AreaMeasurement2DTool error handling in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/areameasurement2dtool-error-handling/m-p/492296#M45711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What error handling can I implement to catch this error (or bug)? The error happens when the first point is added to the map and no measurement is made other than double click on top of the first point. Once this error happens the area measure tool completely fails to work without reloading the page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uncaught TypeError: Cannot read property 'measurement' of null&lt;BR /&gt; at d._updateGraphics (AreaMeasurement2DTool.js:20)&lt;BR /&gt; at d._updateSketch (AreaMeasurement2DTool.js:19)&lt;BR /&gt; at AreaMeasurement2DTool.js:16&lt;BR /&gt; at ?ver=4.16:515&lt;BR /&gt; at Array.forEach (&amp;lt;anonymous&amp;gt;)&lt;BR /&gt; at c.emit (?ver=4.16:515)&lt;BR /&gt; at d.emit (?ver=4.16:517)&lt;BR /&gt; at d.n._updateCursor (Sketch.js:405)&lt;BR /&gt; at Sketch.js:398&lt;BR /&gt; at a._callback (?ver=4.16:2113)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Aug 2020 19:47:05 GMT</pubDate>
    <dc:creator>GregoryBologna</dc:creator>
    <dc:date>2020-08-28T19:47:05Z</dc:date>
    <item>
      <title>AreaMeasurement2DTool error handling</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/areameasurement2dtool-error-handling/m-p/492296#M45711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What error handling can I implement to catch this error (or bug)? The error happens when the first point is added to the map and no measurement is made other than double click on top of the first point. Once this error happens the area measure tool completely fails to work without reloading the page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uncaught TypeError: Cannot read property 'measurement' of null&lt;BR /&gt; at d._updateGraphics (AreaMeasurement2DTool.js:20)&lt;BR /&gt; at d._updateSketch (AreaMeasurement2DTool.js:19)&lt;BR /&gt; at AreaMeasurement2DTool.js:16&lt;BR /&gt; at ?ver=4.16:515&lt;BR /&gt; at Array.forEach (&amp;lt;anonymous&amp;gt;)&lt;BR /&gt; at c.emit (?ver=4.16:515)&lt;BR /&gt; at d.emit (?ver=4.16:517)&lt;BR /&gt; at d.n._updateCursor (Sketch.js:405)&lt;BR /&gt; at Sketch.js:398&lt;BR /&gt; at a._callback (?ver=4.16:2113)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 19:47:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/areameasurement2dtool-error-handling/m-p/492296#M45711</guid>
      <dc:creator>GregoryBologna</dc:creator>
      <dc:date>2020-08-28T19:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: AreaMeasurement2DTool error handling</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/areameasurement2dtool-error-handling/m-p/492297#M45712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gregory, sorry, but I cannot reproduce this issue. If I'm understanding correctly, here are my repro steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) app&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-measurement-2d/live/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/widgets-measurement-2d/live/index.html"&gt;Measurement in 2D | Sample | ArcGIS API for JavaScript 4.16&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) tool - AreaMeasurement2D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Click once on the map, then double click on the same spot without moving the cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option would be to use a try/catch in the viewmodel:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D-AreaMeasurement2DViewModel.html#start" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D-AreaMeasurement2DViewModel.html#start"&gt;AreaMeasurement2DViewModel | ArcGIS API for JavaScript 4.16&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2020 19:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/areameasurement2dtool-error-handling/m-p/492297#M45712</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-09-02T19:22:19Z</dc:date>
    </item>
  </channel>
</rss>

