Spatially resolved charge-state and current-density distributions at the extraction of an electron cyclotron resonance ion source.