Commit 27ab0e5b14af6627fcac0668c003495f7633c899
1 parent
332a8849
Exists in
master
and in
7 other branches
atualização do código do mapa_controle.php
Showing
2 changed files
with
14 additions
and
6 deletions
Show diff stats
ogc.php
| ... | ... | @@ -371,7 +371,9 @@ $cortePixels = 0; |
| 371 | 371 | $ogcwsmap = $_GET["ogcwsmap"]; |
| 372 | 372 | |
| 373 | 373 | if(file_exists($nomeMapfileTmp) && $tipo == ""){ |
| 374 | + substituiCon($nomeMapfileTmp,$postgis_mapa); | |
| 374 | 375 | $oMap = ms_newMapobj($nomeMapfileTmp); |
| 376 | + restauraCon($nomeMapfileTmp,$postgis_mapa); | |
| 375 | 377 | } |
| 376 | 378 | else{ |
| 377 | 379 | if(empty($ogcwsmap)){ |
| ... | ... | @@ -459,7 +461,7 @@ else{ |
| 459 | 461 | } |
| 460 | 462 | else{ |
| 461 | 463 | $ts = explode(",",str_replace(" ",",",$layers)); |
| 462 | - } | |
| 464 | + } | |
| 463 | 465 | foreach ($ts as $t){ |
| 464 | 466 | $l = $nmap->getlayerbyname($t); |
| 465 | 467 | if($l == ""){ |
| ... | ... | @@ -526,8 +528,10 @@ else{ |
| 526 | 528 | } |
| 527 | 529 | } |
| 528 | 530 | } |
| 529 | - } | |
| 530 | - autoClasses($l,$oMap); | |
| 531 | + } | |
| 532 | + | |
| 533 | + autoClasses($l,$oMap); | |
| 534 | + | |
| 531 | 535 | if($versao > 5){ |
| 532 | 536 | $pr = $l->getProcessing(); |
| 533 | 537 | if(!in_array("LABEL_NO_CLIP=True",$pr)){ |
| ... | ... | @@ -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 | 689 | foreach($codigosTema as $c){ |
| 685 | 690 | $codigoTema = $c["tema"]; |
| 686 | 691 | if(file_exists($locaplic."/temas/".$codigoTema.".map")){ |
| ... | ... | @@ -737,6 +742,7 @@ else{ |
| 737 | 742 | } |
| 738 | 743 | } |
| 739 | 744 | } |
| 745 | + | |
| 740 | 746 | // |
| 741 | 747 | //a imagem do mapa recebera a legenda |
| 742 | 748 | // |
| ... | ... | @@ -756,10 +762,12 @@ else{ |
| 756 | 762 | processaOutputformatMapfile(); |
| 757 | 763 | $nomeMapfileTmp = str_replace(".map","",$nomeMapfileTmp).".map"; |
| 758 | 764 | $oMap->save($nomeMapfileTmp); |
| 759 | - | |
| 760 | 765 | validaAcessoTemas($nomeMapfileTmp,true); |
| 761 | 766 | |
| 767 | + | |
| 768 | + substituiCon($nomeMapfileTmp,$postgis_mapa); | |
| 762 | 769 | $oMap = ms_newMapobj($nomeMapfileTmp); |
| 770 | + restauraCon($nomeMapfileTmp,$postgis_mapa); | |
| 763 | 771 | } |
| 764 | 772 | |
| 765 | 773 | if(ob_get_contents ()){ | ... | ... |
temas/_lbairros.map
| ... | ... | @@ -6,7 +6,7 @@ MAP |
| 6 | 6 | CONNECTIONTYPE POSTGIS |
| 7 | 7 | DATA "the_geom from (select gid, st_setsrid(the_geom,4326) as the_geom,co_bairro,no_bairro,no_distr,no_municip from i3geo_metaestat.bairros /*FW*//*FW*/) as foo using unique co_bairro using srid=4326" |
| 8 | 8 | METADATA |
| 9 | - "cache" "SIM" | |
| 9 | + "cache" "nao" | |
| 10 | 10 | "TIP" "no_bairro" |
| 11 | 11 | "CLASSE" "SIM" |
| 12 | 12 | "iconetema" "" | ... | ... |