开发者

Google maps Pincode latitude-longitude

开发者 https://www.devze.com 2023-03-26 02:43 出处:网络
How do I get postal code value for 开发者_开发百科a location if I have Latitude and Longitude values of that locationI think you can use getPostalCode() for this.

How do I 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

    }   
0

精彩评论

暂无评论...
验证码 换一张
取 消