The measurement of the magnetic field in the tracking volume inside the superconducting coil of the Compact Muon Solenoid (CMS) detector under construction at CERN is done with a fieldmapper designed and produced at Fermilab. The fieldmapper uses 10 3-D B-sensors (Hall probes) developed at NIKHEF and calibrated at CERN to precision 0.05% for a nominal 4 T field. The precise fieldmapper measurements are done in 33840 points inside a cylinder of 1.724 m radius and 7 m long at central fields of 2, 3, 3.5, 3.8, and 4 T. Three components of the magnetic flux density at the CMS coil maximum excitation and the remanent fields on the steel-air interface after discharge of the coil are measured in check-points with 95 3-D B-sensors located near the magnetic flux return yoke elements. Voltages induced in 22 flux-loops made of 405-turn installed on selected segments of the yoke are sampled online during the entire fast discharge (190 s time-constant) of the CMS coil and integrated offline to provide a measurement of the initial magnetic flux density in steel at the maximum field to an accuracy of a few percent. The results of the measurements made at 4 T are reported and compared with a three-dimensional model of the CMS magnet system calculated with TOSCA.