I'm trying to get the latitude and longitude of a city with the Google Maps API and through PHP (SimpleXML).
I try to do it like this:
$xml = simplexml_load_file("http://maps.googleapis.com/maps/api/geocode/xml?address=Brussels,Belgium&sensor=false");
$lat= $xml->xpath("lat");
print_r($lat);
But this returns an empty array every time. Am I missing something?
Any help is much appreciated.