You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I need help.
I created a marker after every click in GMapControl and automatically created a routes between the markers.
But when I zoomed in or out and then click the map again the routes is not in the proper placement but the marker is correctly place.
Please can anyone help me solve this issue.
The text was updated successfully, but these errors were encountered:
@aklegend
you can subscribe to mousedown or mouseup event then from there you can get the localpoint position and convert it to LatLng.
something like this
private void GMapControl_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
var point = e.GetPosition(GMapControl);
var latlng = GMapControl.FromLocalToLatLng((int)point.X, (int)point.Y);
var points = new List{ previousLatLng, latlng};
var routes = new GMapRoute(points) { Shape = new System.Windows.Shapes.Path { Stroke = Brushes.Yellow, StrokeThickness =
3 }, Tag = "routes" };
gMapControl.Markers.Add(routes);
previousLatLng = latlng;
}
Hi I need help.
I created a marker after every click in GMapControl and automatically created a routes between the markers.
But when I zoomed in or out and then click the map again the routes is not in the proper placement but the marker is correctly place.
Please can anyone help me solve this issue.
The text was updated successfully, but these errors were encountered: