<?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 separate the longitude and latitude and store them in different variables?? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131085#M12198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help. It works perfectly. How do I learn this stuff?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank a lot again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Siyabonga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jul 2020 07:23:03 GMT</pubDate>
    <dc:creator>SiyabongaKubeka</dc:creator>
    <dc:date>2020-07-10T07:23:03Z</dc:date>
    <item>
      <title>How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131077#M12190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help with separation the latitude and longitude. I am drawing a polygon and getting the coordinates of each vertex of the polygon. This is what I have done to separate the coordinates but it is not working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for (var i = 0; i &amp;lt; gra.geometry.rings.length; i++){&lt;BR /&gt; for (var p = 0; p &amp;lt; gra.geometry.rings&lt;I&gt;.length; p++){&lt;BR /&gt; crmLatitude = String(gra.geometry.rings&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;.getLatitude());&lt;BR /&gt; crmLongitude = String(gra.geometry.rings&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;.getLongitude()); &lt;BR /&gt; var LatLon = String(gra.geometry.rings&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;); &lt;BR /&gt; console.log(LatLon); &lt;BR /&gt; latlon = LatLon; &lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error that I get when I debug I get an error that states that getLatitude() is not a function.&lt;/P&gt;&lt;P&gt;Please assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Siyabonga Kubeka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2020 09:42:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131077#M12190</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-07-04T09:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131078#M12191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;You need to use getPoint method on the polygon.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;rings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator 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="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; p &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; p &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;rings&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; p&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    crmLatitude &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;String&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; p&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getLatitude&lt;/SPAN&gt;&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="punctuation token"&gt;;&lt;/SPAN&gt;
    crmLongitude &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;String&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; p&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getLongitude&lt;/SPAN&gt;&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="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; LatLon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;String&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;rings&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;p&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;
    console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;LatLon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    latlon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LatLon&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;/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>Sat, 11 Dec 2021 07:22:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131078#M12191</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T07:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131079#M12192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did use this way but I still get the error that says getLatitude() is not a function.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/499142_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jul 2020 19:08:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131079#M12192</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-07-05T19:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131080#M12193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your loops&amp;nbsp;are going to high.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit; font-size: 14px;"&gt;for&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit; font-size: 14px;"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit; font-size: 14px;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;lt;&lt;/SPAN&gt; gra&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;rings&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;length - 1&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit; font-size: 14px;"&gt;++&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit; font-size: 14px;"&gt;for&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit; font-size: 14px;"&gt;var&lt;/SPAN&gt; p &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit; font-size: 14px;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;;&lt;/SPAN&gt; p &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;lt;&lt;/SPAN&gt; gra&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;rings&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;length - 1&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;;&lt;/SPAN&gt; p&lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit; font-size: 14px;"&gt;++&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;{&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:22:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131080#M12193</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T07:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131081#M12194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please how me with an example that is working? I have changed my loops as above, now I get this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/499665_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Siyabonga Kubeka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:04:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131081#M12194</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-07-09T11:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131082#M12195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is a new different error. How about we do the reverse as I am the one providing the help. You provide your code or a sample you are having trouble with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2020 12:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131082#M12195</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-09T12:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131083#M12196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No problem, here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8"&amp;gt;&lt;BR /&gt; &amp;lt;meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt; &lt;BR /&gt;&amp;lt;title&amp;gt;GIS Map for CRM&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link href="https://js.arcgis.com/4.14/esri/themes/light/main.css" rel="stylesheet"&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://js.arcgis.com/4.14/"&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; #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;/P&gt;&lt;P&gt;.esri-sketch__section.esri-sketch__tool-section:last-of-type {&lt;BR /&gt; display: none;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;.esri-sketch__section.esri-sketch__tool-section:nth-child(2) {&lt;BR /&gt; border-right: none;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; var lon;&lt;BR /&gt; var lat;&lt;BR /&gt; var crmLatitude;&lt;BR /&gt; var crmLongitude;&lt;BR /&gt; var latlon;&lt;BR /&gt; var provinces;&lt;BR /&gt; var municipalities;&lt;BR /&gt; var districts;&lt;BR /&gt; var wards;&lt;BR /&gt; var showWards = [];&lt;BR /&gt; &lt;BR /&gt; var testingV = "Gautengs";&lt;BR /&gt; &lt;BR /&gt; if(testingV == "Gauteng")&lt;BR /&gt; {&lt;BR /&gt; require(["esri/views/MapView", &lt;BR /&gt; "esri/WebMap", &lt;BR /&gt; "esri/config", &lt;BR /&gt; "esri/widgets/Sketch", &lt;BR /&gt; "esri/layers/GraphicsLayer"], &lt;BR /&gt; &lt;BR /&gt; function(MapView, WebMap, esriConfig, Sketch, GraphicsLayer) {&lt;BR /&gt; &lt;BR /&gt; esriConfig.portalUrl = "https://portal.environment.gov.za/portal";&lt;BR /&gt; &lt;BR /&gt; var webmap = new WebMap({&lt;BR /&gt; portalItem: {&lt;BR /&gt; // autocasts as new PortalItem()&lt;BR /&gt; id: "04582be14885483da48f29398960f653"&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var graphicsLayer = new GraphicsLayer();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var view = new MapView({&lt;BR /&gt; map: webmap,&lt;BR /&gt; container: "viewDiv"&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; webmap.layers.add(graphicsLayer);&lt;BR /&gt; &lt;BR /&gt; var sketch = new Sketch({&lt;BR /&gt; layer: graphicsLayer,&lt;BR /&gt; view: view,&lt;BR /&gt; //container: "viewDiv"&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; //view.ui.add(sketch, {&lt;BR /&gt; // position: "top-right"&lt;BR /&gt; //});&lt;BR /&gt; // Listen to sketch widget's create event.&lt;BR /&gt; sketch.on("create", function(event) {&lt;BR /&gt; // check if the create event's state has changed to complete indicating&lt;BR /&gt; // the graphic create operation is completed.&lt;BR /&gt; console.log(view.zoom);&lt;BR /&gt; if (event.state === "complete") {&lt;BR /&gt; // remove the graphic from the layer. Sketch adds&lt;BR /&gt; // the completed graphic to the layer by default.&lt;BR /&gt; graphicsLayer.remove(event.graphic);&lt;/P&gt;&lt;P&gt;// use the graphic.geometry to query features that intersect it&lt;BR /&gt; selectFeatures(event.graphic.geometry);&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; } &lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; //window.parent.Xrm.Page.getAttribute("dea_ward").setValue("");&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; require([&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/WebMap",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/tasks/QueryTask",&lt;BR /&gt; "esri/tasks/support/Query",&lt;BR /&gt; "esri/config",&lt;BR /&gt; "esri/widgets/Sketch",&lt;BR /&gt; "esri/layers/GraphicsLayer"], &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; function(Map, MapView, WebMap, FeatureLayer, QueryTask, Query,&lt;BR /&gt; esriConfig, Sketch, GraphicsLayer) {&lt;BR /&gt; esriConfig.portalUrl = "https://portal.environment.gov.za/portal";&lt;/P&gt;&lt;P&gt;const featureLayerUrl = 'https://portal.environment.gov.za/server/rest/services/Boundary/Wards/MapServer/0';&lt;BR /&gt; var webmap = new WebMap({&lt;BR /&gt; portalItem: {&lt;BR /&gt; id: "04582be14885483da48f29398960f653"&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var graphicsLayer = new GraphicsLayer();&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; map: webmap,&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; popup: null&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var featureLayer = new FeatureLayer({&lt;BR /&gt; url: featureLayerUrl&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;webmap.add(featureLayer);&lt;/P&gt;&lt;P&gt;webmap.layers.add(graphicsLayer);&lt;BR /&gt; &lt;BR /&gt; var sketch = new Sketch({&lt;BR /&gt; layer: graphicsLayer,&lt;BR /&gt; view: view, &lt;BR /&gt; availableCreateTools: ["polygon"],&lt;BR /&gt; creationMode: "update",&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; view.ui.add(sketch, {&lt;BR /&gt; position: "top-right"&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; sketch.on('create', function (event) {&lt;BR /&gt; // check if the create event's state has changed to complete indicating&lt;BR /&gt; // the graphic create operation is completed.&lt;BR /&gt; if (event.state === "complete") {&lt;/P&gt;&lt;P&gt;if (view.zoom &amp;gt;= 11) {&lt;BR /&gt; let gra = event.graphic.clone();&lt;BR /&gt; event.graphic.layer.removeAll();&lt;BR /&gt; gra.symbol.color = "red";&lt;BR /&gt; gra.layer.add(gra);&lt;BR /&gt; console.log(view.zoom);&lt;BR /&gt; console.log("X = ", gra.geometry.x);&lt;BR /&gt; console.log("Y = ", gra.geometry.y);&lt;BR /&gt; console.log("Lat = ", event.graphic.geometry.latitude);&lt;BR /&gt; console.log("Long = ", event.graphic.geometry.longitude);&lt;BR /&gt; lat = event.graphic.geometry.latitude;&lt;BR /&gt; lon = event.graphic.geometry.longitude;&lt;BR /&gt; zoomLevel = view.zoom;&lt;BR /&gt; for (var i = 0; i &amp;lt; gra.geometry.rings.length - 1; i++){&lt;BR /&gt; for (var p = 0; p &amp;lt; gra.geometry.rings&lt;I&gt;.length - 1; p++){&lt;BR /&gt; crmLatitude = String(gra.geometry.getPoint(i, p).getLatitude());&lt;BR /&gt; crmLongitude = String(gra.geometry.getPoint(i, p).getLongitude()); &lt;BR /&gt; var LatLon = String(gra.geometry.rings&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;); &lt;BR /&gt; console.log(LatLon);&lt;BR /&gt; console.log(crmLatitude);&lt;BR /&gt; console.log(crmLongitude);&lt;BR /&gt; latlon = LatLon; &lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; debugger;&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt; alert("please zoom in");&lt;BR /&gt; event.graphic.layer.remove(event.graphic);&lt;BR /&gt; }&lt;BR /&gt; } &lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; view.on('click', function(event){&lt;BR /&gt; var queryTask = new QueryTask({&lt;BR /&gt; url: featureLayerUrl&lt;BR /&gt; });&lt;BR /&gt; var query = new Query();&lt;BR /&gt; query.geometry = view.toMap(event);&lt;BR /&gt; query.distance = 0;&lt;BR /&gt; query.units = "meters";&lt;BR /&gt; query.spatialRelationship = "intersects";&lt;BR /&gt; query.returnGeometry = true;&lt;BR /&gt; query.outFields = [ "PROVINCE", "DCS12_NAME", "S12_NAME", "WARD_NO" ];&lt;/P&gt;&lt;P&gt;queryTask.execute(query).then(function(results){&lt;BR /&gt; &lt;BR /&gt; var feat = results.features[0];&lt;BR /&gt; provinces = feat.attributes.PROVINCE;&lt;BR /&gt; wards = feat.attributes.WARD_NO;&lt;BR /&gt; districts = feat.attributes.DCS12_NAME;&lt;BR /&gt; municipalities = feat.attributes.S12_NAME&lt;BR /&gt; &lt;BR /&gt; showWards.push(wards);&lt;BR /&gt; var xwards = showWards.toString();&lt;BR /&gt; &lt;BR /&gt; console.log(provinces);&lt;BR /&gt; console.log(wards);&lt;BR /&gt; console.log(districts);&lt;BR /&gt; console.log(municipalities);&lt;BR /&gt; &lt;BR /&gt; console.log(xwards);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; //Call to CRM to populate the lookup field for Province&lt;BR /&gt; &lt;BR /&gt; debugger;&lt;BR /&gt; &lt;BR /&gt; window.parent.Xrm.WebApi.online.retrieveMultipleRecords("dea_province", "?$select=dea_name,dea_provinceid&amp;amp;$filter=dea_name eq '" + provinces + "'").then(&lt;BR /&gt; function success(results) {&lt;BR /&gt; debugger;&lt;BR /&gt; for (var i = 0; i &amp;lt; results.entities.length; i++) {&lt;BR /&gt; var dea_name = results.entities&lt;I&gt;["dea_name"];&lt;BR /&gt; var dea_provinceid = results.entities&lt;I&gt;["dea_provinceid"];&lt;BR /&gt; &lt;BR /&gt; //Populate lookup&lt;BR /&gt; var lookupValue = new Array();&lt;BR /&gt; lookupValue[0] = new Object();&lt;BR /&gt; lookupValue[0].id = dea_provinceid; // GUID of the lookup id&lt;BR /&gt; lookupValue[0].name = dea_name; // Name of the lookup&lt;BR /&gt; lookupValue[0].entityType = "dea_province"; //Entity Type of the lookup entity&lt;BR /&gt; window.parent.Xrm.Page.getAttribute("dea_province").setValue(lookupValue);&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; function(error) {&lt;BR /&gt; Xrm.Utility.alertDialog(error.message);&lt;BR /&gt; }&lt;BR /&gt; );&lt;BR /&gt; &lt;BR /&gt; //Call to CRM to populate the lookup field for the Local Municipality&lt;BR /&gt; &lt;BR /&gt; window.parent.Xrm.WebApi.online.retrieveMultipleRecords("dea_localmunicipality", "?$select=dea_localmunicipalityid,dea_name&amp;amp;$filter=dea_name eq '" + municipalities + "'").then(&lt;BR /&gt; function success(results) {&lt;BR /&gt; for (var i = 0; i &amp;lt; results.entities.length; i++) {&lt;BR /&gt; var dea_localmunicipalityid = results.entities&lt;I&gt;["dea_localmunicipalityid"];&lt;BR /&gt; var dea_name = results.entities&lt;I&gt;["dea_name"];&lt;BR /&gt; &lt;BR /&gt; //Populate lookup&lt;BR /&gt; var lookupValue = new Array();&lt;BR /&gt; lookupValue[0] = new Object();&lt;BR /&gt; lookupValue[0].id = dea_localmunicipalityid; // GUID of the lookup id&lt;BR /&gt; lookupValue[0].name = dea_name; // Name of the lookup&lt;BR /&gt; lookupValue[0].entityType = "dea_localmunicipality"; //Entity Type of the lookup entity&lt;BR /&gt; window.parent.Xrm.Page.getAttribute("dea_localmunicipality").setValue(lookupValue);&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; function(error) {&lt;BR /&gt; Xrm.Utility.alertDialog(error.message);&lt;BR /&gt; }&lt;BR /&gt; ); &lt;BR /&gt; &lt;BR /&gt; //Call to CRM to populate the lookup field for District Municipality&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;window.parent.Xrm.WebApi.online.retrieveMultipleRecords("dea_districtmunicipality", "?$select=dea_districtmunicipalityid,dea_name&amp;amp;$filter=dea_name eq '" + districts + "'").then(&lt;BR /&gt; function success(results) {&lt;BR /&gt; for (var i = 0; i &amp;lt; results.entities.length; i++) {&lt;BR /&gt; var dea_districtmunicipalityid = results.entities&lt;I&gt;["dea_districtmunicipalityid"];&lt;BR /&gt; var dea_name = results.entities&lt;I&gt;["dea_name"];&lt;BR /&gt; &lt;BR /&gt; //Populate lookup&lt;BR /&gt; var lookupValue = new Array();&lt;BR /&gt; lookupValue[0] = new Object();&lt;BR /&gt; lookupValue[0].id = dea_districtmunicipalityid; // GUID of the lookup id&lt;BR /&gt; lookupValue[0].name = dea_name; // Name of the lookup&lt;BR /&gt; lookupValue[0].entityType = "dea_districtmunicipality"; //Entity Type of the lookup entity&lt;BR /&gt; window.parent.Xrm.Page.getAttribute("dea_districtmunicipality").setValue(lookupValue);&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; function(error) {&lt;BR /&gt; Xrm.Utility.alertDialog(error.message);&lt;BR /&gt; }&lt;BR /&gt; );&lt;BR /&gt; &lt;BR /&gt; //Populate the coordinates field&lt;BR /&gt; debugger;&lt;BR /&gt; window.parent.Xrm.Page.getAttribute("dea_latitude").setValue(latlon);&lt;BR /&gt; window.parent.Xrm.Page.getAttribute("dea_longitude").setValue(latlon);&lt;BR /&gt; window.parent.Xrm.Page.getAttribute("dea_ward").setValue(xwards);&lt;BR /&gt; //THE END OF CALLS TO CRM&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;meta&amp;gt;&amp;lt;meta&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body style="overflow-wrap: break-word;"&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &lt;BR /&gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2020 12:20:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131083#M12196</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-07-09T12:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131084#M12197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I was mixing 3.x and 4.x code. In 4.x there is no getLatitude function, it is now just a property of the point.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;state &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"complete"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;zoom &lt;SPAN class="operator token"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;11&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; gra &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;clone&lt;/SPAN&gt;&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="comment token"&gt;//event.graphic.layer.removeAll();&lt;/SPAN&gt;
                event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;symbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;color &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"red"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="comment token"&gt;//gra.layer.add(gra);&lt;/SPAN&gt;
                console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;zoom&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"X = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Y = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Lat = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;latitude&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Long = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;longitude&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                lat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;latitude&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                lon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;centroid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;longitude&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                zoomLevel &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;zoom&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;rings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator 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="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; p &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; p &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;rings&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; p&lt;SPAN class="operator 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="keyword token"&gt;var&lt;/SPAN&gt; pnt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; p&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    crmLatitude &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;String&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;latitude&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    crmLongitude &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;String&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;longitude&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; LatLon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;String&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;LatLon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;crmLatitude&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;crmLongitude&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                    latlon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LatLon&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="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="token function"&gt;alert&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"please zoom in"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;remove&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&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="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="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;/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;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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The new error you were getting is because you were removing the graphics with event.graphic.layer.removeAll(). this was an issue as you are asking the sketch widget to update the drawn graphic immediately yet you removed it and replaced it with a clone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:22:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131084#M12197</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T07:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131085#M12198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help. It works perfectly. How do I learn this stuff?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank a lot again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Siyabonga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2020 07:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131085#M12198</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-07-10T07:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the longitude and latitude and store them in different variables??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131086#M12199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just reading the help docs and experience.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:44:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-separate-the-longitude-and-latitude-and/m-p/131086#M12199</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-10T12:44:57Z</dc:date>
    </item>
  </channel>
</rss>

