Commit 2d29277f8d8e54154cfcb0404655ee3e08f334df
1 parent
76ee3557
Exists in
master
and in
6 other branches
Correção na função identifica para evitar executar getfeatureinfo com formato ht…
…ml quando o serviço não suporta esse tipo de requisição
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
classesphp/classe_atributos.php
| ... | ... | @@ -2151,6 +2151,7 @@ class Atributos |
| 2151 | 2151 | $ptimg = xy2imagem($map_file,array($x,$y),$mapa); |
| 2152 | 2152 | //$formatoinfo = "MIME"; |
| 2153 | 2153 | $formatosinfo = $layer->getmetadata("formatosinfo"); |
| 2154 | + $formatosinfohtml = false; | |
| 2154 | 2155 | if ($formatosinfo != ""){ |
| 2155 | 2156 | $formatosinfo = explode(",",$formatosinfo); |
| 2156 | 2157 | if ($formatosinfo[0] != ""){ |
| ... | ... | @@ -2160,6 +2161,9 @@ class Atributos |
| 2160 | 2161 | if(strtoupper($f) == "TEXT/PLAIN"){ |
| 2161 | 2162 | $formatoinfo = "text/plain"; |
| 2162 | 2163 | } |
| 2164 | + if(strtoupper($f) == "TEXT/HTML"){ | |
| 2165 | + $formatosinfohtml = true; | |
| 2166 | + } | |
| 2163 | 2167 | } |
| 2164 | 2168 | } |
| 2165 | 2169 | else{ |
| ... | ... | @@ -2218,9 +2222,9 @@ class Atributos |
| 2218 | 2222 | //if(strtoupper($formatoinfo) == "TEXT/HTML" && $res != ""){ |
| 2219 | 2223 | //$n[] = array("alias"=>"","valor"=>"<iframe width=250px id='".$id."' name='".$id."' src='".$res."'></iframe>","link"=>"","img"=>""); |
| 2220 | 2224 | //} |
| 2221 | - //if(strtoupper($formatoinfo) == "MIME" && $res2 != ""){ | |
| 2225 | + if($formatosinfohtml == true){ | |
| 2222 | 2226 | $n[] = array("alias"=>"","valor"=>"<iframe width=250px id='".$id."' name='".$id."' src='".$res2."'></iframe>","link"=>"","img"=>""); |
| 2223 | - //} | |
| 2227 | + } | |
| 2224 | 2228 | if($res != ""){ |
| 2225 | 2229 | $n[] = array("alias"=>"Link WMS","valor"=>"getfeatureinfo ".$formatoinfo,"link"=>$res,"img"=>"","idIframe"=>$id); |
| 2226 | 2230 | } | ... | ... |