Google maps pincode latitude-longitude

本小妞迷上赌 提交于 2019-12-11 16:53:19

问题


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


回答1:


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

    }   


来源:https://stackoverflow.com/questions/6965162/google-maps-pincode-latitude-longitude

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!