1
Mit Google API erhalten Latitude, Longitude von Orten und erhalten bestimmte Land für die gleichen. Wie kann ich es tun? (mit PHP)Mit Google API erhalten Latitude, Longitude von Orten und erhalten bestimmte Land für die gleiche (mit PHP)
$formattedAddr = str_replace(' ','+',$address);
//Sending request and receive json data by address
$geocodeFromAddr=file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address='.$formattedAddr.'&sensor=false');
$output = json_decode($geocodeFromAddr);
//Get latitude and longitute from json data
$data['latitude'] = $output->results[0]->geometry->location->lat;
$data['longitude'] = $output->results[0]->geometry->location->lng;