資源描述:
《地區(qū)經(jīng)緯度信息獲取(利用google地圖api獲取)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、地區(qū)經(jīng)緯度信息獲?。ɡ肎oogle地圖API獲取)packagecom.leg3s.rld.util;importjava.io.BufferedReader;importjava.io.DataInputStream;importjava.io.DataOutputStream;importjava.io.IOException;importjava.io.InputStream;importjava.io.InputStreamReader;importjava.io.OutputStre
2、am;importjava.io.OutputStreamWriter;importjava.io.UnsupportedEncodingException;importjava.net.HttpURLConnection;importjava.net.URL;importjava.net.URLConnection;importjava.util.ArrayList;importjava.util.HashMap;importjava.util.List;importjava.util.Map
3、;importjava.util.Map.Entry;importorg.apache.log4j.Logger;/***地址經(jīng)緯度信息獲取工具類**@authorliuw*@createdate2010/01/18*/publicclassAddressLatLngUtil{privatestaticfinalStringREQUEST_ENCODE="UTF-8";privatestaticfinalStringADDRESS_KEY=""address"";privatestaticf
4、inalStringADDRESS_COUNTRY_KEY=""CountryName"";privatestaticfinalStringADDRESS_REGION_KEY=""AdministrativeAreaName"";privatestaticfinalStringADDRESS_CITY_KEY=""LocalityName"";privatestaticfinalStringADDRESS_POINT_KEY=""coordinates"";privatesta
5、ticfinalStringADDRESS_SPLIT_STR=":";privatestaticfinalStringLOCATION_COUNTRY_KEY=""country"";privatestaticfinalStringLOCATION_REGION_KEY=""region"";privatestaticfinalStringLOCATION_CITY_KEY=""city"";//privatestaticfinalStringLOCATION_POINT_KEY=
6、""location"";privatestaticfinalStringLOCATION_POINT_LATITUDE_KEY=""latitude"";privatestaticfinalStringLOCATION_POINT_LONGITUDE_KEY=""longitude"";privatestaticfinalStringLOCATION_POINT_PRECISIONY_KEY=""accuracy"";privatestaticfinalStringLOCATI
7、ON_SPLIT_STR=",";publicstaticfinalintMIN_ZOOM=11;publicstaticfinalintMAX_ZOOM=18;privatestaticfinalintDOWNNUM_FOR_PROXY=8000;privatestaticfinalintCONNECT_TIMEOUT=30000;//30秒privatestaticfinalintTHREAD_SLEEP_MILLIS=200;privatestaticbooleanflag=false;p
8、rivatestaticintdownNum=0;privatestaticStringproxyHost="165.228.128.10";privatestaticStringproxyPort="3128";privatestaticStringproxySet="true";privatestaticfinalLoggerlogger=Logger.getLogger(AddressLatLngUtil.class);/***獲取地址詳細(xì)信息及經(jīng)緯度信息**@paramaddress*@