Commit 579e190fc1918d3071fe01df2aa91185ac451351
1 parent
fb073958
Exists in
master
Correção na função de criação de layers do tipo anotação para evitar o uso de op…
…acity 100, que estava gerando erro nas versões mais novas do Mapserer
Showing
49 changed files
with
20 additions
and
8 deletions
Show diff stats
classesphp/classe_mapa.php
... | ... | @@ -281,7 +281,9 @@ class Mapa |
281 | 281 | "numclasses", |
282 | 282 | "id_medida_variavel", |
283 | 283 | "codigo_tipo_regiao", |
284 | - "utfgrid" | |
284 | + "utfgrid", | |
285 | + "maxscaledenom", | |
286 | + "minscaledenom" | |
285 | 287 | ); |
286 | 288 | foreach ($this->layers as $oLayer){ |
287 | 289 | $sel = "nao"; |
... | ... | @@ -525,7 +527,9 @@ class Mapa |
525 | 527 | $oLayer->numclasses, |
526 | 528 | $oLayer->getmetadata("METAESTAT_ID_MEDIDA_VARIAVEL"), |
527 | 529 | $oLayer->getmetadata("METAESTAT_CODIGO_TIPO_REGIAO"), |
528 | - $utfgrid | |
530 | + $utfgrid, | |
531 | + $oLayer->maxscaledenom, | |
532 | + $oLayer->minscaledenom | |
529 | 533 | ); |
530 | 534 | } |
531 | 535 | } | ... | ... |
classesphp/classe_metaestatinfo.php
... | ... | @@ -545,7 +545,7 @@ class MetaestatInfo{ |
545 | 545 | * @param faz o cache do mapfile |
546 | 546 | * @return array("mapfile"=>,"layer"=>,"titulolayer"=>) |
547 | 547 | */ |
548 | - function mapfileMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0,$tipolayer="polygon",$titulolayer="",$id_classificacao="",$agruparpor="",$codigo_tipo_regiao="",$opacidade="",$suportaWMST=false,$cachemapfile=true){ | |
548 | + function mapfileMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0,$tipolayer="polygon",$titulolayer="",$id_classificacao="",$agruparpor="",$codigo_tipo_regiao="",$opacidade="",$suportaWMST=false,$cachemapfile=true,$nomeTemp=""){ | |
549 | 549 | //para permitir a inclusao de filtros, o fim do sql e marcado com /*FW*//*FW*/ |
550 | 550 | //indicando onde deve comecar e terminar uma possivel clausula where |
551 | 551 | //ou com /*FA*//*FA*/ |
... | ... | @@ -557,7 +557,13 @@ class MetaestatInfo{ |
557 | 557 | if($cachemapfile == false){ |
558 | 558 | $this->nomecache = $this->nomecache . $this->nomeRandomico(5); |
559 | 559 | } |
560 | - $arq = $this->dir_tmp."/".$this->nomecache.".map"; | |
560 | + if($nomeTemp == ""){ | |
561 | + $arq = $this->dir_tmp."/".$this->nomecache.".map"; | |
562 | + $nomeDoLayer = $this->nomecache; | |
563 | + } else { | |
564 | + $arq = $nomeTemp; | |
565 | + $nomeDoLayer = str_replace(".map","",basename($nomeTemp)); | |
566 | + } | |
561 | 567 | //error_log("-- "); |
562 | 568 | //error_log("--xxxxxxxxxxx---- nomecache: ".$arq); |
563 | 569 | if(!file_exists($arq)){ |
... | ... | @@ -699,7 +705,7 @@ class MetaestatInfo{ |
699 | 705 | } |
700 | 706 | } |
701 | 707 | $dados[] = "LAYER"; |
702 | - $dados[] = ' NAME "'.$this->nomecache.'"'; | |
708 | + $dados[] = ' NAME "'.$nomeDoLayer.'"'; | |
703 | 709 | $dados[] = " TYPE $tipolayer"; |
704 | 710 | $dados[] = ' DATA "'.$sqlf.'"'; |
705 | 711 | //$dados[] = ' CONNECTION "'.$conexao.'"'; |
... | ... | @@ -793,7 +799,7 @@ class MetaestatInfo{ |
793 | 799 | } |
794 | 800 | } |
795 | 801 | |
796 | - return array("mapfile"=>$arq,"layer"=>$this->nomecache,"titulolayer"=>$titulolayer); | |
802 | + return array("mapfile"=>$arq,"layer"=>$nomeDoLayer,"titulolayer"=>$titulolayer); | |
797 | 803 | } |
798 | 804 | /** |
799 | 805 | * Cria um mapfile para visualizacao de regioes | ... | ... |
classesphp/classe_temas.php
... | ... | @@ -914,7 +914,7 @@ $wkt - boolean indicando se $xy e um WKT |
914 | 914 | $pinlayer->setmetadata("TEMA",$texto); |
915 | 915 | $pinlayer->setmetadata("tiles","nao"); |
916 | 916 | $pinlayer->set("type",MS_LAYER_POINT); |
917 | - $pinlayer->set("opacity","100"); | |
917 | + //$pinlayer->set("opacity","100"); | |
918 | 918 | break; |
919 | 919 | } |
920 | 920 | } | ... | ... |
classesphp/mapa_controle.php
... | ... | @@ -267,6 +267,7 @@ include_once ("classe_estatistica.php"); |
267 | 267 | $protocolo = explode("/", $_SERVER['SERVER_PROTOCOL']); |
268 | 268 | $protocolo = strtolower($protocolo[0]) . '://' . $_SERVER['HTTP_HOST']; // $_SERVER['SERVER_NAME'] .":". $_SERVER['SERVER_PORT']; |
269 | 269 | $urli3geo = str_replace("/classesphp/mapa_controle.php", "", $protocolo . $_SERVER["PHP_SELF"]); |
270 | + | |
270 | 271 | // |
271 | 272 | // inserido na versão 4.6 |
272 | 273 | // |
... | ... | @@ -276,13 +277,13 @@ if (! isset($locaplic)) { |
276 | 277 | // |
277 | 278 | // substitui a string de conexão |
278 | 279 | // |
279 | - | |
280 | 280 | if ($funcao != "recuperamapa" && $funcao != "TEMA2SLD") { |
281 | 281 | if (! substituiCon($map_file, $postgis_mapa)) { |
282 | 282 | cpjson("erro", $cp); |
283 | 283 | return; |
284 | 284 | } |
285 | 285 | } |
286 | + | |
286 | 287 | // |
287 | 288 | // faz a busca da função que deve ser executada |
288 | 289 | // |
... | ... | @@ -1070,6 +1071,7 @@ switch (strtoupper($funcao)) { |
1070 | 1071 | * <Temas->insereFeature> |
1071 | 1072 | */ |
1072 | 1073 | case "INSEREFEATURE": |
1074 | + | |
1073 | 1075 | include_once ("classe_temas.php"); |
1074 | 1076 | copiaSeguranca($map_file); |
1075 | 1077 | $m = new Temas($map_file, ""); | ... | ... |