通过一个详情地址获取百度地图的经纬度
注册百度账号
申请百度开发者
获取服务密钥(AK)
勾选启动服务里的“地址编码”和“逆地址编码”
请求校验方式选“IP白名单校验”
IP白名单里填写“服务器公网IP/16”

请求下面地址将得到地址“”的坐标
GET http://api.map.baidu.com/geocoding/v3/?address=北京市海淀区上地十街10号&output=json&ak=[AK]&callback=showLocation
返回数据
showLocation&&showLocation({"status":0,"result":{"location":{"lng":116.3084202915042,"lat":40.05703033345938},"precise":1,"confidence":80,"comprehension":100,"level":"道路"}})请求下面地址将得到坐标“31.225696563611,121.49884033194”对应的具体地址
GET http://api.map.baidu.com/reverse_geocoding/v3/?ak=[AK]&output=json&coordtype=wgs84ll&location=31.225696563611,121.49884033194
返回数据
{"status":0,"result":{"location":{"lng":121.50989077799084,"lat":31.22932842411674},"formatted_address":"上海市黄浦区中山南路187","business":"外滩,陆家嘴,董家渡","addressComponent":{"country":"中国","country_code":0,"country_code_iso":"CHN","country_code_iso2":"CN","province":"上海市","city":"上海市","city_level":2,"district":"黄浦区","town":"","adcode":"310101","street":"中山南路","street_number":"187","direction":"东北","distance":"91"},"pois":[],"roads":[],"poiRegions":[],"sematic_description":"","cityCode":289}}