Android 基于GeolocationAPI的基站定位

2014-11-24 10:46:42 · 作者: · 浏览: 1

api 地址为 http://code.google.com/p/gears/wiki/GeolocationAPI


发送的格式:


{
"location": {
"latitude": 51.0,
"longitude": -0.1,
"altitude": 30.1,
"accuracy": 1200.1,
"altitude_accuracy": 10.1,
"address": {
"street_number": "100",
"street": "Amphibian Walkway",
"postal_code": "94043",
"city": "Mountain View",
"county": "Mountain View County",
"region": "California",
"country": "United States of America",
"country_code": "US"
}
}
}


返回的格式: {
"location": {
"latitude": 51.0,
"longitude": -0.1,
"altitude": 30.1,
"accuracy": 1200.1,
"altitude_accuracy": 10.1,
"address": {
"street_number": "100",
"street": "Amphibian Walkway",
"postal_code": "94043",
"city": "Mountain View",
"county": "Mountain View County",
"region": "California",
"country": "United States of America",
"country_code": "US"
}
}
}


得到LAC 和CellId后,其它的就是json解析了;