`

Unable to parse response from server

 
阅读更多
不能用wifi,用3g

3G好像有时也不行。。。郁闷了。。。

不行
http://muzilihao.iteye.com/blog/1459137
[url]public static GeoPoint  getLatLong(JSONObject jsonObject) {

        Double lon = new Double(0);
        Double lat = new Double(0);

        try {

            lon = ((JSONArray)jsonObject.get("results")).getJSONObject(0)
                .getJSONObject("geometry").getJSONObject("location")
                .getDouble("lng");

            lat = ((JSONArray)jsonObject.get("results")).getJSONObject(0)
                .getJSONObject("geometry").getJSONObject("location")
                .getDouble("lat");

        } catch (Exception e) {
            e.printStackTrace();

        }

        return new GeoPoint((int) (lat * 1E6), (int) (lon * 1E6));
    }
[/url]
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics