"Dancing in the Street" doesn't contain any references to a single, deliberate setting. In one stanza an "invitation" is issued "across the nation"; in another the singers call out "around the world." They are dancing "up" in New York City and "way down" in LA, but the phrasing seems chosen mostly to provide lyrical rhythm. Not to mention that this format employs a very American technique of listing off place names, much like Chuck Berry's 1958 hit, "Sweet Little Sixteen."
It could be argued, though, that the song is aimed at an urban audience—after all, Whiskey Flats is not among the locations caught up in all this dancing. And if there is a specific setting for the song, it's probably Detroit. Writers William "Mickey" Stevenson and Marvin Gaye claimed to have been inspired by the sight of kids playing in the fire hydrants opened up on hot summer days in Detroit. In addition, Martha Reeves and the other singers were raised in Detroit. Martha sang in local church choirs and was coached by the same Detroit public high school music teacher that taught members of The Supremes and Smokey's Miracles. The song was recorded at the Motown studios on Detroit's West Grand Blvd, and Motown's in-house musicians fleshed out the accompanying instrumentation.
As a Motown hit, "Dancing in the Street" is unmistakably Detroit in its origins, but its lyrics extend far beyond that, and that's part of what helped get this song popular in the country as a whole.