<?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: Documentation that instructs how to create polylines through code, doesn't work in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/documentation-that-instructs-how-to-create/m-p/1231534#M294</link>
    <description>&lt;P&gt;&lt;STRONG&gt;ArcGISSpatialReference.WGS84()&amp;nbsp;&lt;/STRONG&gt;is the correct spatial reference method to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for this line&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// create a new Polyline from the points&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var myFlightPath = new Esri.GameEngine.Geometry.ArcGISPolyline(stops);&lt;/STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You actually need to use the ArcGISPolylineBuilder class to create a polyline&lt;BR /&gt;It will look something like this&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;var myFlightPath = new Esri.GameEngine.Geometry.ArcGISPolylineBuilder(stops.Length, ArcGISSpatialReference.WGS84());&lt;/STRONG&gt;"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;foreach (stop in stops)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;myFlightPath.AddPoint(stop);&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that we will get the doc updated&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 00:54:38 GMT</pubDate>
    <dc:creator>Matt_Nelson</dc:creator>
    <dc:date>2022-11-15T00:54:38Z</dc:date>
    <item>
      <title>Documentation that instructs how to create polylines through code, doesn't work</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/documentation-that-instructs-how-to-create/m-p/1230934#M282</link>
      <description>&lt;P&gt;Hello, I followed the documentation instruction to create polylines through code, but it does not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the documentation, the snipped code offered is this one&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;// define some map points (airports: LA, Chicago, Paris)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var laxPoint = new ArcGISPoint(-118.408, 33.943, ArcGISSpatialReferences.Wgs84);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var ordPoint = new ArcGISPoint(-87.905, 41.979, ArcGISSpatialReferences.Wgs84);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var orlyPoint = new ArcGISPoint(2.379, 48.723, ArcGISSpatialReferences.Wgs84);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// add the points to a collection&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var stops = new ArcGISPoint[] { laxPoint, ordPoint, orlyPoint };&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// create a new Polyline from the points&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var myFlightPath = new Esri.GameEngine.Geometry.ArcGISPolyline(stops);&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Reasons for the problems that I'm having:&lt;BR /&gt;-&amp;gt; &lt;STRONG&gt;ArcGISSpatialReferences.Wgs84&lt;/STRONG&gt; -&amp;gt;&amp;nbsp;&lt;STRONG&gt;ArcGISSpatialReferences&lt;/STRONG&gt; don't exist the only thing close to this that works is this:&amp;nbsp;&lt;STRONG&gt;ArcGISSpatialReference.WGS84()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;&lt;STRONG&gt;Esri.GameEngine.Geometry.ArcGISPolyline(stops)&lt;/STRONG&gt; -&amp;gt; This does not take parameters, so it does not work, and I have no idea what should be added to work. Could you please provide me what I might be missing and which documentation I can follow in order for this to work?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 16:54:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/documentation-that-instructs-how-to-create/m-p/1230934#M282</guid>
      <dc:creator>MoreInfoTheBetter</dc:creator>
      <dc:date>2022-11-11T16:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Documentation that instructs how to create polylines through code, doesn't work</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/documentation-that-instructs-how-to-create/m-p/1231534#M294</link>
      <description>&lt;P&gt;&lt;STRONG&gt;ArcGISSpatialReference.WGS84()&amp;nbsp;&lt;/STRONG&gt;is the correct spatial reference method to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for this line&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// create a new Polyline from the points&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var myFlightPath = new Esri.GameEngine.Geometry.ArcGISPolyline(stops);&lt;/STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You actually need to use the ArcGISPolylineBuilder class to create a polyline&lt;BR /&gt;It will look something like this&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;var myFlightPath = new Esri.GameEngine.Geometry.ArcGISPolylineBuilder(stops.Length, ArcGISSpatialReference.WGS84());&lt;/STRONG&gt;"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;foreach (stop in stops)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;myFlightPath.AddPoint(stop);&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that we will get the doc updated&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 00:54:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/documentation-that-instructs-how-to-create/m-p/1231534#M294</guid>
      <dc:creator>Matt_Nelson</dc:creator>
      <dc:date>2022-11-15T00:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Documentation that instructs how to create polylines through code, doesn't work</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/documentation-that-instructs-how-to-create/m-p/1231886#M302</link>
      <description>&lt;P&gt;Sorry slightly wrong with the code I suggested&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;var myFlightPath = new Esri.GameEngine.Geometry.ArcGISPolylineBuilder(ArcGISSpatialReference.WGS84());&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;foreach (var stop in stops)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;myFlightPath.AddPoint(stop);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 18:17:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/documentation-that-instructs-how-to-create/m-p/1231886#M302</guid>
      <dc:creator>Matt_Nelson</dc:creator>
      <dc:date>2022-11-15T18:17:08Z</dc:date>
    </item>
  </channel>
</rss>

