impl get next location api, given the current pos