On Tue, Sep 9, 2008 at 10:00 AM, Mark McLaren <[EMAIL PROTECTED]> wrote:
>
> Thanks Thor,
>
> That really helped.  I have been playing with the geocoder a little
> more, it is a shame that there is not a way to specify a locale in the
> geocoder.  The default geocoder is very US centric.
>
> I did a search for "Birmingham", a major UK city with over a million
> inhabitants and it did not feature in the getLocations list.
>
> http://maps.google.com/maps/geo?output=json&oe=utf-8&q=birmingham
>
> Similarly, Boston (Lincolshire - 50000 odd residents) does not
> feature.  There are also some inconsistencies, Kettering (UK) matches
> whereas Kettering (Ohio) does not feature.  (Kettering(Ohio) is
> actually slightly larger than Kettering (UK))
>
> I suppose I will have to add some help text suggesting adding "UK" to
> ensure UK results.

Try adding &gl=GB to the query, eg

...tf-8&q=Birmingham&gl=GB&key...

has the same effect as GClientGeocoder.setBaseCountryCode
http://code.google.com/apis/maps/documentation/reference.html#GClientGeocoder.Methods

or you can also do

http://maps.google.co.uk/maps/geo?output=json&oe=utf-8&q=birmingham

:) (and that is mentioned in the reference)

>
> Thanks again,
>
> Mark
>
> On Tue, Sep 9, 2008 at 6:17 AM, Thor <[EMAIL PROTECTED]> wrote:
>>
>> Generally the geocoder will return the appropriate sector level
>> geocode for a UK postcode if you use getLocations() rather than
>> getLatLng(). It just might not be the first result (which is the one
>> that getLatLng() returns). In this case it is the 4th result (BS8 1).
>> I've yet to see a case when it's not included somewhere in the list
>> though. You just need to iterate through them until you find it.
>>
>> Thor.
>
>
> --
> "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 -

--~--~---------~--~----~------------~-------~--~----~
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