You need to draw a straight red line between the start and end points of a calculated route. Which code segment should you use?
A.
var locationArray = new Array(); var len = route.Itinerary.Segments.length; locationArray.push(route.Itinerary.Segments[0].LatLong);
locationArray.push(route.Itinerary.Segments[len-1].LatLong); shape = new VEShape(VEShapeType.Polyline, locationArray); shape.SetLineColor(new VEColor(255, 0, 0, 0)); layer.AddShape(shape);
B.
var locationArray = new Array(); var len = route.Itinerary.Segments.length; locationArray.push(route.Itinerary.Segments[0].LatLong);
locationArray.push(route.Itinerary.Segments[len].LatLong); shape = new VEShape(VEShapeType.Polyline, locationArray); shape.SetLineColor(new VEColor(255, 0, 0, 0)); shape.HideIcon(); layer.AddShape(shape);
C.
var locationArray = new Array(); var len = route.Itinerary.Segments.length; locationArray.push(route.Itinerary.Segments[1].LatLong);
locationArray.push(route.Itinerary.Segments[len].LatLong); shape = new VEShape(VEShapeType.Pushpin, locationArray); shape.SetLineColor(new VEColor(255, 0, 0, 0.5)); layer.AddShape(shape);
D.
var locationArray = new Array(); var len = route.Itinerary.Segments.length; locationArray.push(route.Itinerary.Segments[0].LatLong);
locationArray.push(route.Itinerary.Segments[len-1].LatLong); shape = new VEShape(VEShapeType.Polyline, locationArray); shape.SetLineColor(new VEColor(255, 0, 0, 0.5)); shape.HideIcon(); layer.AddShape(shape);