我得到了答案從stackoverflow java reverse code to get address from lattitude and longitude
。但在這個問題的答案我不能訪問packege GeoApi背景下,GeocodingResult,GeocodingApi.I我寫的Java Web application.could誰能告訴我什麼是packege或jar文件我下載到包括那些packege 我的答案代碼是java反向代碼從經度和緯度獲取地址
GeoApiContext gtx = new GeoApiContext().setApiKey("**<<<<your-key-here>>>>**");
try {
GeocodingResult[] gResp = GeocodingApi.newRequest(gtx)
.latlng(new LatLng(37, -121)).await();
System.out.println(gResp[0].formattedAddress);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
https://github.com/googlemaps/google-maps-services-java – shmosel