如何将邮政编码转换为城市名称,是否有可用的 API? [英] How to convert postal code to city name, is there an API available?

查看:37
本文介绍了如何将邮政编码转换为城市名称,是否有可用的 API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将邮政编码转换为城市名称,是否有可用的API?

How to convert post code to city name, is there an API available?

推荐答案

您需要一个可以执行地理编码的服务.

雅虎地理编码器 API 在全球范围内取得了更好的结果.

Yahoo's Geocoder API is getting much better results globally.

110021新德里的邮政编码.世界其他地方.

110021 is the postal code for New Delhi among several other places in the world.

这个 似乎都得到了.

Google Maps API 是另一种此类服务但我对地理编码结果不满意,因为我没有得到 110021 的所有结果.

Google Maps API is another such service but I'm not happy with the geocoded results as I don't get all results back for 110021.

geocoder = new google.maps.Geocoder();
geocoder.geocode({ 'address': '110021'}, function(results, status) {
    console.log(results);
});

这篇关于如何将邮政编码转换为城市名称,是否有可用的 API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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