Google地图:挪威邮政编码不会返回任何结果 [英] Google Maps: Norwegian postcodes not returning any results

查看:191
本文介绍了Google地图:挪威邮政编码不会返回任何结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单来说,我们有一些挪威邮政编码,并使用API​​来获取他们的地址和经纬度。长。没有什么值得高兴的,但在大约10%的邮编上。 API不会返回任何结果,下面是一个例子:

postal_code = 1151 的成功:

  http://maps.googleapis.com/maps/api/geocode/json?components=country:NO%7Cpostal_code:1151&sensor=false 

$ postal_code = 2066 失败:

  http://maps.googleapis.com/maps/api/geocode/json?components=country:NO%7Cpostal_code:2066&sensor = false 

我注意到大多数人似乎是为Postboks(假定相当于邮政信箱然而,这并不是所有人都有的。



有任何类似的经验和/或或许更好的了解挪威邮政编码?

尝试了你的请求,我发现 postal_code = 2066 会给你ZERO_RESULTS,如果你正在寻找名字 Jessheim 飞行?那么我认为你应该使用 postal_code = 2069 ,这会给你你想要的请求。



这里是我使用的请求。

  maps.googleapis.com/maps/api/geocode/json?components=country:NO | postal_code:2069& sensor = false 

另外,我想你应该先知道正确/可用的邮件你使用的代码。我试图通常要求我没有设置任何国家作为过滤器。



首先,我使用 postal_code = 1151 ,如您所见,您会在结果中找到 1151 Oslo,Norway 地址。这意味着邮政编码1151 在挪威可用。

  maps.googleapis .com / maps / api / geocode / json?components = country:| postal_code:1151 

我使用了邮政编码= 2066 ,并且您找不到该国家挪威的任何地址。

  maps.googleapis.com/maps/api/geocode/json?components=country:|postal_code:2066 




有关其他注意事项,如果您在请求中使用两个组件值。
您需要使用管道(|)将它们分开。我希望我可以帮你解决这个
问题:)



Putting it simply, we have some Norwegian postcodes and are using the API to get their addresses and lat & long. Nothing to highbrow, but on around 10% of the postcodes. The API returns no results, here's an example:

Success for postal_code=1151:

http://maps.googleapis.com/maps/api/geocode/json?components=country:NO%7Cpostal_code:1151&sensor=false

Fail for postal_code=2066:

http://maps.googleapis.com/maps/api/geocode/json?components=country:NO%7Cpostal_code:2066&sensor=false

I have noticed that the majority appear to be for the Postboks (presuming equivalent of PO boxes in the UK).

However, it's not true for all of them.

Has anyone similar experience and or perhaps a better knowledge of Norwegian postcodes?

Thanks

解决方案

I tried your given request, and I found that postal_code=2066 give you ZERO_RESULTS, If you are looking to the name Jessheim, am I right? Then I think you should use the postal_code=2069, this will give you the request that you want.

Here is the request that I used.

maps.googleapis.com/maps/api/geocode/json?components=country:NO|postal_code:2069&sensor=false

Also, I think you should know first the correct/available postal code that you used. I tried to request generally in which I did not set any country as a filter.

First, I used the postal_code=1151, and as you can see, you will find the 1151 Oslo, Norway address in the result. Which means the postal_code 1151 is available in Norway.

maps.googleapis.com/maps/api/geocode/json?components=country:|postal_code:1151

Second, I used the postal_code=2066, and you will not find any address that the country is NORWAY.

maps.googleapis.com/maps/api/geocode/json?components=country:|postal_code:2066

For additional note, if you use two components value in your request. You need to use pipe(|) to separate them. I hope I help you with this :)

这篇关于Google地图:挪威邮政编码不会返回任何结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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