this question has answer here:
- converting coordinates map addresses 2 answers
i have gps coordinates in form 54.1456123 10.413456
.
how can convert them php addresses postal code, street , city?
use google api
$lat="54.1456123"; $long = "10.413456"; $url = "http://maps.googleapis.com/maps/api/geocode/json?latlng=$lat,$long&sensor=false"; $curl = curl_init(); curl_setopt($curl, curlopt_url, $url); curl_setopt($curl, curlopt_header, false); curl_setopt($curl, curlopt_followlocation, true); curl_setopt($curl, curlopt_returntransfer, true); curl_setopt($curl, curlopt_encoding, ""); $curldata = curl_exec($curl); curl_close($curl); $address = json_decode($curldata); print_r($address);
Comments
Post a Comment