Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Google Maps API can be used to convert zip codes to long./lat.? [closed]

What Google Maps API can I use to translate zip codes to longitude and latitude?

like image 635
abc Avatar asked Aug 10 '10 06:08

abc


People also ask

How do I find the latitude and longitude of a zip code using Google API?

php if(isset($_POST['submit'])) { $zipcode=$_POST['location']; $url = "http://maps.googleapis.com/maps/api/geocode/json?address=".$zipcode."&sensor=false"; $details=file_get_contents($url); $result = json_decode($details,true); $lat=$result['results'][0]['geometry']['location']['lat']; $lng=$result['results'][0][' ...

How can I get Google Map API zip code?

ZIP code lookup The request format is: http://maps.googleapis.com/maps/api/geocode/json?address=ZIP_CODE&key=YOUR_API_KEY will, and in the response you get a lot of information, including for our purposes, that 92101 is the postal code for San Diego, California.


1 Answers

You want the Geocoding API http://code.google.com/apis/maps/documentation/geocoding/, pass the zip as the address parameter.

like image 163
Matt Williamson Avatar answered Sep 18 '22 13:09

Matt Williamson