AnsweredAssumed Answered

Drag and drop a polygon graphic

Question asked by stevel on Feb 1, 2012
Latest reply on Feb 2, 2012 by stevel
Derek Swingley provided some sample code for dragging and dropping a graphic point. What is the best procedure for dragging and dropping a graphic polygon? (I'm happy to limit this to a rectangular shape if that's easier than working with a complex polygon.)

Given that the transformation is shown in page units, do I need to:

  • get the xmin,xmax,ymin,ymax of the original graphic in map units

  • generate the 4 corners as individual Point objects in map units

  • convert these points to page units

  • apply the transformation to each point in page units

  • convert the points back to map units

  • generate a new geometry from the new points

  • apply this geometry to the polygon

This seems a bit convoluted. Is there a faster way to obtain the coordinates of the graphic after it's been dropped?

Thanks,
Steve

Outcomes