Commit 3909880f56a2d939155ca10dcebfd33f4db9408c
1 parent
5d2a8aba
Exists in
master
Correção nas funções WMS do i3Geo para obtenção de atributos e da legenda
Showing
2 changed files
with
12 additions
and
12 deletions
Show diff stats
classesphp/classe_atributos.php
@@ -2173,12 +2173,12 @@ class Atributos | @@ -2173,12 +2173,12 @@ class Atributos | ||
2173 | } | 2173 | } |
2174 | $res = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,$formatoinfo); | 2174 | $res = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,$formatoinfo); |
2175 | $res = str_replace("INFOFORMAT","INFO_FORMAT",$res); | 2175 | $res = str_replace("INFOFORMAT","INFO_FORMAT",$res); |
2176 | - $res2 = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,"MIME"); | 2176 | + $res2 = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,"text/html"); |
2177 | $res2 = str_replace("INFOFORMAT","INFO_FORMAT",$res2); | 2177 | $res2 = str_replace("INFOFORMAT","INFO_FORMAT",$res2); |
2178 | - $resposta = file($res); | ||
2179 | $n = array(); | 2178 | $n = array(); |
2180 | if(strtoupper($formatoinfo) != "TEXT/HTML" && strtoupper($formatoinfo) != "MIME"){ | 2179 | if(strtoupper($formatoinfo) != "TEXT/HTML" && strtoupper($formatoinfo) != "MIME"){ |
2181 | - foreach($resposta as $r){ | 2180 | + $resposta = file($res); |
2181 | + foreach($resposta as $r){ | ||
2182 | $t = explode("=",$r); | 2182 | $t = explode("=",$r); |
2183 | if(count($t) > 1){ | 2183 | if(count($t) > 1){ |
2184 | $v = str_replace("\\n","",$t[1]); | 2184 | $v = str_replace("\\n","",$t[1]); |
@@ -2212,15 +2212,15 @@ class Atributos | @@ -2212,15 +2212,15 @@ class Atributos | ||
2212 | } | 2212 | } |
2213 | } | 2213 | } |
2214 | $id = nomeRandomico(); | 2214 | $id = nomeRandomico(); |
2215 | - if(count($n) == 0 && strtoupper($formatoinfo) != "TEXT/HTML"){ | ||
2216 | - $formatoinfo = "MIME"; | ||
2217 | - } | ||
2218 | - if(strtoupper($formatoinfo) == "TEXT/HTML" && $res != ""){ | ||
2219 | - $n[] = array("alias"=>"","valor"=>"<iframe width=250px id='".$id."' name='".$id."' src='".$res."'></iframe>","link"=>"","img"=>""); | ||
2220 | - } | ||
2221 | - if(strtoupper($formatoinfo) == "MIME" && $res2 != ""){ | 2215 | + //if(count($n) == 0 && strtoupper($formatoinfo) != "TEXT/HTML"){ |
2216 | + // $formatoinfo = "MIME"; | ||
2217 | + //} | ||
2218 | + //if(strtoupper($formatoinfo) == "TEXT/HTML" && $res != ""){ | ||
2219 | + //$n[] = array("alias"=>"","valor"=>"<iframe width=250px id='".$id."' name='".$id."' src='".$res."'></iframe>","link"=>"","img"=>""); | ||
2220 | + //} | ||
2221 | + //if(strtoupper($formatoinfo) == "MIME" && $res2 != ""){ | ||
2222 | $n[] = array("alias"=>"","valor"=>"<iframe width=250px id='".$id."' name='".$id."' src='".$res2."'></iframe>","link"=>"","img"=>""); | 2222 | $n[] = array("alias"=>"","valor"=>"<iframe width=250px id='".$id."' name='".$id."' src='".$res2."'></iframe>","link"=>"","img"=>""); |
2223 | - } | 2223 | + //} |
2224 | if($res != ""){ | 2224 | if($res != ""){ |
2225 | $n[] = array("alias"=>"Link WMS","valor"=>"getfeatureinfo ".$formatoinfo,"link"=>$res,"img"=>"","idIframe"=>$id); | 2225 | $n[] = array("alias"=>"Link WMS","valor"=>"getfeatureinfo ".$formatoinfo,"link"=>$res,"img"=>"","idIframe"=>$id); |
2226 | } | 2226 | } |
classesphp/classe_mapa.php
@@ -1627,7 +1627,7 @@ class Mapa | @@ -1627,7 +1627,7 @@ class Mapa | ||
1627 | } | 1627 | } |
1628 | else | 1628 | else |
1629 | { | 1629 | { |
1630 | - $urllegenda = $servico."&service=wms&request=getlegendgraphic&version=".$versao."&service=wms&layer=".$tema."&format=".$im; | 1630 | + $urllegenda = $servico."&request=getlegendgraphic&version=".$versao."&service=wms&layer=".$tema."&format=".$im; |
1631 | $layer->setmetadata("legendawms",$urllegenda); | 1631 | $layer->setmetadata("legendawms",$urllegenda); |
1632 | } | 1632 | } |
1633 | $layer->setmetadata("wms_format",$im); | 1633 | $layer->setmetadata("wms_format",$im); |