ThinkGeo.com    |     Documentation    |     Premium Support

Question about TrackMode.Line

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


 


 



Rose, 
  
 I am afraid we don’t have the TrackLineDraw event in the current version (3.0.199) like MapSuite 2.0. Now we are focusing on the Track and Edit for the next version and I will add your requests to our tracking system and make sure we will review it before the release. Thanks for pointing it out.  
  
 The MouseClick event used to be disabled; but now it works fine in version 3.0.199. Please make sure you are using the latest version. 
  
 Please let me know if you have any questions. 
   
 Thanks, 
 ThinkGeo Support