<?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: Polyline methods bugged in 4.6? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628356#M58668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for replying Robert. The Jsbin I made uses autocasting because I grabbed it from some of ESRI's code samples, but I'm not actually using autocasting in my application. I create a true polyline and it still doesnt work. If I revert back to 4.5 it works fine, with no changes to the code, so it is definitely a 4.6 problem. the insertPoint() function just does not seem to be working from what I can tell.&amp;nbsp;There are a couple of other problems I've noticed since switching to 4.6 too, so I'll be sticking with 4.5 until I can find a solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jan 2018 18:35:45 GMT</pubDate>
    <dc:creator>AndrewLindley</dc:creator>
    <dc:date>2018-01-03T18:35:45Z</dc:date>
    <item>
      <title>Polyline methods bugged in 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628354#M58666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a bit of code in a 3D SceneView for a draw-line tool that has worked fine until the 4.6 release. It basically grabs the map point when the user clicks on the map, and creates a line starting at that point, and adds each subsequently clicked point to the 'paths' property of the line until the user double clicks to end the process. The line is added to the map as a graphic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After 4.6, however, I can't get the polyline.insertPoint() function to work, or any of the polyline functions for that matter. I threw together a jsbin that illustrates&amp;nbsp;a similar&amp;nbsp;problem:&amp;nbsp;&lt;A href="http://jsbin.com/wuqeramage/edit?js,output"&gt;here&lt;/A&gt;. You have to open dev tools to see the results. I used the getPoint() function to keep it a bit simpler, but it throws an error that&amp;nbsp;&lt;EM&gt;line.getPoint() is not a function &lt;/EM&gt;(&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#getPoint"&gt;getPoint() documentation&lt;/A&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tldr:&amp;nbsp;&lt;/STRONG&gt;polyline.insertPoint(path index, point index, point) is not adding anything to the 'paths' property of the line I pass in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas whats going on here? Am I missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is much appreciated. Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 22:41:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628354#M58666</guid>
      <dc:creator>AndrewLindley</dc:creator>
      <dc:date>2018-01-02T22:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline methods bugged in 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628355#M58667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I think the place you were using the polyline before was autocasting. Your code in the JSBin is just creating a basic object and not a Polyline that is why the getPoint is not a function. You need to use new Polyline:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; testLine &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Polyline&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polyline"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; paths&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.178&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;51.48791&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.178&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;51.48791&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628355#M58667</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T02:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline methods bugged in 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628356#M58668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for replying Robert. The Jsbin I made uses autocasting because I grabbed it from some of ESRI's code samples, but I'm not actually using autocasting in my application. I create a true polyline and it still doesnt work. If I revert back to 4.5 it works fine, with no changes to the code, so it is definitely a 4.6 problem. the insertPoint() function just does not seem to be working from what I can tell.&amp;nbsp;There are a couple of other problems I've noticed since switching to 4.6 too, so I'll be sticking with 4.5 until I can find a solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 18:35:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628356#M58668</guid>
      <dc:creator>AndrewLindley</dc:creator>
      <dc:date>2018-01-03T18:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline methods bugged in 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628357#M58669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the test application you had. As&amp;nbsp;Robert pointed out you are using autocasted polyline. It won't work in this case because it is not `Polyline` object. So as he suggested you need to create a new instance of `Polyline` or you can directly work with the `Graphic.geometry`.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a modified&amp;nbsp; SDK sample that uses `getPoint&amp;nbsp;` and `inserPoint`&amp;nbsp;methods on Polyline.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://codepen.io/anon/pen/LeOYVZ?&amp;amp;editors=100" title="https://codepen.io/anon/pen/LeOYVZ?&amp;amp;editors=100"&gt;https://codepen.io/anon/pen/LeOYVZ?&amp;amp;editors=100&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are still running into problems can you please give a snippet code that reproduces the issue you are running into?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 19:15:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628357#M58669</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2018-01-05T19:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline methods bugged in 4.6?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628358#M58670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;underlying&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;problem is that, for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;version&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;4.6&lt;/SPAN&gt;&lt;SPAN&gt;, the insertPoint doesn't work when adding a point at the end of the ring. We plan to fix this for version 4.7. See also&amp;nbsp;&lt;A href="https://community.esri.com/thread/209499-polygon-and-polyline-insertpoint-function-seems-to-be-broken-in-js-api-46-but-was-working-in-45"&gt;https://community.esri.com/thread/209499-polygon-and-polyline-insertpoint-function-seems-to-be-broken-in-js-api-46-but-was-working-in-45&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Mar 2018 01:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-methods-bugged-in-4-6/m-p/628358#M58670</guid>
      <dc:creator>BjornSvensson</dc:creator>
      <dc:date>2018-03-03T01:47:29Z</dc:date>
    </item>
  </channel>
</rss>

