In the past it appears sprites or extended units were used which crashed anyone who viewed them. I don't know how, but with tools like Oblivion, users can safely view all of these sprites/units without crashing.
However, to my knowledge (and since nobody releases new public hacks), there is at least one unit which still crashes even the most modern maphacks. The downside of the unit is that if it not removed within a given timeframe, it crashes the map for everyone (regardless if they looked at it). The unit can be created on demand (indeed when I used to make maps, I would use it as a way to force a stalemate) as well.
Now my idea is simple--we randomly wait some amount of time, then we perform our check. At each check, we force each player to center view to the location of where this unit is created. Obviously if they have a maphack on they will immediately crash. The next time is also random. We do this so if a maphacker catches on, he can't turn off his maphack in time every time, since it's not predictable. And if he starts to get paranoid about leaving the maphack on, then we have done something to discourage it.
But, there is a flaw. I believe that some modern hacks can disable center view. Since it is a local action (you don't desynch if you didn't actually center view on the location the trigger action asked), this is fine for them. But, if there is a way to detect the coordinates of someones current view screen via EUDs or whatever memory trick that's available, and you figured out the coordinates of where they should be viewing, then you simply crash their game if their local coordinates do not match up, because it means they have a hack which is disabling the center view trigger.
Now I can't see any way around this for the maphacker, except knowing when to shut the maphack off and making sure their cheatpack does not disable center view.
None.