Thank you! I was under the impression that SubAdministrativeArea meant city. This solves my problem.
On Apr 3, 2009, at 4:37 PM, Andrew Leach wrote: > > On Apr 3, 9:39 pm, Eamon Ford <[email protected]> wrote: >> Hello, >> I have lat/lon pair which I am trying to reverse geocode to get the >> city name (or, in Google Maps speak, the SubAdministrativeArea). The >> placemark that it returns has an address of something like "Salem, OR >> 97317, US", and the accuracy level is 5 (which means it should go all >> the way down to SubAdministrativeArea), but when I try to access the >> SubAdministrativeArea property of the placemark, it gives me >> undefined. (I should note that AdministrativeArea and Country do >> work.) >> Now, the real strange part is that no matter what lat/lon pair I use, >> even if it's for a definite house-number level address, >> SubAdministrativeArea is _ALWAYS_ undefined. Could someone tell me >> what I might be doing wrong? > > I think what you're doing wrong is expecting the city to be a > SubAdministrativeArea. If the state is the AdministrativeArea, surely > a SubAdministrativeArea would be a county, not a city? Have you > checked the XML output? > http://maps.google.com/maps/geo?q=Salem+OR+97317+USA&output=xml&key= > has Salem as the LocalityName. > > How did you interpret accuracy 5 as meaning SubAdministrativeArea? It > means zipcode-level accuracy: > http://code.google.com/apis/maps/documentation/geocoding/index.html#GeocodingAccuracy > which I interpret to mean that the point returned can be expected to > be within the zipcode you specified. > > 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 -~----------~----~----~----~------~----~------~--~---
