I’m frustrated

Got “Not Found” from the directional service in ionic3?

Hi to all,
i have implemented the directional service in ionic3 but i got error "Not Found" every time.i am not able to show line between 2 distance.please check my below code what the wrong in my code?

//loadRouteList function for set current lat and long
loadRouteList() {
//set the service...
let directionsService = new google.maps.DirectionsService;
this.directionsDisplay = new google.maps.DirectionsRenderer({
polylineOptions: {
strokeColor: '#40710C'
}
});

this.directionsDisplay.setMap(this.map);
this.directionsDisplay.setPanel(this.directionsPanel.nativeElement);

//hold the start and end point in the map...
var start = this.routeList[0].stop_name;
var end = this.routeList[this.routeList.length- 1].stop_name;

directionsService.route({
origin: start,
destination: end,
travelMode: google.maps.TravelMode['DRIVING']
}, (res, status) => {

if(status == google.maps.DirectionsStatus.OK){
this.directionsDisplay.setDirections(res);
} else {
console.warn(status);
}
});
}

HTML section:
1 person has
this problem
+1
Reply