当前位置:网站首页>Gaode map -- obtain longitude and latitude according to geographical location

Gaode map -- obtain longitude and latitude according to geographical location

2022-06-22 01:21:00 The ultimate journey

Geography / Reverse geocoding , View Gaode directly api that will do

https://lbs.amap.com/api/webservice/guide/api/georegeo/

example Method :

/** *  Interface call  GET  Gao de api  Geocoding  ( Reverse geocoding ) * @param addr  Location name  * @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);    //  Convert string to URL Request address 
			HttpURLConnection connection = (HttpURLConnection) url.openConnection();//  Open the connection 
			connection.connect();//  Connect conversation 
			//  Get input stream 
			BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
			String line;
			StringBuilder sb = new StringBuilder();
			while ((line = br.readLine()) != null) {
    //  Loop read stream 
				sb.append(line);
			}
			br.close();//  Closed flow 
			connection.disconnect();//  disconnect 
			System.out.println("Get==" + sb.toString());
			return sb.toString();
		} catch (Exception e) {
    
			e.printStackTrace();
			System.out.println(" Failure !");
			return "";
		}
	}


// Invoke the sample 
httpURLConectionGET(" Beijing Tianjin Luji Industrial Park ");

Electronic map coordinate picking system

Baidu Maps —— Pick the coordinate system
website :http://api.map.baidu.com/lbsapi/getpoint/index.html

Google Maps —— Self contained coordinate acquisition
website :https://www.google.com/maps/

operation : Right click the point where you want to obtain the coordinates , Click... In the right-click menu 【 What's here ?】

Gould map —— Gaud open platform
website :https://lbs.amap.com/console/show/picker

Tencent map —— Coordinate picker
website :https://lbs.qq.com/tool/getpoint/

原网站

版权声明
本文为[The ultimate journey]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206212351146787.html