How can I get results
returned to placesSearch
function, rather than returning results
to service.nearbySearch
function? Thanks
function placesSearch(map,myLatlng,myBusinessName) {
var searchArea = myLatlng;
var request = {
location: searchArea,
radius: 500
};
var service = new google.maps.places.PlacesService(map);
var googleBusNames = service.nearbySearch(request, callback);
validateFeature(googleBusNames,myBusinessName);
}
function callback(results, status) {
if (status == google.maps.places.PlacesServiceStatus.OK) {
return results;
}
else {
console.log("Error");
}
}