最近搜索

地名,或者街道名称,转成经纬度坐标 (百度api) 百度地图 百度位置

浏览:101
管理员 2024-04-30 03:22
//地名 转成  坐标。
System.out.println(        get("https://api.map.baidu.com/geocoding/v3/?address=北京市海淀区上地十街10号&output=json&ak=我的百度akfda2f&callback=showLocation")
);



输出如下:
showLocation&&showLocation({"status":0,"result":{"location":{"lng":116.30684538228411,"lat":40.057737278172179},"precise":1,"confidence":80,"comprehension":100,"level":"门址"}})


所有api说明地址:

https://lbsyun.baidu.com/faq/api?title=webapi




api如下:

https://lbsyun.baidu.com/faq/api?title=webapi/guide/webservice-geocoding-base


注册 百度帐号。

https://lbsyun.baidu.com/apiconsole/key#/home

创建 应用。

image.png


可以点击设置选择全部应用api

image.png


我们用的是 地理编码

image.png






另外百度还有另外一个功能,就是把别的坐标转成百度能用的坐标。


功能介绍

非百度坐标系转换

用户可通过该服务,实现非百度坐标系(GPS标准坐标、amap地图坐标、tencent地图坐标、mapbar地图坐标等)到百度坐标系的转换。
单次请求可批量解析100个坐标


联系站长

站长微信:xiaomao0055

站长QQ:14496453