开发者

Google Geocoding UK address does not get listed

开发者 https://www.devze.com 2023-03-23 17:40 出处:网络
I followed the examples in开发者_Go百科 following site, http://code.google.com/apis/maps/documentation/geocoding/

I followed the examples in开发者_Go百科 following site,

http://code.google.com/apis/maps/documentation/geocoding/

So I expected following url would give me UK addresses. But it is still giving me US address. Any ideas?

http://maps.googleapis.com/maps/api/geocode/json?address=baker&sensor=false&region=gb


The "region" parameter will only make the region a preference not lock out all other results.

In this case it seems the address "Baker" doesn't even show up on Google Maps as a known location - only as businesses.

http://maps.google.co.uk/maps?q=baker&hl=en&sll=53.800651,-4.064941&sspn=18.336241,46.362305&t=h&z=5

I also Googled "Baker village', "baker town", etc but with no luck. I'm guessing that location is particularly obscure and so Google is returning what it considers the more likely results - in the US.

If you try another example like "Birmingham" which is in both the US and UK you'll notice it favours the UK due to the region tag setting:

http://maps.googleapis.com/maps/api/geocode/json?address=birmingham&sensor=false&region=uk

0

精彩评论

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

关注公众号