Hello,
I am trying to build a proper php class object that handles the Google
Map API by using xml as output for geocoding requests.

I also wanted to use the postalcode and found it to be at the location
you mention:
Response->Placemark->AddressDetails->Country->AdministrativeArea-
>SubAdministrativeArea->Locality->PostalCode->PostalCodeNumber

And so i coded my php script to assign the value, e.g.:
$postalcode = $xml->Response->Placemark[$i]->AddressDetails->Country-
>AdministrativeArea->SubAdministrativeArea->Locality->PostalCode-
>PostalCodeNumber;

Now, there are certain results that will place postalcode in a
different position thus rendering the assignment null.
This different position is an additional level under 'Locality' named
'DependentLocality' thus the postalcode now resides in:
Response->Placemark->AddressDetails->Country->AdministrativeArea-
>SubAdministrativeArea->Locality->DependentLocality->PostalCode-
>PostalCodeNumber


In the same level is the property ThoroughfareName which i also use in
my php script and which also equaled to null for that result.

You can reproduce this kind of results with this url:
http://maps.google.com/maps/geo?output=xml&key=ABQIAAAAV2FGqtvqcKbEWtE1hL55pxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTjUygjPKBNUU5a6RjMHDcyGYX4PA&q=nafsikas+12

(change the key)

So what can i do? What else can i expect? I have yet to find a
complete schema of the xml results from this service.

And also apart from that, how can i tackle, php wise, this issue? Go
on with multiple if's ? The SimpleXML functions are not that rich in
PHP to do xml voodoo and request directly specific properties...

help?

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