<?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 Extent to Polygon in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606576#M56717</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good question.&amp;nbsp; Yes, you can because an Extent object has the following properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-xmax (Top-right X-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-xmin (Number&amp;nbsp; Bottom-left X-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-ymax (Number&amp;nbsp; Top-right Y-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-ymin (Bottom-left Y-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Provided that you have these properties, you can use each coordinate value to create a new Polygon.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ex.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var polygon = new esri.geometry.Polygon(new esri.SpatialReference({wkid:4326}));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;polygon.addRing([[-180,-90],[-180,90],[180,90],[180,-90],[-180,-90]]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Remember to add points clockwise and finish by having the last point be the same as the first point in the parameters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Doug Carroll, ESRI Support Services SDK Team &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/"&gt;http://support.esri.com/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Sep 2010 21:57:34 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2010-09-22T21:57:34Z</dc:date>
    <item>
      <title>Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606575#M56716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to convert an Extent object to a Polygon object?&amp;nbsp; I need to create a tool that allows the user to draw an extent rectangle and then store this object in a polygon feature class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 19:23:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606575#M56716</guid>
      <dc:creator>LoriDavis</dc:creator>
      <dc:date>2010-09-22T19:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606576#M56717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good question.&amp;nbsp; Yes, you can because an Extent object has the following properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-xmax (Top-right X-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-xmin (Number&amp;nbsp; Bottom-left X-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-ymax (Number&amp;nbsp; Top-right Y-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-ymin (Bottom-left Y-coordinate of an extent envelope)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Provided that you have these properties, you can use each coordinate value to create a new Polygon.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ex.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var polygon = new esri.geometry.Polygon(new esri.SpatialReference({wkid:4326}));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;polygon.addRing([[-180,-90],[-180,90],[180,90],[180,-90],[-180,-90]]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Remember to add points clockwise and finish by having the last point be the same as the first point in the parameters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Doug Carroll, ESRI Support Services SDK Team &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/"&gt;http://support.esri.com/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 21:57:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606576#M56717</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2010-09-22T21:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606577#M56718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That worked....thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 13:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606577#M56718</guid>
      <dc:creator>LoriDavis</dc:creator>
      <dc:date>2010-09-23T13:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606578#M56719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A toPolygon() method was added on the Extent class at v2.3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/geometry/Extent.html#toPolygon("&gt;http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/geometry/Extent.html#toPolygon(&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 15:59:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606578#M56719</guid>
      <dc:creator>MichaelHaggerty</dc:creator>
      <dc:date>2012-01-04T15:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606579#M56720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I"m getting a weird thing.&amp;nbsp;&amp;nbsp; The toPolgyon method is in the API reference, yes, but it is not available in the dev environment (Flash Builder 4.6).&amp;nbsp;&amp;nbsp;&amp;nbsp; However, intellisense is showing me a toString method from the Extent class and this method is not in the API reference.&amp;nbsp;&amp;nbsp; ?????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the most recent ArcGIS api.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 20:33:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606579#M56720</guid>
      <dc:creator>GregNichols</dc:creator>
      <dc:date>2012-01-10T20:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606580#M56721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Something still isn't right in the API, but I have a workaround to be able to use toPolygon().&amp;nbsp;&amp;nbsp;&amp;nbsp; Declare the extent with a fully qualified class name (com.esri.ags.geometry.Extent).&amp;nbsp;&amp;nbsp;&amp;nbsp; The intellisense still will not provide toPolygon() but use it anyway.&amp;nbsp;&amp;nbsp; The IDE will only give a warning and the code will compile and run fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 21:10:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606580#M56721</guid>
      <dc:creator>GregNichols</dc:creator>
      <dc:date>2012-01-10T21:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606581#M56722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Greg, just a clarification: this is the JavaScript forum and I think you are referring to the Flex API (re: FlashBuilder). If you still have a question you may want to repost over in the Flex API Forum: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/forums/18-ArcGIS-API-for-Flex"&gt;http://forums.arcgis.com/forums/18-ArcGIS-API-for-Flex&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Esri Developer Network&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 22:06:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606581#M56722</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2012-01-12T22:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Extent to Polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606582#M56723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can this be done in ArcGIS Pro as well?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2019 10:10:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-extent-to-polygon/m-p/606582#M56723</guid>
      <dc:creator>AaronFerrari</dc:creator>
      <dc:date>2019-06-24T10:10:41Z</dc:date>
    </item>
  </channel>
</rss>

