add maxDistance in nearNoQueue