<?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 not crossing the international dateline in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565085#M52738</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alan, thanks for the code. That's a bug and I've opened an issue on it. The workaround for 4.12 is to convert to webmercator and then normalize the geometries, for example:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/rafowagaso/1/" title="https://jsbin.com/rafowagaso/1/"&gt;FeatureLayer across dateline&lt;/A&gt;. Let me know if that doesn't work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jul 2019 15:34:38 GMT</pubDate>
    <dc:creator>AndyGup</dc:creator>
    <dc:date>2019-07-26T15:34:38Z</dc:date>
    <item>
      <title>Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565081#M52734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I posted the original question about a WPF .NET Application not crossing the international dateline,&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/thread/237169-polyline-not-crossing-international-dateline"&gt;https://community.esri.com/thread/237169-polyline-not-crossing-international-dateline&lt;/A&gt;. When taking that same solution, of adding or subtracting 360 based on the polyline direction, the ESRI Javascript API v4.12 still stops at the International Dateline.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;WPF .NET&amp;nbsp; app (See the blue line below)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;IMG class="image-1 jive-image" height="572" src="https://community.esri.com/legacyfs/online/454017_pastedImage_1.png" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="1065" /&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Using the ESRI Javascript API v4.12, the fix stops drawing the line at the International dateline.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;IMG class="image-2 jive-image" height="418" src="https://community.esri.com/legacyfs/online/454018_pastedImage_2.png" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="986" /&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I was just curious why with .NET the fix works but not with Javascript. And what is the fix for javascript?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 13:34:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565081#M52734</guid>
      <dc:creator>AlanFlythe</dc:creator>
      <dc:date>2019-07-23T13:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565082#M52735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This thread might be of some help.&amp;nbsp;&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/thread/230605-how-do-i-remove-the-180th-meridian-line-on-my-map-of-russia"&gt;https://community.esri.com/thread/230605-how-do-i-remove-the-180th-meridian-line-on-my-map-of-russia&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 16:29:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565082#M52735</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2019-07-23T16:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565083#M52736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also take a look at this JS API 4.12 example&amp;nbsp;that uses geodesicUtils.geodesicDensify()&amp;nbsp;&lt;A href="https://codepen.io/andygup/pen/QeyerP"&gt;https://codepen.io/andygup/pen/QeyerP&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 19:13:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565083#M52736</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2019-07-23T19:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565084#M52737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;Thanks for the response. I took your code and added in a Feature layer with a simple line renderer and that does not cross the international dateline. Are we doing something wrong with constructing the graphics for the feature layer? Here is an image (Graphics layer is Orange, Feature Layer is Blue):&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/454178_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt; &amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8" /&amp;gt;&lt;BR /&gt; &amp;lt;meta&lt;BR /&gt; name="viewport"&lt;BR /&gt; content="initial-scale=1,maximum-scale=1,user-scalable=no"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Intro to graphics - 4.12&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link&lt;BR /&gt; rel="stylesheet"&lt;BR /&gt; href="https://js.arcgis.com/4.12/esri/themes/light/main.css"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://js.arcgis.com/4.12/"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt; html,&lt;BR /&gt; body,&lt;BR /&gt; #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; "esri/Map", &lt;BR /&gt; "esri/views/MapView", &lt;BR /&gt; "esri/Graphic", &lt;BR /&gt; "esri/geometry/Polyline", &lt;BR /&gt; "esri/geometry/support/geodesicUtils",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/symbols/SimpleLineSymbol"], &lt;BR /&gt; (&lt;BR /&gt; Map,&lt;BR /&gt; MapView,&lt;BR /&gt; Graphic, Polyline, geodesicUtils, FeatureLayer, SimpleLineSymbol&lt;BR /&gt; ) =&amp;gt; {&lt;BR /&gt; var map = new Map({&lt;BR /&gt; basemap: "hybrid"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; center: [-80, 35],&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; zoom: 2&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;/****************************&lt;BR /&gt; * Create a polyline graphic&lt;BR /&gt; ****************************/&lt;/P&gt;&lt;P&gt;// First create a line geometry (this is the Keystone pipeline)&lt;BR /&gt; var polyline = new Polyline({&lt;BR /&gt;// paths: [[138, 36], [-98, 49.5], [-118, 34], [-155.5828, //19.8968], [138, 36]]&lt;BR /&gt; paths: [[-157.945774, 21.339723],&lt;BR /&gt; [167.726017, 8.719545]]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Create a symbol for drawing the line&lt;BR /&gt; var lineSymbol = {&lt;BR /&gt; type: "simple-line", // autocasts as SimpleLineSymbol()&lt;BR /&gt; color: [226, 119, 40],&lt;BR /&gt; width: 4&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; let g1 = null;&lt;BR /&gt; let geom = geodesicUtils.geodesicDensify(polyline, 100000);&lt;BR /&gt; g1 = new Graphic({&lt;BR /&gt; geometry: geom,&lt;BR /&gt; symbol: lineSymbol&lt;BR /&gt; })&lt;BR /&gt; &lt;BR /&gt; view.graphics.addMany([g1]);&lt;BR /&gt; &lt;BR /&gt; var CircuitInfo = [];&lt;BR /&gt; CircuitInfo.push({&lt;BR /&gt; Name: "Hickam AFB to/from Kwajalein Atoll, RMI",&lt;BR /&gt; Site1: "Hickam AFB",&lt;BR /&gt; lat: 21.339723,&lt;BR /&gt; lng: -157.945774,&lt;BR /&gt; Site2: "Kwajalein Atoll, RMI",&lt;BR /&gt; Site2Lat: 8.719545,&lt;BR /&gt; Site2Long: 167.726017,&lt;BR /&gt; SiteType: "COI"&lt;BR /&gt; });&lt;BR /&gt; var circuitGraphics = CircuitInfo.map((item, i) =&amp;gt; new Graphic({&lt;BR /&gt; geometry:&lt;BR /&gt; geodesicUtils.geodesicDensify(new Polyline({&lt;BR /&gt; paths: [&lt;BR /&gt; [item.lng, item.lat],&lt;BR /&gt; [item.Site2Long, item.Site2Lat]&lt;BR /&gt; ]&lt;BR /&gt; }), 100000),&lt;BR /&gt; attributes: {&lt;BR /&gt; ObjectID: i++,&lt;BR /&gt; Name: item.Name,&lt;BR /&gt; Description: item.Description,&lt;BR /&gt; SiteType: item.SiteType&lt;BR /&gt; }&lt;BR /&gt; }));&lt;BR /&gt; const fields = [&lt;BR /&gt; {&lt;BR /&gt; name: "ObjectID",&lt;BR /&gt; alias: "ObjectID",&lt;BR /&gt; type: "oid"&lt;BR /&gt; },&lt;BR /&gt; {&lt;BR /&gt; name: "Name",&lt;BR /&gt; alias: "Name",&lt;BR /&gt; type: "string"&lt;BR /&gt; },&lt;BR /&gt; {&lt;BR /&gt; name: "SiteType",&lt;BR /&gt; alias: "Location Type",&lt;BR /&gt; type: "string"&lt;BR /&gt; }&lt;BR /&gt; ];&lt;BR /&gt; var lineRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: new SimpleLineSymbol({&lt;BR /&gt; color: "blue",&lt;BR /&gt; width: 10&lt;BR /&gt; })&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var eventCircuitslayer = new FeatureLayer({&lt;BR /&gt; source: circuitGraphics, // autocast as an array of esri/Graphic&lt;BR /&gt; objectIdField: "ObjectID", // This must be defined when creating a layer from Graphics&lt;BR /&gt; fields: fields,&lt;BR /&gt; renderer: lineRenderer,&lt;BR /&gt; title: "Wrap Problem",&lt;BR /&gt; //spatialReference: { wkid: 3857 }&lt;BR /&gt; });&lt;BR /&gt; map.add(eventCircuitslayer);&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help so far.&lt;/P&gt;&lt;P&gt;~Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 11:10:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565084#M52737</guid>
      <dc:creator>AlanFlythe</dc:creator>
      <dc:date>2019-07-24T11:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565085#M52738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alan, thanks for the code. That's a bug and I've opened an issue on it. The workaround for 4.12 is to convert to webmercator and then normalize the geometries, for example:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/rafowagaso/1/" title="https://jsbin.com/rafowagaso/1/"&gt;FeatureLayer across dateline&lt;/A&gt;. Let me know if that doesn't work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 15:34:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565085#M52738</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2019-07-26T15:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565086#M52739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Andy,&lt;/P&gt;&lt;P&gt;Not sure your workaround works. Looks like the colors were flipped from the code I posted so the Feature layer is now orange and the Graphics layer is now blue. Either way, in your example the Feature Layer is still stopping at the international dateline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did I misinterpret the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:40:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565086#M52739</guid>
      <dc:creator>AlanFlythe</dc:creator>
      <dc:date>2019-07-26T16:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565087#M52740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry ignore the previous jsbin and try this one: &lt;A href="https://jsbin.com/xegicih/2/edit?html,output"&gt;https://jsbin.com/xegicih/2/edit?html,output&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565087#M52740</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2019-07-26T16:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline not crossing the international dateline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565088#M52741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andy, that one works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2019 10:32:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/polyline-not-crossing-the-international-dateline/m-p/565088#M52741</guid>
      <dc:creator>AlanFlythe</dc:creator>
      <dc:date>2019-07-29T10:32:21Z</dc:date>
    </item>
  </channel>
</rss>

