MoveMove in WPF CustomMarkers Demo

Nov 19, 2009 at 2:46 PM
Edited Nov 19, 2009 at 2:56 PM

Hi Radioman,

When a user wants to move a marker, the marker will be moved when you click on it (and no mouse move was performed). It looks like the following change fixes more or less this behaviour:

 

void CustomMarkerDemo_MouseMove(object sender, MouseEventArgs e)
{
if(e.LeftButton == MouseButtonState.Pressed && IsMouseCaptured)
{
Point p = e.GetPosition(MainWindow.MainMap);
//Marker.Position = MainWindow.MainMap.FromLocalToLatLng((int) p.X, (int) p.Y);
Marker.Position = MainWindow.MainMap.FromLocalToLatLng((int)p.X, (int)(p.Y + (Height / 2)));
}
}

Frank.

Edit: Sorry, but that wasn't good either