Why different requests return same geolocation with google geolocation api

933 views Asked by At

I send two requests to google geolocation api: https://www.googleapis.com/geolocation/v1/geolocate?key=[mykey]

1st request:

{"Carrier": "T-Mobile","CellTowers":[{"Age":0,"CellId":"39627456","LocationAreaCode":"40495","MobileCountryCode":"310","MobileNetworkCode":"260","SignalStrength":-95,"timingAdvance":0}],"HomeMobileCountryCode":"310","HomeMobileNetworkCode":"260","RadioType":"gsm"}

2nd request:

{"Carrier":"T-Mobile","CellTowers":[{"Age":0,"CellId":"4912","LocationAreaCode":"20516","MobileCountryCode":"460","MobileNetworkCode":"00","SignalStrength":-60,"timingAdvance":55555}],"HomeMobileCountryCode":"460","HomeMobileNetworkCode":"00","RadioType":"gsm"}

The weird thing is both of them return same geolocation

{ "location": { "lat": 39.90403, "lng": 116.407526 }, "accuracy": 18000.0 }

Anyone know why this happen? Is a bug of google geolocation database? how can I got (lots of real) testing data?

1

There are 1 answers

0
Legisey On

Try to remove the quotes "" around the numbers, I don't have an API key for this one, but it might be it.

For example your first request:

{"Carrier": "T-Mobile","CellTowers":[{"Age":0,"CellId":39627456,"LocationAreaCode":40495,"MobileCountryCode":310,"MobileNetworkCode":260,"SignalStrength":-95,"timingAdvance":0}],"HomeMobileCountryCode":310,"HomeMobileNetworkCode":260,"RadioType":"gsm"}