Commit e4846c9c3fbc3a854865bac6640f1c194f448c7a
1 parent
70571e01
Exists in
master
--no commit message
Showing
6 changed files
with
39 additions
and
30 deletions
Show diff stats
classesphp/classe_mapa.php
@@ -1130,7 +1130,7 @@ class Mapa | @@ -1130,7 +1130,7 @@ class Mapa | ||
1130 | $cor->setrgb($corlinha[0],$corlinha[1],$corlinha[2]); | 1130 | $cor->setrgb($corlinha[0],$corlinha[1],$corlinha[2]); |
1131 | } | 1131 | } |
1132 | if($incluitexto == "sim"){ | 1132 | if($incluitexto == "sim"){ |
1133 | - if($this->vi >= 60200){ | 1133 | + if($this->vi >= 60300){ |
1134 | //$classe->addLabel(new labelObj()); | 1134 | //$classe->addLabel(new labelObj()); |
1135 | //$label = $classe->getLabel(0); | 1135 | //$label = $classe->getLabel(0); |
1136 | $s = "CLASS LABEL END END"; | 1136 | $s = "CLASS LABEL END END"; |
@@ -1918,26 +1918,32 @@ class Mapa | @@ -1918,26 +1918,32 @@ class Mapa | ||
1918 | $xml = simplexml_load_file($servico); | 1918 | $xml = simplexml_load_file($servico); |
1919 | $conta = 0; | 1919 | $conta = 0; |
1920 | foreach($xml->channel as $c){ | 1920 | foreach($xml->channel as $c){ |
1921 | - if ($conta == $canal) | ||
1922 | - { | 1921 | + if ($conta == $canal){ |
1923 | $canal = $c; | 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 | $resultado = array(); | 1935 | $resultado = array(); |
1927 | $tipog = ""; | 1936 | $tipog = ""; |
1928 | - foreach ($canal->item as $item){ | 1937 | + foreach ($nos as $item){ |
1929 | $env = array(); | 1938 | $env = array(); |
1930 | //define o tipo | 1939 | //define o tipo |
1931 | - if ($item->xpath('geo:lat')) | ||
1932 | - { | 1940 | + if ($item->xpath('geo:lat')){ |
1933 | $tipog = "geo"; | 1941 | $tipog = "geo"; |
1934 | } | 1942 | } |
1935 | - if ($item->xpath('georss:point')) | ||
1936 | - { | 1943 | + if ($item->xpath('georss:point')){ |
1937 | $tipog = "georsspoint"; | 1944 | $tipog = "georsspoint"; |
1938 | } | 1945 | } |
1939 | - if ($item->xpath('georss:where')) | ||
1940 | - { | 1946 | + if ($item->xpath('georss:where')){ |
1941 | $tipog = "envelope"; | 1947 | $tipog = "envelope"; |
1942 | } | 1948 | } |
1943 | if ($tipog == "envelope"){ | 1949 | if ($tipog == "envelope"){ |
@@ -1981,7 +1987,7 @@ class Mapa | @@ -1981,7 +1987,7 @@ class Mapa | ||
1981 | { | 1987 | { |
1982 | //$temp = $item->xpath('georss:point'); | 1988 | //$temp = $item->xpath('georss:point'); |
1983 | $temp = (string) $item->children('georss', TRUE)->point; | 1989 | $temp = (string) $item->children('georss', TRUE)->point; |
1984 | - $env = array( explode(" ",$temp) ); | 1990 | + $env = ( explode(" ",$temp) ); |
1985 | } | 1991 | } |
1986 | if (count($env) > 0){ | 1992 | if (count($env) > 0){ |
1987 | $resultado[] = array(ixml($item,"title"),ixml($item,"link"),ixml($item,"description"),ixml($item,"category"),$env); | 1993 | $resultado[] = array(ixml($item,"title"),ixml($item,"link"),ixml($item,"description"),ixml($item,"category"),$env); |
@@ -2006,12 +2012,11 @@ class Mapa | @@ -2006,12 +2012,11 @@ class Mapa | ||
2006 | $def[] = array("LINK","C","254"); | 2012 | $def[] = array("LINK","C","254"); |
2007 | $def[] = array("DESC","C","254"); | 2013 | $def[] = array("DESC","C","254"); |
2008 | $def[] = array("CATEGORIA","C","254"); | 2014 | $def[] = array("CATEGORIA","C","254"); |
2009 | - if(!function_exists(dbase_create)) | ||
2010 | - { | 2015 | + if(!function_exists(dbase_create)){ |
2011 | $db = xbase_create($nomeshp.".dbf", $def);xbase_close($db); | 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 | //acrescenta os pontos no novo shapefile | 2021 | //acrescenta os pontos no novo shapefile |
2017 | $dbname = $nomeshp.".dbf"; | 2022 | $dbname = $nomeshp.".dbf"; |
@@ -2042,6 +2047,7 @@ class Mapa | @@ -2042,6 +2047,7 @@ class Mapa | ||
2042 | $reg = array(); | 2047 | $reg = array(); |
2043 | } | 2048 | } |
2044 | xbase_close($db); | 2049 | xbase_close($db); |
2050 | + | ||
2045 | if ($tipog == "georsspoint" || $tipog == "geo"){ | 2051 | if ($tipog == "georsspoint" || $tipog == "geo"){ |
2046 | $tipol = MS_LAYER_POINT; | 2052 | $tipol = MS_LAYER_POINT; |
2047 | } | 2053 | } |
ferramentas/carregakml/index.js
@@ -56,7 +56,6 @@ i3GEOF.carregakml = { | @@ -56,7 +56,6 @@ i3GEOF.carregakml = { | ||
56 | */ | 56 | */ |
57 | mustacheHash : function() { | 57 | mustacheHash : function() { |
58 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.carregakml.dicionario); | 58 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.carregakml.dicionario); |
59 | - dicionario["digite"] = $trad("o1"); | ||
60 | dicionario["botao"] = $trad("p14"); | 59 | dicionario["botao"] = $trad("p14"); |
61 | return dicionario; | 60 | return dicionario; |
62 | }, | 61 | }, |
@@ -82,7 +81,7 @@ i3GEOF.carregakml = { | @@ -82,7 +81,7 @@ i3GEOF.carregakml = { | ||
82 | combo += "<option value='"+raiz[i].link+"'>"+raiz[i].title+"</option>"; | 81 | combo += "<option value='"+raiz[i].link+"'>"+raiz[i].title+"</option>"; |
83 | } | 82 | } |
84 | combo += "</select>"; | 83 | combo += "</select>"; |
85 | - $i("i3GEOcarregakmlCombo").innerHTML = "<div class=styled-select>"+combo+"</div>"; | 84 | + $i("i3GEOcarregakmlCombo").innerHTML = combo; |
86 | }; | 85 | }; |
87 | i3GEO.php.listaRSSwsARRAY(monta,"KML"); | 86 | i3GEO.php.listaRSSwsARRAY(monta,"KML"); |
88 | b = new YAHOO.widget.Button( | 87 | b = new YAHOO.widget.Button( |
ferramentas/carregakml/template_mst.html
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | </div> | 5 | </div> |
6 | <br> | 6 | <br> |
7 | <br> | 7 | <br> |
8 | -<div id='i3GEOcarregakmlCombo' >{{{digite}}}</div> | ||
9 | -<br> | 8 | +<div id='i3GEOcarregakmlCombo' class='styled-select' ></div> |
10 | <br> | 9 | <br> |
10 | +<p class='paragrafo'> | ||
11 | <input id='i3GEOcarregakmlbotao1' type='button' value='{{{botao}}}' /> | 11 | <input id='i3GEOcarregakmlbotao1' type='button' value='{{{botao}}}' /> |
12 | \ No newline at end of file | 12 | \ No newline at end of file |
ferramentas/conectargeojson/index.js
@@ -56,7 +56,6 @@ i3GEOF.conectargeojson = { | @@ -56,7 +56,6 @@ i3GEOF.conectargeojson = { | ||
56 | */ | 56 | */ |
57 | mustacheHash : function() { | 57 | mustacheHash : function() { |
58 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.conectargeojson.dicionario); | 58 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.conectargeojson.dicionario); |
59 | - dicionario["aguarde"] = $trad("o1"); | ||
60 | dicionario["locaplic"] = i3GEO.configura.locaplic; | 59 | dicionario["locaplic"] = i3GEO.configura.locaplic; |
61 | dicionario["aplica"] = $trad("p14"); | 60 | dicionario["aplica"] = $trad("p14"); |
62 | return dicionario; | 61 | return dicionario; |
@@ -85,7 +84,7 @@ i3GEOF.conectargeojson = { | @@ -85,7 +84,7 @@ i3GEOF.conectargeojson = { | ||
85 | combo += "<option value='"+raiz[i].link+"'>"+raiz[i].title+"</option>"; | 84 | combo += "<option value='"+raiz[i].link+"'>"+raiz[i].title+"</option>"; |
86 | } | 85 | } |
87 | combo += "</select>"; | 86 | combo += "</select>"; |
88 | - $i("i3GEOconectargeojsonCombo").innerHTML = "<div class=styled-select>"+combo+"</div>"; | 87 | + $i("i3GEOconectargeojsonCombo").innerHTML = combo; |
89 | }; | 88 | }; |
90 | i3GEO.php.listaRSSwsARRAY(monta,"GEOJSON"); | 89 | i3GEO.php.listaRSSwsARRAY(monta,"GEOJSON"); |
91 | b = new YAHOO.widget.Button( | 90 | b = new YAHOO.widget.Button( |
ferramentas/conectargeojson/template_mst.html
1 | <p class="paragrafo">{{{insereEndereco}}}</p> | 1 | <p class="paragrafo">{{{insereEndereco}}}</p> |
2 | -<div class="i3geoForm i3geoFormIconeEdita" style="width:350px;"> | 2 | +<div class="i3geoForm i3geoFormIconeEdita"> |
3 | <input id=i3GEOconectargeojsonurl type="text" value="" /> | 3 | <input id=i3GEOconectargeojsonurl type="text" value="" /> |
4 | </div> | 4 | </div> |
5 | <p class=paragrafo > | 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 | <br> | 7 | <br> |
8 | +<p class=paragrafo > | ||
9 | <input id='i3GEOconectargeojsonbotao1' type='button' value='{{{aplica}}}' /> | 9 | <input id='i3GEOconectargeojsonbotao1' type='button' value='{{{aplica}}}' /> |
10 | \ No newline at end of file | 10 | \ No newline at end of file |
ferramentas/conectargeorss/exec.php
@@ -18,18 +18,23 @@ Adiciona um tema baseado em um RSS. | @@ -18,18 +18,23 @@ Adiciona um tema baseado em um RSS. | ||
18 | copiaSeguranca($map_file); | 18 | copiaSeguranca($map_file); |
19 | $m = new Mapa($map_file); | 19 | $m = new Mapa($map_file); |
20 | $retorno = $m->adicionaTemaGeoRSS($servico,$dir_tmp,$locaplic,$canal); | 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 | else{ | 26 | else{ |
24 | $retorno = "erro.Nenhum dado espacializado foi encontrado."; | 27 | $retorno = "erro.Nenhum dado espacializado foi encontrado."; |
25 | } | 28 | } |
26 | break; | 29 | break; |
27 | } | 30 | } |
28 | if (!connection_aborted()){ | 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 | cpjson($retorno); | 35 | cpjson($retorno); |
32 | } | 36 | } |
33 | -else | ||
34 | -{exit();} | 37 | +else{ |
38 | + exit; | ||
39 | +} | ||
35 | ?> | 40 | ?> |
36 | \ No newline at end of file | 41 | \ No newline at end of file |