<?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: lat,lng to webmercator in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446933#M41278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ok. i got this one figured out... i need to use the project method from the geometry service....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for taking a look.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Dec 2010 23:19:24 GMT</pubDate>
    <dc:creator>timgogl</dc:creator>
    <dc:date>2010-12-22T23:19:24Z</dc:date>
    <item>
      <title>lat,lng to webmercator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446932#M41277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ok, well i have been searching for info on this for a chunk of the day today, and finally found &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/8720-Lat-Lon-points-in-js-api-v2.0" rel="nofollow noopener noreferrer" target="_blank"&gt;this &lt;/A&gt;&lt;SPAN&gt;thread that looked like it was what i needed....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so i new have this function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; function findLocation(){
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; console.log('find location');
&amp;nbsp;&amp;nbsp; var lat = latToFind;&amp;nbsp; //44.071
&amp;nbsp;&amp;nbsp; var lng = lngToFind; //-122.199
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; console.log('make new point');
&amp;nbsp;&amp;nbsp; var pt = new esri.geometry.Point(lng,lat,new esri.SpatialReference({'wkid':2994}));
&amp;nbsp;&amp;nbsp; console.log(pt);
&amp;nbsp;&amp;nbsp; console.log('make new webmercator point');
&amp;nbsp;&amp;nbsp; var xyPt = new esri.geometry.geographicToWebMercator(pt);
&amp;nbsp;&amp;nbsp; console.log(xyPt);
&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 14,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new dojo.Color(MARK_OUTLINE_COLOR), 2), new dojo.Color(MARK_FILL_COLOR));
&amp;nbsp;&amp;nbsp; var graphic = new esri.Graphic(xyPt,symbol);
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; console.log('add graphic');
&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; }

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so, this code all seams to run ok... the console logs all my messages with no errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;however....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my graphic is not being added to the map (or at least not on the visible map).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when i examine the xyPt information inside the console, i noticed that the wkid is 102100.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so, my question is, what am i doing wrong, how can i get this functionality but have the wkid remain 2994?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for any help you can offer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:58:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446932#M41277</guid>
      <dc:creator>timgogl</dc:creator>
      <dc:date>2021-12-11T19:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: lat,lng to webmercator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446933#M41278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ok. i got this one figured out... i need to use the project method from the geometry service....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for taking a look.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 23:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446933#M41278</guid>
      <dc:creator>timgogl</dc:creator>
      <dc:date>2010-12-22T23:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: lat,lng to webmercator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446934#M41279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;there are also these methods:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;esri.geometry.webMercatorToGeographic(geometry)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esri.geometry.geographicToWebMercator(geometry)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jan 2011 19:55:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446934#M41279</guid>
      <dc:creator>PaulForbess</dc:creator>
      <dc:date>2011-01-03T19:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: lat,lng to webmercator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446935#M41280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mind sharing your code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ok, well i have been searching for info on this for a chunk of the day today, and finally found &lt;A href="http://forums.arcgis.com/threads/8720-Lat-Lon-points-in-js-api-v2.0" rel="nofollow noopener noreferrer" target="_blank"&gt;this &lt;/A&gt;thread that looked like it was what i needed....&lt;BR /&gt;&lt;BR /&gt;so i new have this function:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; function findLocation(){
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; console.log('find location');
&amp;nbsp;&amp;nbsp; var lat = latToFind;&amp;nbsp; //44.071
&amp;nbsp;&amp;nbsp; var lng = lngToFind; //-122.199
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; console.log('make new point');
&amp;nbsp;&amp;nbsp; var pt = new esri.geometry.Point(lng,lat,new esri.SpatialReference({'wkid':2994}));
&amp;nbsp;&amp;nbsp; console.log(pt);
&amp;nbsp;&amp;nbsp; console.log('make new webmercator point');
&amp;nbsp;&amp;nbsp; var xyPt = new esri.geometry.geographicToWebMercator(pt);
&amp;nbsp;&amp;nbsp; console.log(xyPt);
&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 14,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new dojo.Color(MARK_OUTLINE_COLOR), 2), new dojo.Color(MARK_FILL_COLOR));
&amp;nbsp;&amp;nbsp; var graphic = new esri.Graphic(xyPt,symbol);
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; console.log('add graphic');
&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; }

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;so, this code all seams to run ok... the console logs all my messages with no errors.&lt;BR /&gt;however....&lt;BR /&gt;&lt;BR /&gt;my graphic is not being added to the map (or at least not on the visible map).&lt;BR /&gt;&lt;BR /&gt;when i examine the xyPt information inside the console, i noticed that the wkid is 102100.&lt;BR /&gt;&lt;BR /&gt;so, my question is, what am i doing wrong, how can i get this functionality but have the wkid remain 2994?&lt;BR /&gt;&lt;BR /&gt;thanks for any help you can offer.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lat-lng-to-webmercator/m-p/446935#M41280</guid>
      <dc:creator>BrandonCales</dc:creator>
      <dc:date>2021-12-11T19:58:06Z</dc:date>
    </item>
  </channel>
</rss>

