<?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: Unable to edit a &amp;quot;Extent&amp;quot; Draw Tool in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3297#M270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert - That makes sense. Yet, I'm still having problems with the scale,move operations . Please advise. (Error Message:[esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;activeEditToolbars(evt) {&lt;/P&gt;&lt;P&gt;if (this.editingEnabled) {&lt;BR /&gt; this.editingEnabled = false;&lt;BR /&gt; this.edittoolbar.deactivate();&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; this.editingEnabled = true;&lt;BR /&gt; if(evt.graphic.geometry.type === "extent") {&lt;BR /&gt; this.edittoolbar.activate(Edit.MOVE|Edit.SCALE, evt.graphic);&lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; this.edittoolbar.activate(Edit.EDIT_VERTICES|Edit.MOVE, evt.graphic);&lt;BR /&gt; } &lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2016 15:06:57 GMT</pubDate>
    <dc:creator>PriyaRam</dc:creator>
    <dc:date>2016-10-11T15:06:57Z</dc:date>
    <item>
      <title>Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3295#M268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to edit an extent graphic using the EditTool and I'm getting the following error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;activeEditToolbars(evt) {&lt;/P&gt;&lt;P&gt;if (this.editingEnabled) {&lt;BR /&gt; this.editingEnabled = false;&lt;BR /&gt; this.edittoolbar.deactivate();&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; this.editingEnabled = true;&lt;BR /&gt; this.edittoolbar.activate(Edit.EDIT_VERTICES|Edit.MOVE, evt.graphic);&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uncaught Error: [esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2016 22:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3295#M268</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2016-10-10T22:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3296#M269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Editing a extents vertices is not allowed because that would change the geometry type to a polygon. You can only scale, move and rotate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 01:34:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3296#M269</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-10-11T01:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3297#M270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert - That makes sense. Yet, I'm still having problems with the scale,move operations . Please advise. (Error Message:[esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;activeEditToolbars(evt) {&lt;/P&gt;&lt;P&gt;if (this.editingEnabled) {&lt;BR /&gt; this.editingEnabled = false;&lt;BR /&gt; this.edittoolbar.deactivate();&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; this.editingEnabled = true;&lt;BR /&gt; if(evt.graphic.geometry.type === "extent") {&lt;BR /&gt; this.edittoolbar.activate(Edit.MOVE|Edit.SCALE, evt.graphic);&lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; this.edittoolbar.activate(Edit.EDIT_VERTICES|Edit.MOVE, evt.graphic);&lt;BR /&gt; } &lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 15:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3297#M270</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2016-10-11T15:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3298#M271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What happens if you only include Edit.MOVE?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 15:15:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3298#M271</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-10-11T15:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3299#M272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert - It's the same issue, as stated above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 17:29:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3299#M272</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2016-10-11T17:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3300#M273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have to apologize as it seems that the Extent Geometry type is not a supported type for any operation in the edit toolbar. If you want to do anything with an extent you must first convert it to a polygon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 18:35:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3300#M273</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-10-11T18:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3301#M274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert - That's good to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see,if this function looks okay for constructing a polygon.I'm getting an error,&amp;nbsp;Cannot read property 'spatialReference' of undefined.should I update the geometry ? Any samples is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if(evt.graphic.geometry.type === "extent") {&lt;BR /&gt; //console.log("evt.graphic",evt.graphic);&lt;BR /&gt; let tempPoly = this.convertExtentToPolygon(evt.graphic,new SpatialReference({wkid:102100}));&lt;BR /&gt; console.log(tempPoly.geometry);&lt;BR /&gt; this.edittoolbar.activate(Edit.MOVE, tempPoly);&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG&gt;convertExtentToPolygon (extent, spatialRef) {&lt;/STRONG&gt;&lt;BR /&gt; const xmin = extent.xmin;&lt;BR /&gt; const xmax = extent.xmax;&lt;BR /&gt; const ymin = extent.ymin;&lt;BR /&gt; const ymax = extent.ymax;&lt;/P&gt;&lt;P&gt;const topLeft = new MapPoint(xmin, ymax, spatialRef);&lt;BR /&gt; const topRight = new MapPoint(xmax, ymax, spatialRef);&lt;BR /&gt; const bottomRight = new MapPoint(xmax, ymin, spatialRef);&lt;BR /&gt; const bottomLeft = new MapPoint(xmin, ymin, spatialRef);&lt;/P&gt;&lt;P&gt;var rings = new Array(topLeft, topRight, bottomRight, bottomLeft, topLeft);&lt;/P&gt;&lt;P&gt;var newPolygon = new Polygon(spatialRef);&lt;BR /&gt; newPolygon.addRing(rings);&lt;BR /&gt; return newPolygon;&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 22:48:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3301#M274</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2016-10-17T22:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to edit a "Extent" Draw Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3302#M275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You should just use the Polygons fromExtent method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#fromextent" title="https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#fromextent"&gt;Polygon | API Reference | ArcGIS API for JavaScript 3.18 | fromExtent&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 22:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-edit-a-quot-extent-quot-draw-tool/m-p/3302#M275</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-10-17T22:56:05Z</dc:date>
    </item>
  </channel>
</rss>

