Android位置地理编码器和Google地图API之间的区别

时间:2012-06-26 11:56:50

标签: android geolocation google-geocoder

在我的Android应用程序中,我需要从GPS获取我的坐标地址。这是获得它的最佳方法。通过以下代码使用android.location.Geocoder?

Geocoder geo = new Geocoder(Booking.this);
try {
List<Address> add = geo.getFromLocation(location.getLatitude(), location.getLongitude(), 3);
 Log.d("Geocode location", ""+add.get(0));
                } catch (IOException e1) {
                    e1.printStackTrace();
                }

或通过此链接使用Google地图API http://maps.googleapis.com/maps/api/geocode/json?latlng=13.9020,80.3498&sensor=true

如果有人指导正确的地理编码方法,将会很有帮助。

0 个答案:

没有答案