From 04ab8e04b9ec623712f363b70c6183cc5056bb38 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sat, 7 Aug 2010 23:01:11 +0000 Subject: [PATCH] Correção da ferramenta imprimir na interface OpenLayers --- aplicmap/geral1.map | 1 + aplicmap/geral1windows.map | 1 + ferramentas/imprimir/a4lpaisagempdf.php | 10 +++++++++- ferramentas/imprimir/aggpng.php | 2 ++ ferramentas/imprimir/geotif.php | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/aplicmap/geral1.map b/aplicmap/geral1.map index 7da1ad4..aaf0d2e 100644 --- a/aplicmap/geral1.map +++ b/aplicmap/geral1.map @@ -44,6 +44,7 @@ MAP FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=256" + FORMATOPTION "INTERLACE=OFF" END OUTPUTFORMAT diff --git a/aplicmap/geral1windows.map b/aplicmap/geral1windows.map index 3e7bff2..4dbdb89 100644 --- a/aplicmap/geral1windows.map +++ b/aplicmap/geral1windows.map @@ -39,6 +39,7 @@ MAP FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=256" + FORMATOPTION "INTERLACE=OFF" END OUTPUTFORMAT diff --git a/ferramentas/imprimir/a4lpaisagempdf.php b/ferramentas/imprimir/a4lpaisagempdf.php index 708429d..8bfd8d6 100644 --- a/ferramentas/imprimir/a4lpaisagempdf.php +++ b/ferramentas/imprimir/a4lpaisagempdf.php @@ -33,11 +33,18 @@ if (array_search( "MapScript", $exts) != TRUE) } require("../../classesphp/funcoes_gerais.php"); $nomes = nomeRandomico(); +// +//substitui a string de conexão com o banco em cada layer se for necessário +// substituiCon($map_file,$postgis_mapa); $map = ms_newMapObj($map_file); + $w = $map->width; $h = $map->height; +// +//modifica o nome das classes em cada layer para que a legenda do mapa fique correta +// $temas = $map->getalllayernames(); foreach ($temas as $tema) { @@ -60,8 +67,9 @@ if($interface == "openlayers"){ } $legenda = $map->legend; $legenda->set("status",MS_EMBED); + $o = $map->outputformat; + $o->set("imagemode",MS_IMAGEMODE_RGB); } - $imgo = $map->draw(); $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; $imgo->saveImage($nomer); diff --git a/ferramentas/imprimir/aggpng.php b/ferramentas/imprimir/aggpng.php index 2f5239a..ee53893 100644 --- a/ferramentas/imprimir/aggpng.php +++ b/ferramentas/imprimir/aggpng.php @@ -85,6 +85,8 @@ if($interface == "openlayers"){ } $legenda = $map->legend; $legenda->set("status",MS_EMBED); + $o = $map->outputformat; + $o->set("imagemode",MS_IMAGEMODE_RGB); } $imgo = $map->draw(); $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; diff --git a/ferramentas/imprimir/geotif.php b/ferramentas/imprimir/geotif.php index c18395b..a73a58f 100644 --- a/ferramentas/imprimir/geotif.php +++ b/ferramentas/imprimir/geotif.php @@ -86,6 +86,8 @@ if($interface == "openlayers"){ $legenda = $map->legend; $legenda->set("status",MS_EMBED); + $o = $map->outputformat; + $o->set("imagemode",MS_IMAGEMODE_RGB); } -- libgit2 0.21.2