<?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 Rounding distance and area measurement values into a single decimal place in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rounding-distance-and-area-measurement-values-into/m-p/1543726#M85784</link>
    <description>&lt;P&gt;I have added&amp;nbsp;&lt;SPAN&gt;DistanceMeasurement2D &amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;AreaMeasurement2D tools to the ArcGIS map. I need to &lt;STRONG&gt;round&lt;/STRONG&gt; the measurement value into a &lt;STRONG&gt;single decimal&lt;/STRONG&gt; place (default two decimal places). Following is the relevant code snippet,&amp;nbsp;&lt;BR /&gt;Further, Are there any strategies to make measurements more accurate?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      const distanceMeasurement2D = new DistanceMeasurement2D({
        viewModel: {
          view: view,
          unit: "kilometers",
        },
        container: distancemeasureContainerRef.current!,
      });

      const areaMeasurement2D = new AreaMeasurement2D({
        view: view,
        container: areameasureContainerRef.current!,
      });

      const clearMeasurement = () =&amp;gt; {
        distanceMeasurement2D.viewModel.clear();
        areaMeasurement2D.viewModel.clear();
      };

      clearButton.current?.addEventListener("click", clearMeasurement);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Following is the UI of the measurement,&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Screenshot 2024-09-30 131525.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/116131i698687FFA43BDF8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-09-30 131525.png" alt="Screenshot 2024-09-30 131525.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2024 07:48:23 GMT</pubDate>
    <dc:creator>LakshanRasingolla</dc:creator>
    <dc:date>2024-09-30T07:48:23Z</dc:date>
    <item>
      <title>Rounding distance and area measurement values into a single decimal place</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rounding-distance-and-area-measurement-values-into/m-p/1543726#M85784</link>
      <description>&lt;P&gt;I have added&amp;nbsp;&lt;SPAN&gt;DistanceMeasurement2D &amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;AreaMeasurement2D tools to the ArcGIS map. I need to &lt;STRONG&gt;round&lt;/STRONG&gt; the measurement value into a &lt;STRONG&gt;single decimal&lt;/STRONG&gt; place (default two decimal places). Following is the relevant code snippet,&amp;nbsp;&lt;BR /&gt;Further, Are there any strategies to make measurements more accurate?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      const distanceMeasurement2D = new DistanceMeasurement2D({
        viewModel: {
          view: view,
          unit: "kilometers",
        },
        container: distancemeasureContainerRef.current!,
      });

      const areaMeasurement2D = new AreaMeasurement2D({
        view: view,
        container: areameasureContainerRef.current!,
      });

      const clearMeasurement = () =&amp;gt; {
        distanceMeasurement2D.viewModel.clear();
        areaMeasurement2D.viewModel.clear();
      };

      clearButton.current?.addEventListener("click", clearMeasurement);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Following is the UI of the measurement,&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Screenshot 2024-09-30 131525.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/116131i698687FFA43BDF8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-09-30 131525.png" alt="Screenshot 2024-09-30 131525.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 07:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rounding-distance-and-area-measurement-values-into/m-p/1543726#M85784</guid>
      <dc:creator>LakshanRasingolla</dc:creator>
      <dc:date>2024-09-30T07:48:23Z</dc:date>
    </item>
  </channel>
</rss>

