I just want to get latitude & longitude using the post code with Google maps API.
I am using PHP for development.
How can I do this?
The post code can be from any where in this world.
To get the latitude of the address in cell B2, use the formula = GetLatitude(B2) To get the longitude of the address in cell B2, use the formula = GetLongitude(B2) To get both the latitude and longitude of the address in cell B2, use the formula = GetCoordinates(B2)
For those driving to Latitude, Henham Park can be found at the postcode NR34 8AN. The site sits just north of Blythburgh, which is a village in East Suffolk.
You can do this using google map Geocoding API. Please find below example, but to correct latitude/longitude and address you need to pass full address along with zipcode.
For more detail please click on below link:
http://code.google.com/apis/maps/documentation/geocoding/
<?php
$url ="http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false";
$result = simplexml_load_file($url);
print"<pre>";
print_r($result);
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With