3

In ArcGIS JavaScript API, I want to click a GraphicsLayer object (Graphic) on the map and perform a dragging MOVE operation for it as well as some of its neighboring graphics. I am looking for the visual effect of several graphic objects moving together. The EDIT toolbar MOVE operation accepts a single graphic, not multiple, as far as I see.

editToolbar.activate(Edit.MOVE, evt.graphic);

Can I aggregate into a single Graphic for use with EDIT toolbar?

Activate a toolbar for each Graphic?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jan 6, 2016 at 0:46
4
  • As far as I can tell the method only takes singular graphics. Using multipl tool bars is an option but seems a little unwieldly and memory intensive. Perhaps you can construct something custom using developers.arcgis.com/javascript/jsapi/cut-amd.html Commented Jan 6, 2016 at 15:39
  • @James - thanks, I was not aware of Cut and I will have to add it to my repertoire ... Here, my key UX goal is to provide a visual 'drag' of a few related graphics, having click-selected one of them. I could not see how Cut plays into this. Commented Jan 7, 2016 at 9:45
  • Did you ever find a solution for this @BillB ? Commented Aug 4, 2017 at 8:31
  • What are you think about this answer?<br/> gis.stackexchange.com/questions/250847/… Commented Sep 21, 2017 at 10:46

1 Answer 1

1

The way I would go about this is to, when you go into EDIT mode, convert your multiple point (I'm assuming) graphics that you want to drag at the same time into a single Graphic, using the Multipoint geometry, then enable the Draw toolbar on that single Graphic. When you're done moving (the user indicates they want to leave Edit mode), you can take the geometries in your Multipoint and convert them back out to individual point Graphics.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
answered Jan 6, 2016 at 14:37
1
  • Gavin, my graphics are polygons and points - so cannot use Multipoint. I guess the is no way aggregate these into a single graphic for Edit toolbar. :( Commented Jan 12, 2016 at 5:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.