<?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: Drag and drop a polygon graphic in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212660#M19695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve, what do you want to achieve that's different from using the edit toolbar functionality in the samples?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Feb 2012 20:42:59 GMT</pubDate>
    <dc:creator>EdSaunders</dc:creator>
    <dc:date>2012-02-02T20:42:59Z</dc:date>
    <item>
      <title>Drag and drop a polygon graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212659#M19694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Derek Swingley provided some &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/28553-Drag-Graphics-Point-and-Drop-at-New-Location" rel="nofollow" target="_blank"&gt;sample code&lt;/A&gt;&lt;SPAN&gt; for dragging and dropping a graphic point. What is the best procedure for dragging and dropping a graphic &lt;/SPAN&gt;&lt;STRONG&gt;polygon&lt;/STRONG&gt;&lt;SPAN&gt;? (I'm happy to limit this to a rectangular shape if that's easier than working with a complex polygon.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Given that the transformation is shown in page units, do I need to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;get the xmin,xmax,ymin,ymax of the original graphic in map units&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;generate the 4 corners as individual Point objects in map units&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;convert these points to page units&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;apply the transformation to each point in page units&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;convert the points back to map units&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;generate a new geometry from the new points&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;apply this geometry to the polygon&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;This seems a bit convoluted. Is there a faster way to obtain the coordinates of the graphic after it's been dropped?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 02:29:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212659#M19694</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2012-02-02T02:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Drag and drop a polygon graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212660#M19695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve, what do you want to achieve that's different from using the edit toolbar functionality in the samples?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 20:42:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212660#M19695</guid>
      <dc:creator>EdSaunders</dc:creator>
      <dc:date>2012-02-02T20:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Drag and drop a polygon graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212661#M19696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ed,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good suggestion - but I'm looking for something a lot simpler, like the polygon in the Overview map, where you can just pick it up and move it. I don't want to create a feature layer, start an edit session, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got a workaround using the method above - I'm just wondering whether there's a more efficient way to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 20:58:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212661#M19696</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2012-02-02T20:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Drag and drop a polygon graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212662#M19697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve, in the graphics samples there's a context menu example which includes the move option.&amp;nbsp; You could just initialize the move functionality using dojo.connect when the graphic is added to the map.&amp;nbsp; You don't need an edit toolbar or an editing session, you're just using the edit toolbar functionality.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 21:54:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212662#M19697</guid>
      <dc:creator>EdSaunders</dc:creator>
      <dc:date>2012-02-02T21:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Drag and drop a polygon graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212663#M19698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sounds like just the shortcut I was looking for - thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For reference the Context Menu sample is &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/graphics/graphics_contextmenu.html"&gt;here&lt;/A&gt;&lt;SPAN&gt; if anyone else needs it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 21:58:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-a-polygon-graphic/m-p/212663#M19698</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2012-02-02T21:58:07Z</dc:date>
    </item>
  </channel>
</rss>

