如何获得纬度和放大器;经度从Android上指定的地址? [英] How to get latitude & longitude from given address on Android?

查看:90
本文介绍了如何获得纬度和放大器;经度从Android上指定的地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得纬度和特定地址的经度。我怎样才能做到这一点?

I want to get latitude and longitude of particular address . How can i do this ?

推荐答案

这是样品<一href="http://android-er.blogspot.com/2011/02/get-locationlatitude-and-longitude-from.html">solution你的问题。

List<Address> foundGeocode = null;
/* find the addresses  by using getFromLocationName() method with the given address*/
foundGeocode = new Geocoder(this).getFromLocationName("address here", 1);
foundGeocode.get(0).getLatitude(); //getting latitude
foundGeocode.get(0).getLongitude();//getting longitude

有关详细信息地理codeR

这篇关于如何获得纬度和放大器;经度从Android上指定的地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆