<?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: Convert coordinates in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514331#M48000</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a sample showing how to use the geometry service to project a point: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For your case, you'll want to specify a different out spatial reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function projectPoint() {
&amp;nbsp; var outSR = new esri.SpatialReference(&lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;{ wkid: 3006}&lt;/SPAN&gt;);
&amp;nbsp; gsvc.project([ pt ], outSR, function(projectedPoints) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = projectedPoints[0];
&amp;nbsp;&amp;nbsp;&amp;nbsp; // do something with coordinates
&amp;nbsp; });
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:28:47 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2021-12-11T22:28:47Z</dc:date>
    <item>
      <title>Convert coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514328#M47997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm kinda new to this and i'm trying to get the "Current Location with temporal renderer" sample for mobiles to work with a custom map. The map i'm using has a different spatial reference. So when the position is displayed, it is way off.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as i can tell, the coordinates in the sample are converted from WGS84 (format in the Geolocation API) to Web Mercator. Is there any way to convert them to the spatial reference my map is using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the sample i used (i just changed the map URL in the code):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/mobile_geolocaterenderer.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/mobile_geolocaterenderer.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 19:05:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514328#M47997</guid>
      <dc:creator>RossPearson</dc:creator>
      <dc:date>2011-12-14T19:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514329#M47998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What's your map's spatial reference? Your best bet is probably to use a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/geometryservice.htm#project"&gt;geometry service's project method&lt;/A&gt;&lt;SPAN&gt; to convert from lat/long to your spatial reference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 19:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514329#M47998</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-12-14T19:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514330#M47999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a sample of it being used anywhere?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The spatial reference is WKID: 3006.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Appreciate the help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 22:35:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514330#M47999</guid>
      <dc:creator>RossPearson</dc:creator>
      <dc:date>2011-12-14T22:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514331#M48000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a sample showing how to use the geometry service to project a point: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_project.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For your case, you'll want to specify a different out spatial reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function projectPoint() {
&amp;nbsp; var outSR = new esri.SpatialReference(&lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;{ wkid: 3006}&lt;/SPAN&gt;);
&amp;nbsp; gsvc.project([ pt ], outSR, function(projectedPoints) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = projectedPoints[0];
&amp;nbsp;&amp;nbsp;&amp;nbsp; // do something with coordinates
&amp;nbsp; });
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:28:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514331#M48000</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-11T22:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514332#M48001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great, tanks alot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 23:35:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514332#M48001</guid>
      <dc:creator>RossPearson</dc:creator>
      <dc:date>2011-12-14T23:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Convert coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514333#M48002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does this make sense?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function zoomToLocation(location) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = new esri.geometry.Point(location.coords.longitude, location.coords.latitude);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

 var outSR = new esri.SpatialReference({ wkid: 3006});
 gsvc.project([ pt ], outSR, function(projectedPoints) {
 pt = projectedPoints[0];

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(pt, 8);
&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:28:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514333#M48002</guid>
      <dc:creator>RossPearson</dc:creator>
      <dc:date>2021-12-11T22:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Convert coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514334#M48003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, that looks like it should work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 19:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-coordinates/m-p/514334#M48003</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-12-15T19:31:32Z</dc:date>
    </item>
  </channel>
</rss>

