<?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: What are the coordinates used in the Path parameter of the Polyline class? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436481#M40192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome, glad I could be of help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Mar 2017 22:26:06 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2017-03-10T22:26:06Z</dc:date>
    <item>
      <title>What are the coordinates used in the Path parameter of the Polyline class?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436476#M40187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm drawing a bunch of carrier routes from the USPS API to an ArcGIS map. I need to only show the routes that are within a certain distance from a certain point. I have the latitude and longitude for the center point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought the paths used by Polyline were made up of latitude and longitude sets multiplied by 100000, and I tried using them as such but that didn't work. The paths are generated from point sets that look like this:&amp;nbsp; -9214713, 3256075. When divided by 100000 they look like longitude and latitude, but I guess they're not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are these coordinates used in the Path parameter of the Polyline class, and how can I convert them to lat and lng for the purpose of calculating distance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 21:10:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436476#M40187</guid>
      <dc:creator>robertparham</dc:creator>
      <dc:date>2017-03-09T21:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: What are the coordinates used in the Path parameter of the Polyline class?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436477#M40188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="padding: 0px;"&gt;They're probably web mercator coordinates, which are in meters. &amp;nbsp;To be certain, you should check the spatial reference on the polyline and make sure it's web mercator. &amp;nbsp;You can convert between&amp;nbsp;between long/lat and web mercator x/y using the webMercatorUtils module:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.webmercatorutils-amd.html" style="color: #2989c5;" title="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.webmercatorutils-amd.html"&gt;esri/geometry/webMercatorUtils | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;If you're using the 4.XX API it's:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html" style="color: #2989c5;" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html"&gt;webMercatorUtils | API Reference | ArcGIS API for JavaScript 4.3&lt;/A&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Since the polylines you're testing are already using web mercator coordinates, you should probably convert the long/lat you have into web mercator XY and test everything in web mercator coordinates.&lt;/P&gt;&lt;P style="padding: 0px;"&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;There are a few ways to approach the actual testing. &amp;nbsp;You might find the geometry engine useful for this:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.geometryengine-amd.html" style="color: #2989c5;" title="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.geometryengine-amd.html"&gt;esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;(4.XX:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html" style="color: #2989c5;" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html"&gt;geometryEngine | API Reference | ArcGIS API for JavaScript 4.3&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 21:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436477#M40188</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-03-09T21:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: What are the coordinates used in the Path parameter of the Polyline class?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436478#M40189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your help.&lt;/P&gt;&lt;P&gt;I checked the spatial reference as suggested, the spatialReference._info.wkTemplate property is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I don't know what that means exactly but it appears to me that your guess about it being web mercator is correct, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given this info, which method on the webMercatorUtils object would be required to convert the coordinates/path/geometry to degrees (lat/lng)? I tried all of them but most returned undefined. If you can tell me which one is correct it will help in debugging.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:35:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436478#M40189</guid>
      <dc:creator>robertparham</dc:creator>
      <dc:date>2017-03-10T15:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: What are the coordinates used in the Path parameter of the Polyline class?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436479#M40190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using 3.XX or 4.XX?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming 3.XX: use this method:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.webmercatorutils-amd.html#xytolnglat" title="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.webmercatorutils-amd.html#xytolnglat"&gt;esri/geometry/webMercatorUtils | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function signature is: webMercatorUtils.xyToLngLat(x: number, y: number) -&amp;gt; [longitude: number, latitude: number]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it takes an x and y (in meters) and returns an array with 2 elements, the first being the longitude and the second being the latitude.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:41:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436479#M40190</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-03-10T15:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: What are the coordinates used in the Path parameter of the Polyline class?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436480#M40191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You da real MVP Thomas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your help. Do you have a donate button somewhere so I can buy you a beer/coffee?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:56:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436480#M40191</guid>
      <dc:creator>robertparham</dc:creator>
      <dc:date>2017-03-10T15:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: What are the coordinates used in the Path parameter of the Polyline class?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436481#M40192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome, glad I could be of help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 22:26:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-are-the-coordinates-used-in-the-path/m-p/436481#M40192</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-03-10T22:26:06Z</dc:date>
    </item>
  </channel>
</rss>

