A stripe with a local gate potential: An efficient magnetometer?