Commit 75c44476f9b61d9150abd0461067524295a321ad

Authored by Edmar Moretti
1 parent 36ad3601

Correção nas funções WMS do i3Geo para obtenção de atributos e da legenda

classesphp/classe_atributos.php
... ... @@ -2173,12 +2173,12 @@ class Atributos
2173 2173 }
2174 2174 $res = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,$formatoinfo);
2175 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 2177 $res2 = str_replace("INFOFORMAT","INFO_FORMAT",$res2);
2178   - $resposta = file($res);
2179 2178 $n = array();
2180 2179 if(strtoupper($formatoinfo) != "TEXT/HTML" && strtoupper($formatoinfo) != "MIME"){
2181   - foreach($resposta as $r){
  2180 + $resposta = file($res);
  2181 + foreach($resposta as $r){
2182 2182 $t = explode("=",$r);
2183 2183 if(count($t) > 1){
2184 2184 $v = str_replace("\\n","",$t[1]);
... ... @@ -2212,15 +2212,15 @@ class Atributos
2212 2212 }
2213 2213 }
2214 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 2222 $n[] = array("alias"=>"","valor"=>"<iframe width=250px id='".$id."' name='".$id."' src='".$res2."'></iframe>","link"=>"","img"=>"");
2223   - }
  2223 + //}
2224 2224 if($res != ""){
2225 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 1627 }
1628 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 1631 $layer->setmetadata("legendawms",$urllegenda);
1632 1632 }
1633 1633 $layer->setmetadata("wms_format",$im);
... ...