support for getting next and previous locations based on current ID and depth