Is there any gmap's api function to concatenate address string from AddressDetails structure?
- by Vadim
Hello! I’am using Google Map’s GClientGeocoder for reversing map coordinates into string address. Exactly as shown in google’s example here http://code.google.com/apis/ajax/playground/?exp=maps#geocoding_reverse
But, I would like to extract LocalityName (place.AddressDetails.Country.AdministrativeArea.Locality.LocalityName) from place.address.
The straight way will be join all AddressDetails elements, excluding LocalityName. However order of the structure elements in final string representation is depends from geographical location.
For example:
Order for Australia city:
ThoroughfareName + “, ” + LocalityName + “ ” + AdministrativeAreaName + “ ” + PostalCodeNumber + “, ” + CountryName
Order for Russian city:
CountryName + “, ” + PostalCodeNumber + “, ” + LocalityName + “, ” +ThoroughfareName
Moreover PostalCodeNumber was not supplied in AddressDetails for the last example.
Please, help!