<?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 convert polygon vertex to lat/lon in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221836#M79019</link>
    <description>&lt;P&gt;Assume those are WebMercator, so you can run the polygon through the webmercatorUtils first.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#webMercatorToGeographic" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#webMercatorToGeographic&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 22:05:16 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2022-10-13T22:05:16Z</dc:date>
    <item>
      <title>How to convert polygon vertex to lat/lon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221798#M79017</link>
      <description>&lt;P&gt;I am aware how to iterate through the graphic.geometry.rings to get each x/y coordinate. However, this yields massive numbers that are obviously not lat/lon values. I have found quite a few examples of people asking the same or very similar questions, but none seem to yield an actual lat/lon result. I only get something like the below for each vertex:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Array &lt;/SPAN&gt;&lt;SPAN class=""&gt;[ &lt;/SPAN&gt;&lt;SPAN class=""&gt;-12390508.031742427&lt;/SPAN&gt;, &lt;SPAN class=""&gt;3819480.562610634&lt;/SPAN&gt;&lt;SPAN class=""&gt; ]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 21:04:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221798#M79017</guid>
      <dc:creator>GeraldRowe</dc:creator>
      <dc:date>2022-10-13T21:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert polygon vertex to lat/lon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221836#M79019</link>
      <description>&lt;P&gt;Assume those are WebMercator, so you can run the polygon through the webmercatorUtils first.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#webMercatorToGeographic" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#webMercatorToGeographic&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 22:05:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221836#M79019</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-10-13T22:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert polygon vertex to lat/lon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221840#M79020</link>
      <description>&lt;P&gt;Thanks a million for this!&lt;/P&gt;&lt;P&gt;I spent an entire trying to figure out how to get these converted.&lt;/P&gt;&lt;P&gt;var geo = webMercatorUtils.xyToLngLat(graphic.geometry.rings[i][p][0], graphic.geometry.rings[i][p][1]);&lt;/P&gt;&lt;P&gt;console.log("Lon: "+ geo[0] +", Lat: "+ geo[1]);&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 22:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221840#M79020</guid>
      <dc:creator>GeraldRowe</dc:creator>
      <dc:date>2022-10-13T22:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert polygon vertex to lat/lon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221845#M79021</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could do the whole thing first too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const latLonPolygonGeometry = webMercatorUtils.webMercatorToGeographic(graphic.goemetry);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then go over the rings.&lt;/P&gt;&lt;P&gt;Lots of options!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 01:51:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-convert-polygon-vertex-to-lat-lon/m-p/1221845#M79021</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-10-14T01:51:47Z</dc:date>
    </item>
  </channel>
</rss>

