Xandolph;
On the 2nd of this month you gave some advise:
"Some more points to consider: Do you add your overlay to the map in the mouse click event handler? If so, don't! Move this code to the constructor. (You only need to add it once.)
Set the code for your route(s) in the constructor or in the form_load event as well (Stroke settings, add it to the overlay).
You just need to add the new point in the mouse click event handler."
I moved this to the Form1_load event (out of the gMapControl1_MouseMove event where it did work);
Am I missing something else ?
Thanks
Aw
On the 2nd of this month you gave some advise:
"Some more points to consider: Do you add your overlay to the map in the mouse click event handler? If so, don't! Move this code to the constructor. (You only need to add it once.)
Set the code for your route(s) in the constructor or in the form_load event as well (Stroke settings, add it to the overlay).
You just need to add the new point in the mouse click event handler."
I moved this to the Form1_load event (out of the gMapControl1_MouseMove event where it did work);
GMapRoute route = new GMapRoute(new List<PointLatLng>(), "Route");
route.Stroke.Width = 3;
route.Stroke.Color = Color.Red;
GMapOverlay routesOverlay1 = new GMapOverlay(gMapControl1, "route");
routesOverlay1.Routes.Add(route);
gMapControl1.Overlays.Add(routesOverlay1);
But now there is no line drawn on the screen when there's mouse movement (after the first mouse click). I have this in the MouseMove event: route.Points[1] = pos;
gMapControl1.UpdateRouteLocalPosition(route);
The "route.Points[1] = pos" does update with mouse movement.Am I missing something else ?
Thanks
Aw