当前位置:网站首页>高德地图--根据地理位置获取经纬度
高德地图--根据地理位置获取经纬度
2022-06-21 23:51:00 【终极之旅】
即地理/逆地理编码,直接查看高德api即可
https://lbs.amap.com/api/webservice/guide/api/georegeo/
例 方法:
/** * 接口调用 GET 高德api 地理编码 (逆地理编码) * @param addr 地点名称 * @return */
public static String httpURLConectionGET(String addr) {
String GET_URL = "http://restapi.amap.com/v3/geocode/geo?key=159e59e9d821c7ea5d117b7fd6da4fc1&output=JSON"
+ "&address=" + addr;
try {
URL url = new URL(GET_URL); // 把字符串转换为URL请求地址
HttpURLConnection connection = (HttpURLConnection) url.openConnection();// 打开连接
connection.connect();// 连接会话
// 获取输入流
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
StringBuilder sb = new StringBuilder();
while ((line = br.readLine()) != null) {
// 循环读取流
sb.append(line);
}
br.close();// 关闭流
connection.disconnect();// 断开连接
System.out.println("Get==" + sb.toString());
return sb.toString();
} catch (Exception e) {
e.printStackTrace();
System.out.println("失败!");
return "";
}
}
//调用示例
httpURLConectionGET("京津鲁冀产业园");
电子地图坐标拾取系统
百度地图——拾取坐标系统
网址:http://api.map.baidu.com/lbsapi/getpoint/index.html
谷歌地图——自带坐标获取
网址:https://www.google.com/maps/
操作:右键需要获取坐标的点,点击右键菜单中的【这儿有什么?】
高德地图——高德开放平台
网址:https://lbs.amap.com/console/show/picker
腾讯地图——坐标拾取器
网址:https://lbs.qq.com/tool/getpoint/
边栏推荐
猜你喜欢
![[examination skills] memory method and simple derivation of Green formula](/img/26/f28a9f4abaca94988845b3fdaaf571.png)
[examination skills] memory method and simple derivation of Green formula

You have a chance, here is a stage

Go技术日报(2022-06-20)——Go:简单的优化笔记

Enterprises can improve database security in four ways

第八章 习题(45A)【微机原理】【习题】

鸿蒙OS学习(轮播图、列表、图标)

12 BeautifulSoup类的初始化

pytorch学习06:Tensor维度变换

TCP/IP--路由选择

Query of the range of the cotolly tree chtolly tree old driver tree
随机推荐
Visualization of camera pose
ARM 的 缓存一致性
客户端建设及调优实践
View local IP address in vscode
HarmonyOS应用开发第二次作业笔记
American tourist visa interview instructions, let me focus!
样本方差为什么除以(n-1)
Document. How to use and listen for readyState
Error in jsonobject getting date type (getsqldate)
一文读懂LiveData 粘性事件
Li Kou daily question - day 24 -485 Maximum number of consecutive 1
数字化转型的下一个目标:提供准时制信息
redis精讲系列介绍七-过期策略
位运算位与
你有一个机会,这里有一个舞台
The tangled truth about NFT and copyright
在徽商期货开户做期货安全吗?
DOM node
pytorch学习08:拼接与拆分
NS32F103VBT6软硬件替代STM32F103VBT6