Unfortunately,
detect magic didn't work like that in 3e. Or were you referring to some other edition or game system?
In particular:
You detect magical auras. The amount of information revealed depends on how long you study a particular area or subject.
1st Round
Presence or absence of magical auras.
2nd Round
Number of different magical auras and the power of the most potent aura.
3rd Round
The strength and location of each aura. If the items or creatures bearing the auras are in line of sight, you can make Spellcraft skill checks to determine the school of magic involved in each. (Make one check per aura; DC 15 + spell level, or 15 + half caster level for a nonspell effect.)