<?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 How to get length of each segment of polyline? (using SketchViewModel) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-length-of-each-segment-of-polyline/m-p/1505668#M85048</link>
    <description>&lt;P&gt;When I draw a polyline, I can see the length of each segment displayed with SketchViewModel. (as shown in screenshot)&lt;BR /&gt;How can I access these lengths from the event/argument in the SketchWidget's handleChange calllback?&lt;BR /&gt;The event is the geometry/polyline, but doesn't show the lengths/distances anhywhere in the data returned. Is there a way to add that data to the event returned in the callback?&lt;/P&gt;&lt;P&gt;Thanks so much for the help!&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2024 05:16:06 GMT</pubDate>
    <dc:creator>Sparkles</dc:creator>
    <dc:date>2024-07-16T05:16:06Z</dc:date>
    <item>
      <title>How to get length of each segment of polyline? (using SketchViewModel)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-length-of-each-segment-of-polyline/m-p/1505668#M85048</link>
      <description>&lt;P&gt;When I draw a polyline, I can see the length of each segment displayed with SketchViewModel. (as shown in screenshot)&lt;BR /&gt;How can I access these lengths from the event/argument in the SketchWidget's handleChange calllback?&lt;BR /&gt;The event is the geometry/polyline, but doesn't show the lengths/distances anhywhere in the data returned. Is there a way to add that data to the event returned in the callback?&lt;/P&gt;&lt;P&gt;Thanks so much for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 05:16:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-length-of-each-segment-of-polyline/m-p/1505668#M85048</guid>
      <dc:creator>Sparkles</dc:creator>
      <dc:date>2024-07-16T05:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get length of each segment of polyline? (using SketchViewModel)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-length-of-each-segment-of-polyline/m-p/1505875#M85056</link>
      <description>&lt;P&gt;The lengths of each segment aren't included in the event object, but if you have a reference to the polyline object, you can calculate them without much trouble.&amp;nbsp; You would just need to (1) step through the polyline's points 2 at a time (perhaps using &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#getPoint" target="_self"&gt;getPoint&lt;/A&gt;), (2) create a new &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html" target="_self"&gt;Polyline&lt;/A&gt; object from those two points, and then (3) get the distance for the new 2-point polyline from &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength" target="_self"&gt;geometryEngine.geodesicLength&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 17:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-length-of-each-segment-of-polyline/m-p/1505875#M85056</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-07-16T17:09:04Z</dc:date>
    </item>
  </channel>
</rss>

