解决方案 »

  1.   

    http://blog.csdn.net/stardust_oak/article/details/6936623
      

  2.   

    貌似不可以请问还有没有其他好用的API网址。
    我用这里的代码public static String GetAddr(String latitude, String longitude) {  
    String addr = "error Loading location Info";  

    /*
     * 也可以是http://maps.google.cn/maps/geo?output=csv&key=abcdef&q=%s,%s,不过解析出来的是英文地址
     * 密钥可以随便写一个key=abc
     * output=csv,也可以是xml或json,不过使用csv返回的数据最简洁方便解析    
     */
    String url = String.format(  
        "maps.google.cn/maps/geo?output=csv&key=abcdef&q=%s,%s",  
        latitude, longitude);  
    URL myURL = null;  
    URLConnection httpsConn = null;  
    try {  

    myURL = new URL(url);  
    } catch (MalformedURLException e) {  
      e.printStackTrace();  
      return null;  
    }  

    try {  

    httpsConn = (URLConnection) myURL.openConnection();  
        
    if (httpsConn != null) {  
    InputStreamReader insr = new InputStreamReader(  
    httpsConn.getInputStream(), "UTF-8");  
    BufferedReader br = new BufferedReader(insr);  
    String data = null;  
    if ((data = br.readLine()) != null) {  
    String[] retList = data.split(",");  
    if (retList.length > 2 && ("200".equals(retList[0]))) {  
    addr = retList[2];  
    } else {  
    addr = "error Loading location";  
    }  
    }  
    insr.close();  
    }  
    } catch (IOException e) {  

    e.printStackTrace();  
       return null;  
    }  
       return addr;  
    }

    }总是提示 "error Loading location" 
      

  3.   

    百度api现在应该也可以实现经纬度转换地理文字。