AnsweredAssumed Answered

Move Toolbar for multiple polygons at the same time

Question asked by nalydleetlub1 on Aug 3, 2017
Latest reply on Aug 4, 2017 by nalydleetlub1

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.

//Loop to get all the layers on the mapfor (var gCount = 0; gCount <; gCount++) {    //This will obtain the layer that the selected graphic is on     var tempMoveLayer =[gCount]);     //Looping through all the graphics in the selected layer    for (var graphicNum = 0; graphicNum <; graphicNum++) {         //Comparing the selected graphic to the layer graphic currently in the loop        if ([graphicNum].attributes.OBJECTID == results.features[j].attributes.OBJECTID) {         //Activating the toolbar for the graphic. This is activated for every graphic in the loop        moveToolbar.activate(esri.toolbars.Edit.MOVE | esri.toolbars.Edit.SCALE | esri.toolbars.Edit.ROTATE,[graphicNum]);                                                             }                                                        }                                                    }