<?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: How to find Begin and End points of a polyline using Arcgis  Javascript in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96039#M8822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Careful, the previous solution assumes the geometry is a single-part polyline, which seems to be ok for this use case, but might not work in all situations, like when the geometry is retrieved from an external source like a Map or Feature Service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var lastPartIdx =&amp;nbsp; polyline.paths.length-1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var lastPntIdx = polyline.paths[lastPartIdx].length - 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var lastPnt = polyline.getPoint(lastPartIdx , lastPntIdx);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Sep 2013 15:30:40 GMT</pubDate>
    <dc:creator>JohnGrayson</dc:creator>
    <dc:date>2013-09-27T15:30:40Z</dc:date>
    <item>
      <title>How to find Begin and End points of a polyline using Arcgis  Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96035#M8818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone say how to get the starting and ending points of a polyline when we draw using Arcgis Javascript api.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using WebAdf we are having the facility of MapLineEventArgs.BeginMapPoint and&amp;nbsp; MapLineEventArgs.EndMapPoint.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to perform few validation basing on this start and end coordinates of polyline&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Aravind&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 12:07:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96035#M8818</guid>
      <dc:creator>viteboardviteboard</dc:creator>
      <dc:date>2013-09-26T12:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Begin and End points of a polyline using Arcgis  Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96036#M8819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use polyline.getPoint(pathIndex,pointIndex) function to get the point you need. For instance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First point of the first path: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;polyline.getPoint(0,0)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Last point of the first path:&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var lastIdx = polyline.paths[0].length - 1;
var lastPnt = polyline.getPoint(0, lastIdx)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:40:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96036#M8819</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2021-12-10T23:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Begin and End points of a polyline using Arcgis  Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96037#M8820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you..It solved my problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 13:10:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96037#M8820</guid>
      <dc:creator>viteboardviteboard</dc:creator>
      <dc:date>2013-09-26T13:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Begin and End points of a polyline using Arcgis  Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96038#M8821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to help. Please consider mark your thread as "Answered" so other people may find it helpful. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 13:12:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96038#M8821</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2013-09-26T13:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to find Begin and End points of a polyline using Arcgis  Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96039#M8822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Careful, the previous solution assumes the geometry is a single-part polyline, which seems to be ok for this use case, but might not work in all situations, like when the geometry is retrieved from an external source like a Map or Feature Service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var lastPartIdx =&amp;nbsp; polyline.paths.length-1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var lastPntIdx = polyline.paths[lastPartIdx].length - 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var lastPnt = polyline.getPoint(lastPartIdx , lastPntIdx);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 15:30:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-find-begin-and-end-points-of-a-polyline/m-p/96039#M8822</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2013-09-27T15:30:40Z</dc:date>
    </item>
  </channel>
</rss>

