2019独角兽企业重金招聘Python工程师标准>>>
百度开发者地址:http://developer.baidu.com/
PlaceAPI接口文档:http://developer.baidu.com/map/index.php?title=webapi/guide/webservice-placeapi
demo:http://yunpan.cn/c3xFQvwhrWMiU 访问密码 412c
1、申请百度地图密钥(ak)
点击创建应用
2、查看ak
3、圆形区域检索(xml)
http://api.map.baidu.com/place/v2/search?&query=QUERY&location=LAT,LNG&radius=2000&output=xml&scope=2&page_size=10&page_num=0&ak=您的ak
请求参数
返回值:
//列表信息
中山大道352号(中山大道利济南路交汇口)
4、Place详情检索服务
http://api.map.baidu.com/place/v2/detail?uid=5a8fb739999a70a54207c130&ak=您的ak&output=xml&scope=2
请求参数:
返回值
{
"status": 0,
"message": "ok",
"result": {
"name": "百度大厦员工食堂",
"location": {
"lng": 116.308022,
"lat": 40.056892
},
"address": "海淀区上地十街10号(近辉煌国际)",
"detail": 1,
"uid": "5a8fb739999a70a54207c130",
"detail_info": {
"tag": "美食;其他",
"detail_url": "http://api.map.baidu.com/place/detail?uid=5a8fb739999a70a54207c130&output=html&source=placeapi_v2",
"type": "cater",
"price": "11.0",
"overall_rating": "4.0",
"taste_rating": "4.0",
"service_rating": "4.0",
"environment_rating": "4.0",
"image_num": "2",
"comment_num": "8",
"shop_hours": "早9点到晚8点",
"atmosphere": "",
"featured_service": "",
"recommendation": "麻辣烫,烤鱼",
"description": "门店介绍:"
}
}
}
注意:必须先有百度账号,才能成为开发者,申请密钥