diff --git a/classesphp/classe_mapa.php b/classesphp/classe_mapa.php index 1050a35..b26e0a0 100644 --- a/classesphp/classe_mapa.php +++ b/classesphp/classe_mapa.php @@ -1918,26 +1918,32 @@ class Mapa $xml = simplexml_load_file($servico); $conta = 0; foreach($xml->channel as $c){ - if ($conta == $canal) - { + if ($conta == $canal){ $canal = $c; } } + $nos = $canal->item; + //verifica se o canal faz referencia a elementos externos + //se sim, usa todos os elementos do xml no lugar do canal + foreach ($canal->items as $t){ + foreach ($t->xpath('rdf:Seq') as $x){ + foreach ($x->xpath('rdf:li') as $z){ + $nos = $xml->item; + } + } + } $resultado = array(); $tipog = ""; - foreach ($canal->item as $item){ + foreach ($nos as $item){ $env = array(); //define o tipo - if ($item->xpath('geo:lat')) - { + if ($item->xpath('geo:lat')){ $tipog = "geo"; } - if ($item->xpath('georss:point')) - { + if ($item->xpath('georss:point')){ $tipog = "georsspoint"; } - if ($item->xpath('georss:where')) - { + if ($item->xpath('georss:where')){ $tipog = "envelope"; } if ($tipog == "envelope"){ @@ -1981,7 +1987,7 @@ class Mapa { //$temp = $item->xpath('georss:point'); $temp = (string) $item->children('georss', TRUE)->point; - $env = array( explode(" ",$temp) ); + $env = ( explode(" ",$temp) ); } if (count($env) > 0){ $resultado[] = array(ixml($item,"title"),ixml($item,"link"),ixml($item,"description"),ixml($item,"category"),$env); @@ -2006,12 +2012,11 @@ class Mapa $def[] = array("LINK","C","254"); $def[] = array("DESC","C","254"); $def[] = array("CATEGORIA","C","254"); - if(!function_exists(dbase_create)) - { + if(!function_exists(dbase_create)){ $db = xbase_create($nomeshp.".dbf", $def);xbase_close($db); } - else - {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db); + else{ + $db = dbase_create($nomeshp.".dbf", $def);dbase_close($db); } //acrescenta os pontos no novo shapefile $dbname = $nomeshp.".dbf"; @@ -2042,6 +2047,7 @@ class Mapa $reg = array(); } xbase_close($db); + if ($tipog == "georsspoint" || $tipog == "geo"){ $tipol = MS_LAYER_POINT; } diff --git a/ferramentas/carregakml/index.js b/ferramentas/carregakml/index.js index 380297a..4c46d31 100644 --- a/ferramentas/carregakml/index.js +++ b/ferramentas/carregakml/index.js @@ -56,7 +56,6 @@ i3GEOF.carregakml = { */ mustacheHash : function() { var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.carregakml.dicionario); - dicionario["digite"] = $trad("o1"); dicionario["botao"] = $trad("p14"); return dicionario; }, @@ -82,7 +81,7 @@ i3GEOF.carregakml = { combo += ""; } combo += ""; - $i("i3GEOcarregakmlCombo").innerHTML = "
\ No newline at end of file diff --git a/ferramentas/conectargeojson/index.js b/ferramentas/conectargeojson/index.js index 6638230..5ee6c6d 100644 --- a/ferramentas/conectargeojson/index.js +++ b/ferramentas/conectargeojson/index.js @@ -56,7 +56,6 @@ i3GEOF.conectargeojson = { */ mustacheHash : function() { var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.conectargeojson.dicionario); - dicionario["aguarde"] = $trad("o1"); dicionario["locaplic"] = i3GEO.configura.locaplic; dicionario["aplica"] = $trad("p14"); return dicionario; @@ -85,7 +84,7 @@ i3GEOF.conectargeojson = { combo += ""; } combo += ""; - $i("i3GEOconectargeojsonCombo").innerHTML = "
{{{insereEndereco}}}
--
\ No newline at end of file diff --git a/ferramentas/conectargeorss/exec.php b/ferramentas/conectargeorss/exec.php index 689bcf5..3f5b8cb 100644 --- a/ferramentas/conectargeorss/exec.php +++ b/ferramentas/conectargeorss/exec.php @@ -18,18 +18,23 @@ Adiciona um tema baseado em um RSS. copiaSeguranca($map_file); $m = new Mapa($map_file); $retorno = $m->adicionaTemaGeoRSS($servico,$dir_tmp,$locaplic,$canal); - if ($retorno != "erro") - {$m->salva();$_SESSION["contadorsalva"]++;redesenhaMapa();} + if ($retorno != "erro"){ + $m->salva(); + $_SESSION["contadorsalva"]++; + redesenhaMapa(); + } else{ $retorno = "erro.Nenhum dado espacializado foi encontrado."; } break; } if (!connection_aborted()){ - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") - restauraCon($map_file,$postgis_mapa); + if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ + restauraCon($map_file,$postgis_mapa); + } cpjson($retorno); } -else -{exit();} +else{ + exit; +} ?> \ No newline at end of file -- libgit2 0.21.2