On 2 February 2011 16:14, ALD2355 <[email protected]> wrote:
>
> Here are two examples - what I am trying to get is the full UK postcode.
> Where there is full postcode the code below does not get it all and I default
> to the full address as the postcode:
> { postcode =
> place.AddressDetails.Country.AdministrativeArea.SubAdministrativeArea.Locality.PostalCode.PostalCodeNumber;
Aha. You're including SubAdministrativeArea in that specification.
It's not included in some data for London, and possibly other counties
and unitary authority areas. This is part of the geocoder response for
that postcode:
"Country" : {
"AdministrativeArea" : {
"AdministrativeAreaName" : "Greater London",
"Locality" : {
"LocalityName" : "London",
"PostalCode" : {
"PostalCodeNumber" : "EC2V 5DH"
}
}
},
"CountryName" : "UK",
"CountryNameCode" : "GB"
}
Address data format is extremely fluid, unfortunately. Almost any
element can be omitted and still follow the xAL standard.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" 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.