I'd like to implement a search in progress indicator. It would be nice to use the radarPromise status as the progress indicator trigger. Apparently, you cannot access the status property of a native promise in javascript. Any tricks or alternatives?
$('#calculate-route').off('submit').on('submit', function(event){
event.preventDefault();
console.log('submit');
search.query = document.getElementById("search").value;
var routeSearch = new MyGlobal.findRoutes({
originPlaceId: search.placeInputIds.originPlaceId,
destinationPlaceId: search.placeInputIds.destinationPlaceId,
directionsService: search.directionsService,
directionsDisplay: search.directionsDisplay,
travel_mode: search.travel_mode
})
.then(function(response){
var routeBoxes = new MyGlobal.routeBoxes({
radius: parseFloat(document.getElementById("radius").value),
path: response.routes[0].overview_path,
map: search.map
});
routeBoxes.draw();
var radarSearch = new MyGlobal.radarSearch(search.placesService);
var radarPromise = MyGlobal.radarSearchByBoxes(routeBoxes.bounds, search.query, radarSearch)
.then(function(places){
alert("done");
});
});
});