hi
when i draw the route with the function "routebetweenpoints" i need that the route croos over specifing points
i have 900 coordinates
here is my code :
Dim route As MapRoute = GMap.NET.MapProviders.GoogleMapProvider.Instance.GetRouteBetweenPoints(start, endStop, False, False, 15)
i also try this :
Dim listPointlatlon As New List(Of PointLatLng)
thanks a lot
when i draw the route with the function "routebetweenpoints" i need that the route croos over specifing points
i have 900 coordinates
here is my code :
Dim route As MapRoute = GMap.NET.MapProviders.GoogleMapProvider.Instance.GetRouteBetweenPoints(start, endStop, False, False, 15)
route.Points.Clear()
For i As Integer = 0 To listOfRoutes.Count - 1
Dim Coordinates As PointLatLng = New PointLatLng(listOfRoutes.Item(i).latitude, listOfRoutes.Item(i).longitude)
route.Points.Add(Coordinates)
Next
Dim NewRoute As GMap.NET.WindowsForms.GMapOverlay
NewRoute = New GMap.NET.WindowsForms.GMapOverlay(MainMap, "My Route")
MainMap.Overlays.Add(NewRoute)
Dim r As GMapRoute = New GMapRoute(route.Points, "My Route")
r.IsVisible = True
Dim routesOverlay As GMapOverlay = New GMapOverlay(MainMap, "routes")
routesOverlay.Routes.Add(r)
MainMap.Overlays.Add(routesOverlay)
r.Stroke.Width = 3
r.Stroke.Color = Color.GreenYellow
MainMap.ZoomAndCenterRoute(route)
MainMap.SelectedAreaFill.Dispose()
i got a blue screen with agriturismo sandronei also try this :
Dim listPointlatlon As New List(Of PointLatLng)
For Each lst In listofRoute
listPointlatlon.Add(New PointLatLng(lst.latitude, lst.longitude))
Next
Dim r As GMapRoute = New GMapRoute(listPointlatlon, "routes")
r.Stroke.Width = 5
r.Stroke.Color = Color.Blue
Dim routesOverlay As GMapOverlay = New GMapOverlay(MainMap, "routes")
routesOverlay.Routes.Add(r)
MainMap.ZoomAndCenterRoute(r)
please helpthanks a lot