Google API中的邮政编码不匹配 [英] Zip code mismatching in google api

查看:166
本文介绍了Google API中的邮政编码不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用google API服务,而在进行一些示例测试时,我遇到了以下api服务调用的问题,

I'm using google API service in my project, while doing some sample testing i have came across an issue with the below api service call,

" http://maps.googleapis. com/maps/api/geode/json?address = 00210& sensor = true "

哪个显示芬兰地址,但我想要有关美国的信息.我怎么解决这个问题?我需要传递国家代码之类的东西吗?

Which shows the Finland address but i want the information regarding the USA. How can i solve this problem? Is there anything which i need to pass like country code or something?

推荐答案

通常,在某些国家/地区查找邮政编码的建议方法是应用以下文档中介绍的组件过滤:

Typically the suggested way to find a postal code in certain country is applying a component filtering that is described in the following document:

https://developers.google.com/maps/documentation/geocoding /intro#ComponentFiltering

您可以创建如下请求:

https://maps.googleapis.com/maps/api/geocode/json?components=postal_code%3A00210%7Ccountry%3AFI&key=YOUR_API_KEY

您也可以在Geocoder工具中进行检查:

You can also check this in Geocoder tool:

希望有帮助!

这篇关于Google API中的邮政编码不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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