//Latitud y Longitud dado el nombre geográfico (Google Geocode) function getGeocode($place) { if (empty($place)) return false; $geocode = json_decode(getContent(\"http://maps.google.com/maps/api/geocode/json?address=\".utf8_encode($place).\"&sensor=false\"), true); if($geocode[\"status\"] == \"OK\") { $location = $geocode[\"results\"][0][\"geometry\"][\"location\"]; return array($location[\"lat\"],$location[\"lng\"]); } else { //not ok, error die(\"Error. Geocode status = \".$geocode[\"status\"].\"
\\n\"); } }