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