Ich habe diese Sätze gefunden :
Wo ist bitte das Cafe? - Das ist an dem Rosenplatz.
Wo ist der Markt? - Auf dem Kirchplatz.
Basically, the difference is clear:
means that the Café is located adjacent to the place.
means on top of it.
A "Markt" (market), not to be confused with "Supermarkt" (market center) in an European city, is comparable to a bazar, so it consists of "Stände" (counters with a tent) that are placed on the market place. See the image from a market in Germany (From de.wikipedia article "Markt"): .
Colloquially, sometimes the wrong preposition is used, but that is bad style.