I'm not on my caster right now to test it (damn 1017), but you could always try:

Character Configuration > UI Settings
Set "Restore map when not moving" to Yes.

It should make M always open/close the map.