Sunday 21 August 2016

how to get address from latitude and longitude.

$geocode=file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng=30.6978446,76.717779&sensor=false');

$output= json_decode($geocode);
//print_r($output);
echo $output->results[0]->formatted_address;

No comments:

Post a Comment