When I initialize the application I set the WpfMap CurrentExtent
to my world map. But somehow its rejected. I say that because
as soon as drag the mouse to reposition the screen the coordinates
change to some default values of
45000,-407 upperleft
5359,-1032 lower right
private void MainViewMainWindow_MouseMove(object sender, RoutedEventArgs e)
{
MouseEventArgs ee = (MouseEventArgs)e;
System.Windows.Point ScreenPoint = ee.GetPosition(AccuViewWpfMap);
PointShape worldPoint = ExtentHelper.ToWorldCoordinate(
AccuViewWpfMap.CurrentExtent,
new ScreenPointF((float)ScreenPoint.X, (float)ScreenPoint.Y),
(float)AccuViewWpfMap.Width,
(float)AccuViewWpfMap.Height);
StatusDDText.Text = "X: " + worldPoint.X.ToString("0.##")
+ "; Y:" + worldPoint.Y.ToString("0.##");
StatusConvasCoordinateText.Text = "X: " + ScreenPoint.X
+ "; Y: " + ScreenPoint.Y;
}
This is all I do in the mouse move and the numbers returned in the
worldPoint reflect the position. I have to click drag and move to
the position I set up when I started.
Ideas?
Bob