On Oct 28, 3:16 pm, Mediakitchen <[EMAIL PROTECTED]> wrote:
>
> I want to be sure that it only returns longitudes and latitudes for
> the UK. For example, I do not want a search entry of "Wellington" to
> return the latitude/longitude for Wellington in New Zealand.
>
> Any help much appreciated.

You can try GClientGeocoder.setBaseCountryCode("uk")
http://code.google.com/apis/maps/documentation/reference.html#GClientGeocoder

...but even with that, there is no guarantee that "Wellington" will
not find the New Zealand version first. So you could then
use .getLocations() and cycle through the locations found until you
get one in the UK
(Placemark.AddressDetails.Country.CountryNameCode=="GB", I think;
Placemark isn't documented very well). If you don't get any UK
locations at all -- which you probably won't for Wellington -- then
add ",UK" to the end of the address string and try again.

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