The speaker is an older sailor talking to a boy waiting in the bay, and the advice is cryptic but gently weary. He tells the boy to stay put and understand one thing: news and letters arrive only when a ship does. Waiting on shore means waiting on the wind.
The middle lines turn to memory. Halfway out, the travelers could see pleasant places, but the farther they sailed, the less they could see. Distance doesn't bring clarity here; it takes it away. Then the poem shifts to a card game, where the speaker admits his caution was fruitless. He seems to say he gained things "without book," meaning by guesswork or memory, when the book, the proper guide, was within reach all along.
The mood is quiet, rueful and a little wry. Judging by the imagery, the speaker is passing on regret rather than a command: don't wander far for what is already close.