- 1. Add this line to public MapForm1():
- 2. Add this function to the project:
{
System.Drawing.PointF DisplayPoint = new PointF(e.X,e.Y);
MapInfo.Geometry.DPoint MapPoint = new MapInfo.Geometry.DPoint();
MapInfo.Geometry.DisplayTransform converter = this.mapControl1.Map.DisplayTransform;
converter.FromDisplay(DisplayPoint, out MapPoint);
this.statusBar1.Text = "Cursor Location: " + MapPoint.x.ToString() + ", " + MapPoint.y.ToString();
}
This will display the current coordinates of the mouse position.
useful links for custom selection tools:
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/A5FA9134EB660E5A85256FB2005ABD17
http://community.mapinfo.com/forums/message.jspa?messageID=50295
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/A5FA9134EB660E5A85256FB2005ABD17
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/89C695CE5F2FAB4185256F0F005873BF
2 comments:
Hi Mukund can you provide code for Popup when we move mouse over map
You can all the javscript code from the above method to show the data in the popup.
like
ScriptManager.RegisterClientScriptBlock(Page, this.GetType(), "Key", "showXY(x,y);", true);
Post a Comment