Select to view content in your preferred language

Move a graphic using a delta in screen units

5500
10
Jump to solution
05-04-2015 09:21 AM
YohanBienvenue
Frequent Contributor

Hi,

When using the draw toolbar to add polygons and lines to a GraphicsLayer, I have some code that adds a measurements graphic (using a TextSymbol) on top of it.

My issue is that when using the edit toolbar to move those polygons around, obviously the measurement graphic I added does not follow. I want it to follow.

When using the edit toolbar to move a graphic, the graphic-move event handlers returns the linear transformation (dy/dy) in screen units.

I was thinking of using this delta to move the measurement graphic by the same amount. However the graphics point is in map units, so I can't offset it using this delta.

Is there any way I could convert this screen units delta to map units delta to move this other graphic by the same amount ?

Many thanks.

Yohan

10 Replies
Haider_Ali
Frequent Contributor

see the following fiddle for what i am trying to do currently i am scaling the selected line and its not working

graphicScale - JSFiddle

Any idea what might be wrong here?

0 Kudos