We have studied the phenomenon of electromagnetically induced transparency (EIT) of 87 Rb vapor with a buffer gas in a magnetic field at room temperature. It is found that the spectral lines caused by the velocity selective optical pump effects get much weaker and wider when the sample cell mixed with a 5-Torr N2 gas while the EIT signal kept almost unchanged. A weighted least-square fit is also developed to remove the Doppler broadening completely. This spectral method provides a way to measure the Zeeman splitting with high resolution, for example, the Λ-type EIT resonance splits into four peaks on the D2 line of 87 Rb in the thermal 2-cm vapor cell with a magnetic field along the electric field of the linearly polarized coupling laser. The high resolution spectrum can be used to lock the laser to a given frequency by tuning the magnetic field.