<?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 trying to display my point in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-to-display-my-point/m-p/525085#M48963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to display my point using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
var extent = new esri.geometry.Extent(
 { "xmin":-97.0,"ymin":38.0,"xmax":-96.0,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymax":39.0,"spatialReference":{"wkid":4269}});
map = new esri.Map("map", { extent: esri.geometry.geographicToWebMercator(extent)});

//... then in the call back function for map's onLoad event:
 
var symbol = new esri.symbol.SimpleMarkerSymbol();
symbol.style = esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE;
symbol.setSize(8);
symbol.setColor(new dojo.Color([255,255,0,0.5]));
&amp;nbsp; 
var point = new esri.geometry.Point(x, y);
var graphic = new esri.Graphic(point, symbol);
map.graphics.add(graphic);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is this code always displays point somewhere in in the Africa and it doesn't depend on the x, y values passed to the Point constructor. For instance, I tried 0.0,0.0 and -80.12468662, 40.42756484.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where is the mistake? Perhaps, I need to convert point to be point in the display coordinates? How can I do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2011 11:23:58 GMT</pubDate>
    <dc:creator>KirillLykov</dc:creator>
    <dc:date>2011-04-21T11:23:58Z</dc:date>
    <item>
      <title>trying to display my point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-to-display-my-point/m-p/525085#M48963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to display my point using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
var extent = new esri.geometry.Extent(
 { "xmin":-97.0,"ymin":38.0,"xmax":-96.0,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymax":39.0,"spatialReference":{"wkid":4269}});
map = new esri.Map("map", { extent: esri.geometry.geographicToWebMercator(extent)});

//... then in the call back function for map's onLoad event:
 
var symbol = new esri.symbol.SimpleMarkerSymbol();
symbol.style = esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE;
symbol.setSize(8);
symbol.setColor(new dojo.Color([255,255,0,0.5]));
&amp;nbsp; 
var point = new esri.geometry.Point(x, y);
var graphic = new esri.Graphic(point, symbol);
map.graphics.add(graphic);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is this code always displays point somewhere in in the Africa and it doesn't depend on the x, y values passed to the Point constructor. For instance, I tried 0.0,0.0 and -80.12468662, 40.42756484.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where is the mistake? Perhaps, I need to convert point to be point in the display coordinates? How can I do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 11:23:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-to-display-my-point/m-p/525085#M48963</guid>
      <dc:creator>KirillLykov</dc:creator>
      <dc:date>2011-04-21T11:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: trying to display my point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-to-display-my-point/m-p/525086#M48964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try putting this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;point = esri.geometry.geographicToWebMercator(point);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;right after you create your point.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 14:30:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-to-display-my-point/m-p/525086#M48964</guid>
      <dc:creator>MarkHoover</dc:creator>
      <dc:date>2011-04-21T14:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: trying to display my point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-to-display-my-point/m-p/525087#M48965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It helped. thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 05:41:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-to-display-my-point/m-p/525087#M48965</guid>
      <dc:creator>KirillLykov</dc:creator>
      <dc:date>2011-04-22T05:41:35Z</dc:date>
    </item>
  </channel>
</rss>

