Is there a way of moving two or more polygons simultaneously as I cannot seem to find a method that allows the movement of multiple selected graphics at the same time. The movement has to be a click and drag process where the features are seen to be dragged at the same time.
With the following code I manage to activate multiple toolbars for multiple graphics at the same time, however they still move separately rather than being moves as a whole when one of them is clicked and dragged.
<SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: inherit;">//Loop to get all the layers on the map</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"></SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: inherit;">for</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">(</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: inherit;">var</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> gCount </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: inherit;">0</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">;</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> gCount </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"><</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> app</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">map</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">graphicsLayerIds</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">length</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">;</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> gCount</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">++)</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">{</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: inherit;">//This will obtain the layer that the selected graphic is on </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: inherit;">var</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> tempMoveLayer </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> app</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">map</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">getLayer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">(</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">app</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">map</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">graphicsLayerIds</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">[</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">gCount</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">]);</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: inherit;">//Looping through all the graphics in the selected layer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: inherit;">for</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">(</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: inherit;">var</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> graphicNum </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: inherit;">0</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">;</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> graphicNum </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"><</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> tempMoveLayer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">graphics</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">length</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">;</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> graphicNum</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">++)</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">{</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: inherit;">//Comparing the selected graphic to the layer graphic currently in the loop</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: inherit;">if</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">(</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">tempMoveLayer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">graphics</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">[</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">graphicNum</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">].</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">attributes</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">OBJECTID </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">==</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> results</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">features</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">[</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">j</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">].</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">attributes</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">OBJECTID</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">)</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">{</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: inherit;">//Activating the toolbar for the graphic. This is activated for every graphic in the loop</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> moveToolbar</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">activate</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">(</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">esri</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">toolbars</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: inherit;">Edit</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">MOVE </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">|</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> esri</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">toolbars</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: inherit;">Edit</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">SCALE </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">|</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> esri</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">toolbars</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: inherit;">Edit</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">ROTATE</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> tempMoveLayer</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">graphics</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">[</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">graphicNum</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">]);</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">}</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">}</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: inherit;">}</SPAN>