It is common that most geolocation services use an IP address or the internal GPS of a device to identify the location. That being said, a geolocation API can use WiFi routers, beacons and mobile phone towers as a combination of signals to calculate how far you are from them and triangulate your position based on those distances. This is useful when GPS coverage is not efficient.

Related Links:

What is geolocation?