$.ajax({
...
success: function(data) {
var singlePosition = new google.maps.LatLng(data.props[0].lat, data.props[0].lng);
var request = {
origin: coords,
destination: singlePosition,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(...);
...
},
...
});