The iPhone has GPS built in, and a near-constant wireless connection to towers with known locations. In comparison even laptops are frequently off, and only have connections to WiFi access points. So there is no real way to do this with any reliability.