ThinkGeo.com    |     Documentation    |     Premium Support

Snapping

Hi,


I want to know if you support snapping functionality now? If not, then how can I get the x,y values of the mouse point in MapMouseMove event?


 


winformsMap1.TrackOverlay.MapMouseMove += new System.EventHandler<mapmousemoveinteractiveoverlayeventargs>(Snap); 


I cannot find any mouse coordinates in the event agument



Jue,


Thanks for your post and interestsin MapSuite Desktop product.
 
Could you try to use the following event instead which has exposed the mouse coordinates out.

winformsMap1.MouseMove += new MouseEventHandler(winformsMap1_MouseMove);
 
void winformsMap1_MouseMove(object sender, MouseEventArgs e)
{
    int screenX = e.X;
    int screenY = e.Y;
 
    PointShape worldPointShape = ExtentHelper.ToWorldCoordinate(winformsMap1.CurrentExtent, screenX, screenY, winformsMap1.Width, winformsMap1.Height);
}

 
Any more questions just feel free to let me know.
 
Thanks.
 
Yale

thanks for your reply. 
  
 then I want to know under which condition I can use MapMouseMove event?

Jue, 
  
 MapMouseMove is a event for TrackOverlay, so you will know what TracKOverlay stand for, simply says it can track shape on the map. such as point, line, polygon etc. The detail thing of Track you can look at out HowDoI sample TrackAndEditShapes, you can find it under Editing Feature Layers catalog. 
  
 MapMouseMove just be used when you do the "Track" thing. 
  
 Please let me know if you have more questions 
 Thanks. 
  
 James