<?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: Invalid Coordinates captured from Sketch widget event in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627250#M58533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! That makes sense and I'm sure I'll have no problems with it now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2019 20:01:01 GMT</pubDate>
    <dc:creator>DeanMcDonald</dc:creator>
    <dc:date>2019-04-15T20:01:01Z</dc:date>
    <item>
      <title>Invalid Coordinates captured from Sketch widget event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627248#M58531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to capture the lat/long points of the geometry object&amp;nbsp;belonging to a graphic drawn using the Sketch widget. This is saved along with the various other attributes needed so I can recreate&amp;nbsp;a graphic later that was drawn by one of my users.&lt;/P&gt;&lt;P&gt;However I seem to be getting invalid coordinate values from all the graphics objects created using Sketch.&lt;/P&gt;&lt;P&gt;Below is an example of the 'paths' attribute of a polyline geometry object belonging to a graphic created by Sketch when&amp;nbsp;I log it in console:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;path: [[3705938.9073652048,&amp;nbsp;7757323.750164009], [6425874.121864194,&amp;nbsp;5957078.859992016]]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those values don't look right to me since afaik coordinate values can only be a maximum of +/-180 for lat and +/-90 for long. Sure enough when&amp;nbsp;I save those in the database and try to recreate the Graphics later using those values they don't appear, but entering something more sane as coordinates&amp;nbsp;does work such as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;path: [60.44300476667183, 62.70164927848015], [48.604437825842, 72.97478588000511]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried simply moving the decimal point down 5 or so spaces but then&amp;nbsp;I get completely inaccurate&amp;nbsp;placement and it doesn't seem like the right thing to do anyway. The coordinate seem like something more than just incorrect decimal placement has happened&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a snippet of the code I have where the graphic is captured from the event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sketch.on("create", event =&amp;gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (event.state === "complete") {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;let graphic = event.graphic&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(graphic) //&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2019 19:29:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627248#M58531</guid>
      <dc:creator>DeanMcDonald</dc:creator>
      <dc:date>2019-04-15T19:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Coordinates captured from Sketch widget event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627249#M58532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Those coordinates are in WKID 102100, webmercator, not geographic. The sketch will use the WKID of the basemap that is used and if you are using a standard esri basemap then it will always be webmercator. You can easily convert those to geographic using the WebmercatorUtils class though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2019 19:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627249#M58532</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-04-15T19:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Coordinates captured from Sketch widget event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627250#M58533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! That makes sense and I'm sure I'll have no problems with it now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:01:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627250#M58533</guid>
      <dc:creator>DeanMcDonald</dc:creator>
      <dc:date>2019-04-15T20:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Coordinates captured from Sketch widget event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627251#M58534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2019 20:12:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/invalid-coordinates-captured-from-sketch-widget/m-p/627251#M58534</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-04-15T20:12:04Z</dc:date>
    </item>
  </channel>
</rss>

