<?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 Simple? Add polygon of Lat/Long points to map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259107#M23975</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am new to the Javascript API, but have found it quite difficult to try to do a simple thing I am wanting to test. I have a set of points that make up a polygon. These points are in Lat/Lon (ex. x=-107.36,y=25.29). I just want to add a polygon and show it on a map, with the ESRI World Imagery base layer behind it. I can get the basemap to show, but I can't seem to find the right code to create a polygon with my lat/long points and add it to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Feb 2011 14:44:29 GMT</pubDate>
    <dc:creator>BrentStevener</dc:creator>
    <dc:date>2011-02-11T14:44:29Z</dc:date>
    <item>
      <title>Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259107#M23975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am new to the Javascript API, but have found it quite difficult to try to do a simple thing I am wanting to test. I have a set of points that make up a polygon. These points are in Lat/Lon (ex. x=-107.36,y=25.29). I just want to add a polygon and show it on a map, with the ESRI World Imagery base layer behind it. I can get the basemap to show, but I can't seem to find the right code to create a polygon with my lat/long points and add it to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 14:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259107#M23975</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2011-02-11T14:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259108#M23976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am new to the Javascript API, but have found it quite difficult to try to do a simple thing I am wanting to test. I have a set of points that make up a polygon. These points are in Lat/Lon (ex. x=-107.36,y=25.29). I just want to add a polygon and show it on a map, with the ESRI World Imagery base layer behind it. I can get the basemap to show, but I can't seem to find the right code to create a polygon with my lat/long points and add it to the map.&lt;BR /&gt;&lt;BR /&gt;Any help?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to create a Polygon geometry : &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/polygon.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/polygon.htm&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And use that with a Graphic : &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/graphic.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/graphic.htm&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then add that graphic to a graphic layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are ESRI's polygon samples: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm?Polygon"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm?Polygon&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 15:43:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259108#M23976</guid>
      <dc:creator>MartenLiebster</dc:creator>
      <dc:date>2011-02-11T15:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259109#M23977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've looked at the samples already, but I can't get a working sample with what I am trying to do. What is wrong with the below code? The polygon doesn't display, but the map does. I think its where I am trying to add the graphic, and I assume I have to convert the polygon geometry like I did for the map extent. What is the syntax to do that for a polygon?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;script type="text/javascript"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.map");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.graphic");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.geometry");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.arcgis.utils");

&amp;nbsp;&amp;nbsp;&amp;nbsp; var map;
&amp;nbsp;&amp;nbsp;&amp;nbsp; function init() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myExtent = new esri.geometry.Extent(-107,25,-92,36, new esri.SpatialReference({wkid:4326}));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("mapDiv", {extent:esri.geometry.geographicToWebMercator(myExtent) });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var basemapURL= "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(basemap);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myPolygon = new esri.geometry.Polygon(new esri.SpatialReference({wkid:4326}));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myPolygon.addRing([[-99.24,28.39],[-99.24,29.37],[-99.482,29.37],[-99.24,28.39]]);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sfs = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp; new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT,
&amp;nbsp;&amp;nbsp; new dojo.Color([255,0,0]), 2),new dojo.Color([255,255,0,0.25]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(myPolygon, sfs);&amp;nbsp; //******How to convert coordinates?********//
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.addOnLoad(init);
&amp;nbsp; &amp;lt;/script&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259109#M23977</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2021-12-11T12:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259110#M23978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out what I posted a couple of months ago over on gis.se:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://gis.stackexchange.com/questions/2749/esri-json-polygon-ring-orientation/2750#2750" rel="nofollow noopener noreferrer" target="_blank"&gt;http://gis.stackexchange.com/questions/2749/esri-json-polygon-ring-orientation/2750#2750&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, esri.geometry.geographicToWebMercator() works for polygons so do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var poly_wm = esri.geometry.geographicToWebMercator(myPolygon);
map.graphics.add(new esri.Graphic(poly_wm, sfs));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:45:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259110#M23978</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-11T12:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259111#M23979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Check out what I posted a couple of months ago over on gis.se:&amp;nbsp; &lt;A href="http://gis.stackexchange.com/questions/2749/esri-json-polygon-ring-orientation/2750#2750" rel="nofollow noopener noreferrer" target="_blank"&gt;http://gis.stackexchange.com/questions/2749/esri-json-polygon-ring-orientation/2750#2750&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is not Lat/Long coordinates. Other than that, I don't see you doing anything that different than what is already in my above code. Adding the polygon as a new graphic had the same result. All I want is someone to actually &lt;/SPAN&gt;&lt;STRONG style="text-decoration: underline;"&gt;test my code&lt;/STRONG&gt;&lt;SPAN&gt; to see what I am missing Below is the full page code that you can copy and paste into a new html doc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;nbsp; &amp;lt;title&amp;gt;Create a Map&amp;lt;/title&amp;gt;
&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&amp;gt;
&amp;nbsp; &amp;lt;link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css"&amp;gt;
&amp;nbsp; &amp;lt;script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"&amp;gt;&amp;lt;/script&amp;gt;
&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.map");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.graphic");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.geometry");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.arcgis.utils");

&amp;nbsp;&amp;nbsp;&amp;nbsp; var map;
&amp;nbsp;&amp;nbsp;&amp;nbsp; function init() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myExtent = new esri.geometry.Extent(-107,25,-92,36, new esri.SpatialReference({wkid:4326}));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("mapDiv", {extent:esri.geometry.geographicToWebMercator(myExtent) });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var basemapURL= "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(basemap);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myPolygon = new esri.geometry.Polygon(new esri.SpatialReference({wkid:4326}));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myPolygon.addRing([[-99.24,28.39],[-99.24,29.37],[-99.482,29.37],[-99.24,28.39]]);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleFillSymbol().setStyle(esri.symbol.SimpleFillSymbol.STYLE_SOLID);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonGraphic = new esri.Graphic(myPolygon, symbol); ///*** how to convert the polygon geometry????? *******////
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(polygonGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.addOnLoad(init);
&amp;nbsp; &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body class="claro"&amp;gt;
&amp;nbsp; &amp;lt;div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:45:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259111#M23979</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2021-12-11T12:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259112#M23980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Edited my previous post...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 17:08:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259112#M23980</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-02-11T17:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259113#M23981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have already tried that in my hunt to get a working sample, to no avail. I posted the full page code for anyone to test it and give me a fixed working sample.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 17:11:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259113#M23981</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2011-02-11T17:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259114#M23982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I run your code in chrome I get this error:&amp;nbsp; Uncaught TypeError: Cannot call method 'add' of null&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What does that tell you? Since the only add method you're calling is map.graphics.add(), it's clear that function call is failing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to wait for the map to load before you can add graphics. Did you notice that the link I posted previously puts the code that actually adds graphics inside a function that runs after the map loads?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, here's a working version of your code, which uses esri.geometry.geographicToWebMercator() to get a geometry that is suitable to add to the map:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;nbsp; &amp;lt;title&amp;gt;Create a Map&amp;lt;/title&amp;gt;
&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&amp;gt;
&amp;nbsp; &amp;lt;link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css"&amp;gt;
&amp;nbsp; &amp;lt;script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"&amp;gt;&amp;lt;/script&amp;gt;
&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.map");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.graphic");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.geometry");
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.require("esri.arcgis.utils");

&amp;nbsp;&amp;nbsp;&amp;nbsp; var map;
&amp;nbsp;&amp;nbsp;&amp;nbsp; function init() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myExtent = new esri.geometry.Extent(-107,25,-92,36, new esri.SpatialReference({wkid:4326}));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("mapDiv", {extent:esri.geometry.geographicToWebMercator(myExtent) });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var basemapURL= "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(basemap);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map, 'onLoad', function() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myPolygon = new esri.geometry.Polygon(new esri.SpatialReference({wkid:4326}));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myPolygon.addRing([[-99.24,28.39],[-99.24,29.37],[-99.482,29.37],[-99.24,28.39]]);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // map is in web mercator so transform the geometry
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var poly_wm = esri.geometry.geographicToWebMercator(myPolygon);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleFillSymbol().setStyle(esri.symbol.SimpleFillSymbol.STYLE_SOLID);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonGraphic = new esri.Graphic(poly_wm, symbol); ///*** how to convert the polygon geometry????? *******////
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(polygonGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.addOnLoad(init);
&amp;nbsp; &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body class="claro"&amp;gt;
&amp;nbsp; &amp;lt;div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259114#M23982</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-11T12:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259115#M23983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. That's all I was wanting. I saw no errors in my browser, so that obvious error was not seen by myself. I wasn't trying to be an a** about it. All I wanted was someone to test my code to see what is wrong, and look what happened. As soon as someone finally did, I finally got the help I was looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 17:24:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259115#M23983</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2011-02-11T17:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259116#M23984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What browser are you using? Chrome with the JS console open or Firefox with Firebug on are the only two viable options for debugging, IMO.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 17:31:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259116#M23984</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-02-11T17:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Simple? Add polygon of Lat/Long points to map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259117#M23985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Firefox, but I probably didn't have it set up right for Javascript debugging (.NET/Silverlight/Windows shop here). I just tried to duplicate a test we had using the Silverlight API, but using the Javascript API instead. Looking to fix that debugging problem as we speak.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 17:37:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/simple-add-polygon-of-lat-long-points-to-map/m-p/259117#M23985</guid>
      <dc:creator>BrentStevener</dc:creator>
      <dc:date>2011-02-11T17:37:08Z</dc:date>
    </item>
  </channel>
</rss>

