Reverse GeoCoding-Getting Address from Latitude/Longitude
Hello Friends,
Google MAP API provides you the way to get Latitude, Longitude, IP Address if you provide the Address. This is called GeoCoding. Are you stuck where you want Address or Region code from Latitude and Longitude? Now, Google MAP API provides reverse way where you have to pass latitude/longitude and Google will give Address containing City, State , Region Code, Country in response. This is called Reverse GeoCoding.
Below is the PHP code for getting Region Code from latitude and longitude.
<?php
$url = “http://maps.google.com/maps/geo?q=30.28,-97.73&output=json&key=ABQIAAAAhdDokCu8GspRD8rZaYYaoRR5dndtY5oS-GFuRoRAautbbsCzexTbXFh0ItLJ_JAtzGaD1Nh8I-kRzQ”;
$json_content = file_get_contents($url);
$data = json_decode($json_content);
echo $data->Placemark[0]->AddressDetails->Country->AdministrativeArea->AdministrativeAreaName;
?>






I am
about 1 year ago
Good Work
about 3 months ago
Quick question, is there a limit on these queries