Nicholas(夏远峰) wrote: > How can I get region code from the Google map api......I want to know > region code..But I can only get country code...
The data that's provided is what you get. It depends on what Google have available. In the United States, for example, the <AdministrativeAreaName> gives the two-letter state code. http://maps.google.com/maps/geo?q=memphis,us&output=xml&sensor=false&key=abcdefg In the UK, AdministrativeAreaName is the county [most of the time]: http://maps.google.com/maps/geo?q=lewes,uk&output=xml&sensor=false&key=abcdefg Geonames have a webservice which you could make use of, once you know the coordinates of the point of interest. The name of the region is returned as AdminName1: http://ws.geonames.org/countrySubdivision?lng=114.3979471&lat=39.9081726 http://ws.geonames.org/countrySubdivision?lng=0&lat=49.9081726 That web service doesn't return English counties though: http://ws.geonames.org/countrySubdivision?lng=0&lat=51.9081726 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 -~----------~----~----~----~------~----~------~--~---
