Getting latitude and longitude for areas outside the US

Can I use the Google Maps API to get latitude and longitude for a given postal code or City + Region combination for foreign countries such as United Kingdon, France, Italy, Japan, Australia, etc.?

I am working on a project that requires local search results. For domestic users, I get their lat / lon through the US zip code encoding table in our database. This is not related to the display of any maps, as well as the results of other users located in their area using the radius formula based on lat / lon values. For local search results of foreign users: I simply show the results based on the matching city name.

Currently users not using US lat / lon are retrieved via PHP GeoIP data. I would like to get more accurate values ​​depending on the city + region or zip code that the user provides.

I am considering getting zip codes tables (which have lat / lon fields) for other countries. Or is the Google Map API idea a better solution?

+5
source share
3 answers

I found results from Google Maps Geocoder to be pretty good.

To check your external postal codes or addresses (without writing any code), simply attach the name of the country to the line and try it in the google maps search box.

Javascript:

geo = new GClientGeocoder ();
geo.getLatLng("2337, Australia", function (point) {
        GLog.write(point.lat() + "," point.lng());
    });
+5

Google , .

GClientGeocoder Google setBaseCountryCode (countryCode: String), (http://en.wikipedia.org/wiki/CcTLD)

+2
0

All Articles