Add map markers, draw a straight polyline and make a Google direction request.

This is VB code that add 2 markers, draw a straight polyline between the markes and then make a GoogleMap directions route.
If you need you can convert VB to C# or vice versa here http://converter.telerik.com/

Dim point1 As GoogleMaps.LatLng
Dim point2 As GoogleMaps.LatLng

Dim polyline As New GoogleMaps.Polylines.GooglePolyline()
Dim wayplot As New GoogleMaps.Directions.GoogleDirections
Dim wayloc As New GoogleMaps.Polygons.GooglePolygon

point1 = New GoogleMaps.LatLng(58.3, 14.28)
point2 = New GoogleMaps.LatLng(57.7, 11.9666)

Dim car As New GoogleMaps.Markers.Marker
Dim car1 As New GoogleMaps.Markers.MarkerImage()
car1 = ”http://labs.google.com/ridefinder/images/mm_20_red.png”
car.Position = point1
car.Title = ”Johans car on Arlanda airport 20161213”
car.Icon = car1
car.Draggable = True
car.Animation = True
car.Clickable = True
car.Shadow = True

Dim car3 As New GoogleMaps.Markers.Marker
Dim car4 As New GoogleMaps.Markers.MarkerImage()
car1 = ”http://labs.google.com/ridefinder/images/mm_20_green.png”
car3.Position = point2
car3.Title = ”Johans car on Arlanda airport 20161213”
car3.Icon = car4
car3.Draggable = True
car3.Animation = True
car3.Clickable = True
car3.Shadow = True

polyline.Path.Add(point1)
polyline.Path.Add(point2)
polyline.StrokeWeight = 5
polyline.StrokeColor = Color.Red

Dim Markercontent As New StringBuilder
Markercontent.Append(”

Starting point

”)
car.Info = Markercontent.ToString

Dim Markercontent1 As New StringBuilder
Markercontent1.Append(”

End point

”)
car3.Info = Markercontent1.ToString

‘Directions

Dim destination As String = ”Hjo, sweden”
Dim origin As String = ”Gothenburn, sweden”
If (origin IsNot Nothing) AndAlso (destination IsNot Nothing) Then
GoogleMap1.Directions.Add(New GoogleDirections() With {
.Destination = New Location(destination),
.Origin = New Location(origin),
.Draggable = True,
.PanelID = ”route”
})
End If

‘##########################################

GoogleMap1.Markers.Add(car)
GoogleMap1.Markers.Add(car3)
GoogleMap1.Polylines.Add(polyline)