Commit 9397e611cf60a92d58403d685aa846c4d8a0842f

Authored by Edmar Moretti
1 parent ba1df793
Exists in master

Correção na leitura dos dados do visualizador da INDE, em função de novas camada…

…s inseridas que contem caracteres não previstos no parser
Showing 2 changed files with 15 additions and 12 deletions   Show diff stats
css/geral.css
... ... @@ -154,12 +154,6 @@ Utilizado na janela do buscador INDE
154 154 .olPopupCloseBox {
155 155 margin-top: -2px;
156 156 }
157   -
158   -.i3GEOCabecalhoInfoWindow {
159   - height:16px;
160   - top: -5px;
161   -}
162   -
163 157 .i3GEOarvCat input[type=radio], .i3GEOarvCat input[type=checkbox] {
164 158 display: none;
165 159 }
... ...
ferramentas/vinde/wmsindejson.php
1 1 <?php
  2 +//http://localhost/i3geo/ferramentas/vinde/wmsindejson.php
2 3 include(dirname(__FILE__)."/../../ms_configura.php");
3 4 include(dirname(__FILE__)."/../blacklist.php");
4 5 verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false);
... ... @@ -51,7 +52,7 @@ for ($i=0;$i&lt;$n;$i++){
51 52  
52 53 $pt = "/(new OpenLayers\.Layer\.WMS\(\')(.*)',\s'(.*)',\s{/";
53 54 preg_match_all($pt, $linha, $matches);
54   - $nomeLayer = $matches[2][0];////converte($matches[2][0]);
  55 + $nomeLayer = $matches[2][0];
55 56 $layer[] = $nomeLayer;
56 57 $parametros = array();
57 58 $urlwms = $matches[3][0];
... ... @@ -67,7 +68,8 @@ for ($i=0;$i&lt;$n;$i++){
67 68 $pt = "/($b[0]:\s\')(.*)(\'\, $b[1])/";
68 69 preg_match_all($pt, $linha, $matches);
69 70  
70   - $linhas = ($matches[2][0]);
  71 + $linhas = $matches[2][0];
  72 +
71 73 $parametros[$b[0]] = $linhas;
72 74 if($b[0] == "groupOfKeeper"){
73 75 if(empty($gruposUnicos[$linhas])){
... ... @@ -91,14 +93,21 @@ $chaves = array_keys($grupos);
91 93 sort($chaves);
92 94 $arvore = array();
93 95 foreach($chaves as $chave){
94   - $hs = explode("/",$chave);
  96 + //remove outras /
  97 + $p1 = explode("/",$chave);
  98 + $chave = $p1[0]."||";
  99 + $p1[0] = "";
  100 + $chave = $chave . implode(" ",$p1);
  101 + $hs = explode("||",$chave);
95 102 $d = $hs;
96 103 array_shift($d);
97 104 if(array_key_exists(0,$hs) && array_key_exists($hs[0],$arvore)){
98 105 $arvore[$hs[0]] = array_merge($arvore[$hs[0]],noi($d,$arvore[$hs[0]]));
  106 + //$arvore[$hs[0]] = array_merge($arvore[$hs[0]],$d);
99 107 }
100 108 else{
101 109 $arvore[$hs[0]] = noi($d,array());
  110 + //$arvore[$hs[0]] = $d;
102 111 }
103 112 }
104 113 $final = array(
... ... @@ -106,15 +115,15 @@ $final = array(
106 115 "arvore"=>$arvore
107 116 );
108 117 //teste
109   -$final = json_encode($final);
110   -$final = json_decode($final);
  118 +//$final = json_encode($final);
  119 +//$final = json_decode($final);
111 120  
112 121 //error_reporting(0);
113 122 ob_end_clean();
114 123 if(extension_loaded('zlib')){
115 124 ob_start('ob_gzhandler');
116 125 }
117   -header("Content-type: text/html");
  126 +header("Content-type: application/json");
118 127 echo json_encode($final,true);
119 128 if(extension_loaded('zlib')){
120 129 ob_end_flush();
... ...