I'm trying to implement some drag/drop features on the map but do no know how to get the coordinates from the map where the item was dropped. I can get the mouse position in relation to the map window, but how do i translate that to map coordinates?
Map Drag Drop
Found a solution for anyone visiting this link later.
Point mousePoint = e.GetPosition(map1);
PointShape mapPoint = ExtentHelper.ToWorldCoordinate(map1.CurrentExtent,
new ScreenPointF((float)mousePoint.X, (float)mousePoint.Y),
(float)map1.ActualWidth,
(float)map1.ActualHeight);
Hi Ben,
That is the right way to go.
And thanks for sharing this.
Regards,
Tsui