private void map_MouseClick(object sender, MapMouseEventArgs e) { if (DwType != DrawType.None) { e.Handled = true; Location location = map.ViewportPointToLocation(e.ViewportPoint); StartDraw(location); } }
private void RetreiveLatLongs(Microsoft.Maps.MapControl.Map map) { Location topLeft_L = map.ViewportPointToLocation(topLeft_P); Location botRight_L = map.ViewportPointToLocation(botRight_P); Location center_L = map.ViewportPointToLocation(center_P); latStart = topLeft_L.Latitude; latitude = center_L.Latitude; latEnd = botRight_L.Latitude; longStart = topLeft_L.Longitude; longitude = center_L.Longitude; longEnd = botRight_L.Longitude; }