<?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: Passing a local GeometryService in normalizeCentralMeridian in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-a-local-geometryservice-in/m-p/311097#M28608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out, you need to initialize the path as a new GeometryService first. So the code would be:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;normalizeUtils.normalizeCentralMeridian(mercatorPolylineSeven, new GeometryService("&lt;/SPAN&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Futility.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FGeometry%2FGeometryServer" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;")).then(([geom8]) =&amp;gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Aug 2019 14:31:03 GMT</pubDate>
    <dc:creator>AlanFlythe</dc:creator>
    <dc:date>2019-08-02T14:31:03Z</dc:date>
    <item>
      <title>Passing a local GeometryService in normalizeCentralMeridian</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-a-local-geometryservice-in/m-p/311095#M28606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a website that is working in a disconnected environment using the esri javascript 4.12 on a local server, and a local ArcGIS Server v10.5. We are using the&amp;nbsp;normalizeUtils.normalizeCentralMeridian to plot polylines around the world.&lt;/P&gt;&lt;P&gt;The first error we got when running our code was that it couldn't connect to&amp;nbsp;&lt;SPAN style="color: #c41a16; background-color: #f8f8f8;"&gt;"https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #3d3d3d; "&gt;We then updated our call to call our local server and the error we get is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #3d3d3d; "&gt;TypeError: Cannot read property 'query' of undefined&lt;BR /&gt; at Object.&amp;lt;anonymous&amp;gt; (dojo.js:1460)&lt;BR /&gt; at e (dojo.js:187)&lt;BR /&gt; at Object.next (dojo.js:186)&lt;BR /&gt; at dojo.js:189&lt;BR /&gt; at Object.f [as create] (dojo.js:190)&lt;BR /&gt; at dojo.js:188&lt;BR /&gt; at Object.b.cut (dojo.js:1460)&lt;BR /&gt; at dojo.js:1455&lt;BR /&gt; at e (dojo.js:187)&lt;BR /&gt; at Object.next (dojo.js:186)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #3d3d3d; "&gt;We connected to the internet and passed&amp;nbsp;"https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" as the GeometryService, which it does by default and we get the same error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; color: #3d3d3d; "&gt;Here is the code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var geomSeven = geodesicUtils.geodesicDensify(new Polyline({&lt;BR /&gt; paths: [&lt;BR /&gt; [-104.881944444444, 39.3391666666667], [167.733333333333, 8.726378]&lt;BR /&gt; ]&lt;BR /&gt; }), 100000);&lt;BR /&gt; const mercatorPolylineSeven = webMercatorUtils.geographicToWebMercator(geomSeven);&lt;BR /&gt;normalizeUtils.normalizeCentralMeridian(mercatorPolylineSeven, "https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer").then(([geom8]) =&amp;gt; {&lt;BR /&gt;var circuit7 = new Graphic({&lt;BR /&gt; geometry: geom8,&lt;BR /&gt; attributes: {&lt;BR /&gt; ObjectID: 7,&lt;BR /&gt; Name: "Kwajalein to/from MDIOC",&lt;BR /&gt; Description: "Long haul communications",&lt;BR /&gt; SiteType: "COI Circuit",&lt;BR /&gt; Event: "FTT-23",&lt;BR /&gt; MBPSIn: "",&lt;BR /&gt; MBPSOut: ""&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; circuitGraphics.push(circuit7);&lt;/P&gt;&lt;P&gt;//Kwajalein to Roi Namur- REQT: FTT-23-IC-156 &amp;amp; 157&lt;BR /&gt; var geomEight = geodesicUtils.geodesicDensify(new Polyline({&lt;BR /&gt; paths: [&lt;BR /&gt; [167.733333333333, 8.726378], [167.471691, 9.397729]&lt;BR /&gt; ]&lt;BR /&gt; }), 100000);&lt;BR /&gt; const mercatorPolylineEight = webMercatorUtils.geographicToWebMercator(geomEight);&lt;BR /&gt; normalizeUtils.normalizeCentralMeridian(mercatorPolylineEight, "http://mdaesr01:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer").then(([geom9]) =&amp;gt; {&lt;BR /&gt; var circuit8 = new Graphic({&lt;BR /&gt; geometry: geom9,&lt;BR /&gt; attributes: {&lt;BR /&gt; ObjectID: 8,&lt;BR /&gt; Name: "Kwajalein to/from MDIOC",&lt;BR /&gt; Description: "CNET",&lt;BR /&gt; SiteType: "COI Circuit",&lt;BR /&gt; Event: "FTT-23",&lt;BR /&gt; MBPSIn: "",&lt;BR /&gt; MBPSOut: "45.0"&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; circuitGraphics.push(circuit8);&lt;BR /&gt; CreateLayers();&lt;BR /&gt; });&lt;BR /&gt; }, function (errors) {&lt;BR /&gt; console.log(errors);&lt;BR /&gt; });&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are we doing something wrong with passing the geometryService as the second parameter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 19:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-a-local-geometryservice-in/m-p/311095#M28606</guid>
      <dc:creator>AlanFlythe</dc:creator>
      <dc:date>2019-08-01T19:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a local GeometryService in normalizeCentralMeridian</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-a-local-geometryservice-in/m-p/311096#M28607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I am not sure if this will help, but normally you specify the geometry service your app will use this way:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#geometryServiceUrl"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#geometryServiceUrl&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 19:57:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-a-local-geometryservice-in/m-p/311096#M28607</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-08-01T19:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a local GeometryService in normalizeCentralMeridian</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-a-local-geometryservice-in/m-p/311097#M28608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out, you need to initialize the path as a new GeometryService first. So the code would be:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;normalizeUtils.normalizeCentralMeridian(mercatorPolylineSeven, new GeometryService("&lt;/SPAN&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Futility.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FGeometry%2FGeometryServer" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;")).then(([geom8]) =&amp;gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 14:31:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-a-local-geometryservice-in/m-p/311097#M28608</guid>
      <dc:creator>AlanFlythe</dc:creator>
      <dc:date>2019-08-02T14:31:03Z</dc:date>
    </item>
  </channel>
</rss>

