How is location accuracy impacted by Wi-Fi connection?

While the phone is open for Wi-Fi networks, the location might be determined from a global database of Wi-Fi locations. These locations might not be accurate at all times due to Wi-Fi access points being physically relocated, which may render the location obsolete. However, allowing Wi-Fi connections usually improve location data.