谷歌地图pincode纬度经度 [英] Google maps pincode latitude-longitude

查看:230
本文介绍了谷歌地图pincode纬度经度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有该位置的纬度和经度值,它是如何获得某个位置的邮政编码值的?

解决方案

我认为您可以为此使用getPostalCode()。

  Geocoder geo = new Geocoder(getApplicationContext(),
Locale.getDefault ());
列表<地址>加;
尝试{

add = geo.getFromLocation(taplat,taplon,1);
addstr = add.get(0).getPostalCode(); //你将会收到邮递区号


$ / $ c $ / pre

How do it get postal code value for a location if i have Latitude and Longitude values of that location

解决方案

I think you can use getPostalCode() for this.

Geocoder geo = new Geocoder(getApplicationContext(),
            Locale.getDefault());
    List<Address> add;
    try {

        add = geo.getFromLocation(taplat, taplon, 1);
        addstr = add.get(0).getPostalCode(); //u'll get postal code in addstr

    }   

这篇关于谷歌地图pincode纬度经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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