[disclaimer, I wrote this yesterday - but from some reason it was left
in draft]

>From that bug report found the gl param is actully documented, and it
does specify its a TLD.
http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct

hmm, I'm confused too now - I've always used a country code (as
opposed to cctld - or abbrivation (like uk) ), and like in your
examples it works (with postcodes) - but yes for placenames it does
appear to need to be a cctld.

So it seems for postcodes, need to us gl=gb (but NOT gl=uk or adding
", UK") whereas for placenames, adding ", UK " is best, but gl=uk also
works quite well.

Wonder if Pamela or Thor or someone from the geocoder team can make
sence of our ramblings....



On Tue, Sep 9, 2008 at 11:54 AM, Barry Hunter
<[EMAIL PROTECTED]> wrote:
> On Tue, Sep 9, 2008 at 11:23 AM, Mark McLaren <[EMAIL PROTECTED]> wrote:
>>
>> I see, thank you very much Barry and others for your patience.
>> Apologies for my ineptitude.
>>
>> For a postcode search (e.g. BS8 1TH),
>>
>> full key, callback, gl=uk
>> - I get one inaccurate response.  (Thinking about "uk" is probably
>> Ukraine or something.)
>>
>> full key, callback, gl=gb
>> - I get several choices as per Thor's suggestion - one of these is
>> accurate - I can work with this.
>>
>> Searching for a place (e.g. Birmingham)
>>
>> full key, callback, gl=gb
>> I get Birmingham, Alabama - not GB centric!
>
> hmm, guess that is a bug.... (I see the same)
>
> however
> http://maps.google.co.uk/maps/geo?output=json&oe=utf-8&q=birmingham&key=ABQI...
>
> works :)
>
> This is proably related (only jsut found)
> http://code.google.com/p/gmaps-api-issues/issues/detail?id=418
>
> so from that, the alternative recommendation:
> http://maps.google.com/maps/geo?output=json&oe=utf-8&q=birmingham,UK&key=ABQIAA...
>
> also works.
>
>>
>> full key, callback, gl=uk
>> I get Birmingham, UK.
>>
>> I'm still confused,
>>
>> Mark
>>
>> On Tue, Sep 9, 2008 at 11:06 AM, Barry Hunter
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Always specify the key - without it you are actully utalizing the
>>> geocoder of Google Maps - rather than the API. And there are no ToU
>>> that allow you to do that.
>>>
>>> (I just left the key out for bevity as I thought you had)
>>>
>>> and you need gl=GB, not uk :) (its a country code, not top level domain)
>>>
>>
>> --
>> "Paradoxically, the more time saving abstractions you are using the
>> more you actually have to know." - Simon Willison
>>
>> >>
>>
>
>
>
> --
> Barry
>
> - www.nearby.org.uk - www.geograph.org.uk -
>



-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to