Commit 0e33cd37d7ad6063cdd8ec1f94495e88477f1ae3
1 parent
43dc46f5
Exists in
master
atualização do código do mapa_controle.php
Showing
1 changed file
with
13 additions
and
5 deletions
Show diff stats
ogc.php
| @@ -371,7 +371,9 @@ $cortePixels = 0; | @@ -371,7 +371,9 @@ $cortePixels = 0; | ||
| 371 | $ogcwsmap = $_GET["ogcwsmap"]; | 371 | $ogcwsmap = $_GET["ogcwsmap"]; |
| 372 | 372 | ||
| 373 | if(file_exists($nomeMapfileTmp) && $tipo == ""){ | 373 | if(file_exists($nomeMapfileTmp) && $tipo == ""){ |
| 374 | + substituiCon($nomeMapfileTmp,$postgis_mapa); | ||
| 374 | $oMap = ms_newMapobj($nomeMapfileTmp); | 375 | $oMap = ms_newMapobj($nomeMapfileTmp); |
| 376 | + restauraCon($nomeMapfileTmp,$postgis_mapa); | ||
| 375 | } | 377 | } |
| 376 | else{ | 378 | else{ |
| 377 | if(empty($ogcwsmap)){ | 379 | if(empty($ogcwsmap)){ |
| @@ -459,7 +461,7 @@ else{ | @@ -459,7 +461,7 @@ else{ | ||
| 459 | } | 461 | } |
| 460 | else{ | 462 | else{ |
| 461 | $ts = explode(",",str_replace(" ",",",$layers)); | 463 | $ts = explode(",",str_replace(" ",",",$layers)); |
| 462 | - } | 464 | + } |
| 463 | foreach ($ts as $t){ | 465 | foreach ($ts as $t){ |
| 464 | $l = $nmap->getlayerbyname($t); | 466 | $l = $nmap->getlayerbyname($t); |
| 465 | if($l == ""){ | 467 | if($l == ""){ |
| @@ -526,8 +528,10 @@ else{ | @@ -526,8 +528,10 @@ else{ | ||
| 526 | } | 528 | } |
| 527 | } | 529 | } |
| 528 | } | 530 | } |
| 529 | - } | ||
| 530 | - autoClasses($l,$oMap); | 531 | + } |
| 532 | + | ||
| 533 | + autoClasses($l,$oMap); | ||
| 534 | + | ||
| 531 | if($versao > 5){ | 535 | if($versao > 5){ |
| 532 | $pr = $l->getProcessing(); | 536 | $pr = $l->getProcessing(); |
| 533 | if(!in_array("LABEL_NO_CLIP=True",$pr)){ | 537 | if(!in_array("LABEL_NO_CLIP=True",$pr)){ |
| @@ -680,7 +684,8 @@ else{ | @@ -680,7 +684,8 @@ else{ | ||
| 680 | } | 684 | } |
| 681 | } | 685 | } |
| 682 | } | 686 | } |
| 683 | - //echo "<pre>".var_dump($codigosTema);exit; | 687 | + //echo "<pre>".var_dump($codigosTema);exit; |
| 688 | + | ||
| 684 | foreach($codigosTema as $c){ | 689 | foreach($codigosTema as $c){ |
| 685 | $codigoTema = $c["tema"]; | 690 | $codigoTema = $c["tema"]; |
| 686 | if(file_exists($locaplic."/temas/".$codigoTema.".map")){ | 691 | if(file_exists($locaplic."/temas/".$codigoTema.".map")){ |
| @@ -737,6 +742,7 @@ else{ | @@ -737,6 +742,7 @@ else{ | ||
| 737 | } | 742 | } |
| 738 | } | 743 | } |
| 739 | } | 744 | } |
| 745 | + | ||
| 740 | // | 746 | // |
| 741 | //a imagem do mapa recebera a legenda | 747 | //a imagem do mapa recebera a legenda |
| 742 | // | 748 | // |
| @@ -756,10 +762,12 @@ else{ | @@ -756,10 +762,12 @@ else{ | ||
| 756 | processaOutputformatMapfile(); | 762 | processaOutputformatMapfile(); |
| 757 | $nomeMapfileTmp = str_replace(".map","",$nomeMapfileTmp).".map"; | 763 | $nomeMapfileTmp = str_replace(".map","",$nomeMapfileTmp).".map"; |
| 758 | $oMap->save($nomeMapfileTmp); | 764 | $oMap->save($nomeMapfileTmp); |
| 759 | - | ||
| 760 | validaAcessoTemas($nomeMapfileTmp,true); | 765 | validaAcessoTemas($nomeMapfileTmp,true); |
| 761 | 766 | ||
| 767 | + | ||
| 768 | + substituiCon($nomeMapfileTmp,$postgis_mapa); | ||
| 762 | $oMap = ms_newMapobj($nomeMapfileTmp); | 769 | $oMap = ms_newMapobj($nomeMapfileTmp); |
| 770 | + restauraCon($nomeMapfileTmp,$postgis_mapa); | ||
| 763 | } | 771 | } |
| 764 | 772 | ||
| 765 | if(ob_get_contents ()){ | 773 | if(ob_get_contents ()){ |