Hi,
I wanted to design a button which functions like a ruler, so the user can select it then click on the map and hold down and move the mouse. While the mouse moves, I draw a String label which tells the length of the line segment and the bearing of the line segment on the screen.
In MapSuite 2.0, I used the TrackLineDraw event, which has following signature:
Map1_TrackLineDraw(ByVal LastX As Integer, ByVal LastY As Integer, ByVal CurrentX As Integer, ByVal CurrentY As Integer, ByVal G As System.Drawing.Graphics)
So I could easily work out the length and bearing and draw the String label using the graphics the event provides.
How to implement this in MapSuite 3.0?
I tried to set EditOverlay.TrackMode = TrackMode.Line, I can get the current x,y in the Mouse move event, how to get the Last x and Y? Also tried to use Mouse click event to track the LastX, Y, it seems the MapClient event is not fired any more once the TrackMode is set to TrackMode.Line.
Also how to get the instance of the Graphics so I can draw the String label dynamically?
Thanks
Rose