U.S. Patent No. 8,700,060 granted yesterday is titled "Determining a location of a mobile device using a location database." It uses Wi-FI data to locate a device in any environment.
Here's the abstract:
Methods, program products, and systems for determining a location of a mobile device using a location database are described. The mobile device can host the location database, which can store locations associated with access points. The locations can be distributed in a group of cells of a geographic grid. When the mobile device moves and connects to an access point associated with a location that is outside the group of cells, the mobile device can request an update of the location database. The mobile device can calculate a current location of the mobile device using current access points that are within a communication range of the mobile device by performing a lookup in the location database using identifiers of the current access points. The mobile device can calculate the current location using the locations corresponding to the current access points in the location database.
via Apple Insider