android 基于GeolocationAPI的基站定位

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解析了;



posted on 2011-08-25 08:46  android开发实例  阅读(1232)  评论(0编辑  收藏  举报

导航