diff --git a/ferramentas/buscafotos/funcoes.php b/ferramentas/buscafotos/funcoes.php index 147afac..0c4cdc1 100755 --- a/ferramentas/buscafotos/funcoes.php +++ b/ferramentas/buscafotos/funcoes.php @@ -6,9 +6,8 @@ require_once(dirname(__FILE__)."/../../pacotes/cpaint/cpaint2.inc.php"); require_once(dirname(__FILE__)."/../../ms_configura.php"); include("../blacklist.php"); verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false); -require_once(dirname(__FILE__)."/../../pacotes/phpflickr/phpFlickr.php"); error_reporting(0); - +require_once(dirname(__FILE__)."/../../pacotes/phpflickr/phpFlickr.php"); $funcao = $_GET["funcao"]; $key = $_GET["key"]; @@ -52,14 +51,22 @@ function listafotospanoramio() $long = $ret[2] - (($ret[2] - $ret[0]) / 2); $resultado = ""; $curl = curl_init(); - curl_setopt ($curl, CURLOPT_URL, "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=$lat,$long&radius=25000&key=".$googleApiKey); + $u = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=$lat,$long&radius=50000&key=".$googleApiKey; + $recent = file_get_contents($u); + /* + curl_setopt ($curl, CURLOPT_URL, "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=$lat,$long&radius=50000&key=".$googleApiKey); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_TIMEOUT, 120); if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ curl_setopt($curl, CURLOPT_PROXY, $i3geo_proxy_server); } $recent = curl_exec($curl); curl_close ($curl); - + */ + $recent = str_replace("\n","",$recent); + $recent = str_replace("\t","",$recent); + $recent = str_replace("'","",$recent); + $recent = str_replace('"',"'",$recent); $cp->set_data($recent); } function listafotoslocr() diff --git a/ferramentas/buscafotos/index.js b/ferramentas/buscafotos/index.js index bc86909..b569c0f 100755 --- a/ferramentas/buscafotos/index.js +++ b/ferramentas/buscafotos/index.js @@ -197,7 +197,11 @@ i3GEOF.buscaFotos = { */ busca: function(pagina){ - if(i3GEO.parametros.mapscale > 3000000){ + if(i3GEO.parametros.googleApiKey == ""){ + i3GEO.janela.tempoMsg($trad("precisaApiGM")); + return; + } + if(i3GEO.parametros.mapscale > 3000000){ i3GEO.janela.tempoMsg($trad('msgZoom',i3GEOF.buscaFotos.dicionario)); return; } @@ -288,9 +292,10 @@ i3GEOF.buscaFotos = { ins += ""; + ins += " title='"+t+"' style='margin:3px;cursor:pointer;' />"; + ins += "
" + data[i].photos[j].html_attributions[0] + "

"; } } } -- libgit2 0.21.2