On-chip planar metasurfaces for magnetic sensors with greatly enhanced sensitivity