<?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 change basemap coordinates from Sketch feature to XY Coordinates in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1163772#M76997</link>
    <description>&lt;P&gt;nice&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 08:10:36 GMT</pubDate>
    <dc:creator>Lazy</dc:creator>
    <dc:date>2022-04-13T08:10:36Z</dc:date>
    <item>
      <title>How to change basemap coordinates from Sketch feature to XY Coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1134221#M75935</link>
      <description>&lt;P&gt;Hi everyone, I have a problem changing the coordinate type from the sketch feature to the XY coordinate type.&lt;/P&gt;&lt;P&gt;whenever i see result from draw coordinate type it stays basemap type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RahmanNurhidayat_0-1642297633661.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31610iCC8A306802D2E21C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RahmanNurhidayat_0-1642297633661.png" alt="RahmanNurhidayat_0-1642297633661.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RahmanNurhidayat_1-1642297769870.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31611i52AF9D6279BA3E49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RahmanNurhidayat_1-1642297769870.png" alt="RahmanNurhidayat_1-1642297769870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;please help me solve it.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 01:50:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1134221#M75935</guid>
      <dc:creator>RahmanNurhidayat</dc:creator>
      <dc:date>2022-01-16T01:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to change basemap coordinates from Sketch feature to XY Coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1134659#M75960</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes sketch creates geometries with a spatial reference that matches the spatial reference of the view. If your basemap's spatial reference is Web Mercator (102100) then you can use&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#webMercatorToGeographic" target="_self"&gt;webMercatorUtils.webMercatorToGeographic()&lt;/A&gt; method to project the geometry to geographic spatial reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can do something like the following.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sketch.on("create", (event) =&amp;gt; {
  if (event.state === "complete") {
    console.log("sketch geometry", event.graphic.geometry);
    const geographicGeom = webMercatorUtils.webMercatorToGeographic(event.graphic.geometry);
            
     console.log("geographic geometry", geographicGeom)
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your basemap's spatialReference is not WebMercator then you can use &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project" target="_self"&gt;projection.project()&lt;/A&gt; method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 17:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1134659#M75960</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-01-18T17:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to change basemap coordinates from Sketch feature to XY Coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1134913#M75980</link>
      <description>&lt;P&gt;Thanks. Its Worked&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 09:54:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1134913#M75980</guid>
      <dc:creator>RahmanNurhidayat</dc:creator>
      <dc:date>2022-01-19T09:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change basemap coordinates from Sketch feature to XY Coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1163772#M76997</link>
      <description>&lt;P&gt;nice&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 08:10:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-basemap-coordinates-from-sketch/m-p/1163772#M76997</guid>
      <dc:creator>Lazy</dc:creator>
      <dc:date>2022-04-13T08:10:36Z</dc:date>
    </item>
  </channel>
</rss>

