Make sure to resolve promise for nearLocation() function