百度提供的uri地理位置定位
来源:http://developer.baidu.com/map/uri-intro.htm
如果知道经纬度想得到具体的地理位置信息,可以使用:http://api.map.baidu.com/geocoder?location=39.990912172420714,116.3972282409668&coord_type=gcj02&output=json
得到的结果如下:
1 { 2 "status":"OK", 3 "result":{ 4 "location":{ 5 "lng":116.397228, 6 "lat":39.909605 7 }, 8 "formatted_address":"北京市西城区人民大会堂西路45号", 9 "business":"和平门,天安门,前门", 10 "addressComponent":{ 11 "city":"北京市", 12 "district":"西城区", 13 "province":"北京市", 14 "street":"人民大会堂西路", 15 "street_number":"45号" 16 }, 17 "cityCode":131 18 } 19 }
也可以直接给个地址:如天安门广场
返回结果如下:
1 { 2 "status":"OK", 3 "result":{ 4 "location":{ 5 "lng":116.406107, 6 "lat":39.90664 7 }, 8 "precise":0, 9 "confidence":40, 10 "level":"\u9053\u8def" 11 } 12 }