I've noticed two things:
1) The geocoder does not always return a US state code.
2) The geocoder will sometimes return a result with an accuracy of
"City", but the actual city name will be missing (even though the
address details show the city name)
Here are some examples of what I send, and what I get back:
location = "providence rhode island"
results (notice the "AdministrativeAreaName" is not RI):
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark id="p1">
<address>Providence, Rhode Isl, USA</address>
<AddressDetails Accuracy="4"
xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:
2.0"><Country><CountryNameCode>US</CountryNameCode><CountryName>USA</
CountryName><AdministrativeArea><AdministrativeAreaName>Rhode Isl</
AdministrativeAreaName><Locality><LocalityName>Providence</
LocalityName></Locality></AdministrativeArea></Country></
AddressDetails>
location= "ashburn"
results (notice the address is correctly identified as "Ashburn VA"
with an accuracy of "City", but the LocalityName is missing):
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark id="p1">
<address>Ashburn, Virginia, USA</address>
<AddressDetails Accuracy="4"
xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:
2.0"><Country><CountryNameCode>US</CountryNameCode><CountryName>USA</
CountryName><AdministrativeArea><AdministrativeAreaName>VA</
AdministrativeAreaName><AddressLine>Ashburn</AddressLine></
AdministrativeArea></Country></AddressDetails>
For the second example, you can try to take the address that is
returned by the geocoder, and geocode that. You basically get the
same result, an accuracy of "City", but no city information is
returned:
location = "Ashburn, Virginia, USA"
result (notice the absence of LocalityName):
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark id="p1">
<address>Ashburn, Virginia, USA</address>
<AddressDetails Accuracy="4"
xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:
2.0"><Country><CountryNameCode>US</CountryNameCode><CountryName>USA</
CountryName><AdministrativeArea><AdministrativeAreaName>VA</
AdministrativeAreaName><AddressLine>Ashburn</AddressLine></
AdministrativeArea></Country></AddressDetails>
Any ideas here?
Thanks,
Karle
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---