利用google地图获取位置经纬度坐标的方法


public static void main(String[] args) throws UnsupportedEncodingException {
String address = URLEncoder.encode("北京 香山公园","UTF-8");
String url = "http://maps.google.cn/maps/geo?q="+address+"&output=csv&oe=utf8\\&sensor=true_or_false&key=ABQIAAAAqaGKijD7euSpqDeVsNA85xTT3OL8VXjPlPTFW7n7OgOFwXoSnxT7IP1pHznaiGwWMvsEq_SkxvESLw";
String content = Spider.getContent(url);
String[] info = content.split(",");
System.out.println(info[2]+","+info[3]);
}

你可能感兴趣的:(Google,Java,其他技术)