Commit 7519fd6bab9970122e12c2abf4ca31bab18d130e

Authored by Edmar Moretti
1 parent 7f7c7248

--no commit message

classesphp/classe_mapa.php
... ... @@ -1918,26 +1918,32 @@ class Mapa
1918 1918 $xml = simplexml_load_file($servico);
1919 1919 $conta = 0;
1920 1920 foreach($xml->channel as $c){
1921   - if ($conta == $canal)
1922   - {
  1921 + if ($conta == $canal){
1923 1922 $canal = $c;
1924 1923 }
1925 1924 }
  1925 + $nos = $canal->item;
  1926 + //verifica se o canal faz referencia a elementos externos
  1927 + //se sim, usa todos os elementos do xml no lugar do canal
  1928 + foreach ($canal->items as $t){
  1929 + foreach ($t->xpath('rdf:Seq') as $x){
  1930 + foreach ($x->xpath('rdf:li') as $z){
  1931 + $nos = $xml->item;
  1932 + }
  1933 + }
  1934 + }
1926 1935 $resultado = array();
1927 1936 $tipog = "";
1928   - foreach ($canal->item as $item){
  1937 + foreach ($nos as $item){
1929 1938 $env = array();
1930 1939 //define o tipo
1931   - if ($item->xpath('geo:lat'))
1932   - {
  1940 + if ($item->xpath('geo:lat')){
1933 1941 $tipog = "geo";
1934 1942 }
1935   - if ($item->xpath('georss:point'))
1936   - {
  1943 + if ($item->xpath('georss:point')){
1937 1944 $tipog = "georsspoint";
1938 1945 }
1939   - if ($item->xpath('georss:where'))
1940   - {
  1946 + if ($item->xpath('georss:where')){
1941 1947 $tipog = "envelope";
1942 1948 }
1943 1949 if ($tipog == "envelope"){
... ... @@ -1981,7 +1987,7 @@ class Mapa
1981 1987 {
1982 1988 //$temp = $item->xpath('georss:point');
1983 1989 $temp = (string) $item->children('georss', TRUE)->point;
1984   - $env = array( explode(" ",$temp) );
  1990 + $env = ( explode(" ",$temp) );
1985 1991 }
1986 1992 if (count($env) > 0){
1987 1993 $resultado[] = array(ixml($item,"title"),ixml($item,"link"),ixml($item,"description"),ixml($item,"category"),$env);
... ... @@ -2006,12 +2012,11 @@ class Mapa
2006 2012 $def[] = array("LINK","C","254");
2007 2013 $def[] = array("DESC","C","254");
2008 2014 $def[] = array("CATEGORIA","C","254");
2009   - if(!function_exists(dbase_create))
2010   - {
  2015 + if(!function_exists(dbase_create)){
2011 2016 $db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);
2012 2017 }
2013   - else
2014   - {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);
  2018 + else{
  2019 + $db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);
2015 2020 }
2016 2021 //acrescenta os pontos no novo shapefile
2017 2022 $dbname = $nomeshp.".dbf";
... ... @@ -2042,6 +2047,7 @@ class Mapa
2042 2047 $reg = array();
2043 2048 }
2044 2049 xbase_close($db);
  2050 +
2045 2051 if ($tipog == "georsspoint" || $tipog == "geo"){
2046 2052 $tipol = MS_LAYER_POINT;
2047 2053 }
... ...
ferramentas/carregakml/index.js
... ... @@ -56,7 +56,6 @@ i3GEOF.carregakml = {
56 56 */
57 57 mustacheHash : function() {
58 58 var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.carregakml.dicionario);
59   - dicionario["digite"] = $trad("o1");
60 59 dicionario["botao"] = $trad("p14");
61 60 return dicionario;
62 61 },
... ... @@ -82,7 +81,7 @@ i3GEOF.carregakml = {
82 81 combo += "<option value='"+raiz[i].link+"'>"+raiz[i].title+"</option>";
83 82 }
84 83 combo += "</select>";
85   - $i("i3GEOcarregakmlCombo").innerHTML = "<div class=styled-select>"+combo+"</div>";
  84 + $i("i3GEOcarregakmlCombo").innerHTML = combo;
86 85 };
87 86 i3GEO.php.listaRSSwsARRAY(monta,"KML");
88 87 b = new YAHOO.widget.Button(
... ...
ferramentas/carregakml/template_mst.html
... ... @@ -5,7 +5,7 @@
5 5 </div>
6 6 <br>
7 7 <br>
8   -<div id='i3GEOcarregakmlCombo' >{{{digite}}}</div>
9   -<br>
  8 +<div id='i3GEOcarregakmlCombo' class='styled-select' ></div>
10 9 <br>
  10 +<p class='paragrafo'>
11 11 <input id='i3GEOcarregakmlbotao1' type='button' value='{{{botao}}}' />
12 12 \ No newline at end of file
... ...
ferramentas/conectargeojson/index.js
... ... @@ -56,7 +56,6 @@ i3GEOF.conectargeojson = {
56 56 */
57 57 mustacheHash : function() {
58 58 var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.conectargeojson.dicionario);
59   - dicionario["aguarde"] = $trad("o1");
60 59 dicionario["locaplic"] = i3GEO.configura.locaplic;
61 60 dicionario["aplica"] = $trad("p14");
62 61 return dicionario;
... ... @@ -85,7 +84,7 @@ i3GEOF.conectargeojson = {
85 84 combo += "<option value='"+raiz[i].link+"'>"+raiz[i].title+"</option>";
86 85 }
87 86 combo += "</select>";
88   - $i("i3GEOconectargeojsonCombo").innerHTML = "<div class=styled-select>"+combo+"</div>";
  87 + $i("i3GEOconectargeojsonCombo").innerHTML = combo;
89 88 };
90 89 i3GEO.php.listaRSSwsARRAY(monta,"GEOJSON");
91 90 b = new YAHOO.widget.Button(
... ...
ferramentas/conectargeojson/template_mst.html
1 1 <p class="paragrafo">{{{insereEndereco}}}</p>
2   -<div class="i3geoForm i3geoFormIconeEdita" style="width:350px;">
  2 +<div class="i3geoForm i3geoFormIconeEdita">
3 3 <input id=i3GEOconectargeojsonurl type="text" value="" />
4 4 </div>
5 5 <p class=paragrafo >
6   -<div id='i3GEOconectargeojsonCombo' style='left: 1px; display: block; width: 350px; text-align: left;'>{{{aguarde}}}</div>
7   -<br>
  6 +<div id='i3GEOconectargeojsonCombo' class='styled-select' ></div>
8 7 <br>
  8 +<p class=paragrafo >
9 9 <input id='i3GEOconectargeojsonbotao1' type='button' value='{{{aplica}}}' />
10 10 \ No newline at end of file
... ...
ferramentas/conectargeorss/exec.php
... ... @@ -18,18 +18,23 @@ Adiciona um tema baseado em um RSS.
18 18 copiaSeguranca($map_file);
19 19 $m = new Mapa($map_file);
20 20 $retorno = $m->adicionaTemaGeoRSS($servico,$dir_tmp,$locaplic,$canal);
21   - if ($retorno != "erro")
22   - {$m->salva();$_SESSION["contadorsalva"]++;redesenhaMapa();}
  21 + if ($retorno != "erro"){
  22 + $m->salva();
  23 + $_SESSION["contadorsalva"]++;
  24 + redesenhaMapa();
  25 + }
23 26 else{
24 27 $retorno = "erro.Nenhum dado espacializado foi encontrado.";
25 28 }
26 29 break;
27 30 }
28 31 if (!connection_aborted()){
29   - if(isset($map_file) && isset($postgis_mapa) && $map_file != "")
30   - restauraCon($map_file,$postgis_mapa);
  32 + if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){
  33 + restauraCon($map_file,$postgis_mapa);
  34 + }
31 35 cpjson($retorno);
32 36 }
33   -else
34   -{exit();}
  37 +else{
  38 + exit;
  39 +}
35 40 ?>
36 41 \ No newline at end of file
... ...