Routing emission of light source near the surface by magnetic field