"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're dancing "up in New York City" and "way down in LA, California," 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's aimed at an urban audience. After all, Whiskey Flats isn't among the locations caught up in all this dancing. And if there's 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.
And 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 Boulevard, 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.