Where It All Goes Down
Suffice it to say that our setting in "When Lilacs Last in the Dooryard Bloom'd" covers pretty much… the entire landscape of America. That's totally Walt, for you. Not for nothing is he knows as the country's national poet. When he wrote, he wrote big, with the entire country in mind.
In this poem, One minute we're in a dooryard, the next we're traveling the prairies, and in the next we're in a big city somewhere. Occasionally our speaker even has us in a more mysterious, undefined world, one that's symbolic of the death and-or the unconscious mind. So essentially we have a balance of more concrete settings with the more ambiguous ones.
What we do know is that the time is set during the American Civil War, and those long funeral processions with the "pomp of the inloop'd flags with the cities draped in black" make it clear that the entire nation is in a state of mourning (35). The "debris and the debris of all the slain soldiers of the war" also make it clear that we're in a national state of war and upheaval (179).
When the speaker begins to consider death on a more intimate level, we also notice that the setting becomes a bit dreamlike and ambiguous in death's "loving floating ocean." So just like the swamp where the hermit-bird lives, our "Dark mother" is also located in a sort of intangible space. Depending on whether we're talking about concrete stuff like war or intangible stuff like death and the soul, the setting tends to fluctuate back and forth between real and symbolic settings.
So what's up with that back and forth? We'd venture to say that the setting—in and out of the "real world"—has a lot to do with what's going on in the speaker's mind. Remember that he's working through his attitudes toward death: fear it? hate it? embrace it? praise it? The fluctuating setting can really be seen as a reflection of the speaker's mindset. When he's not trying to take in the entire country with his setting details, Whitman's speaker is in and out of the physical world, looking to come to terms with death. Sorry, but no dash-mounted GPS will help you with that journey.