Commit 04ab8e04b9ec623712f363b70c6183cc5056bb38
1 parent
b97a70d1
Exists in
master
and in
7 other branches
Correção da ferramenta imprimir na interface OpenLayers
Showing
5 changed files
with
15 additions
and
1 deletions
Show diff stats
aplicmap/geral1.map
| @@ -44,6 +44,7 @@ MAP | @@ -44,6 +44,7 @@ MAP | ||
| 44 | FORMATOPTION "QUANTIZE_FORCE=ON" | 44 | FORMATOPTION "QUANTIZE_FORCE=ON" |
| 45 | FORMATOPTION "QUANTIZE_DITHER=OFF" | 45 | FORMATOPTION "QUANTIZE_DITHER=OFF" |
| 46 | FORMATOPTION "QUANTIZE_COLORS=256" | 46 | FORMATOPTION "QUANTIZE_COLORS=256" |
| 47 | + FORMATOPTION "INTERLACE=OFF" | ||
| 47 | END | 48 | END |
| 48 | 49 | ||
| 49 | OUTPUTFORMAT | 50 | OUTPUTFORMAT |
aplicmap/geral1windows.map
| @@ -39,6 +39,7 @@ MAP | @@ -39,6 +39,7 @@ MAP | ||
| 39 | FORMATOPTION "QUANTIZE_FORCE=ON" | 39 | FORMATOPTION "QUANTIZE_FORCE=ON" |
| 40 | FORMATOPTION "QUANTIZE_DITHER=OFF" | 40 | FORMATOPTION "QUANTIZE_DITHER=OFF" |
| 41 | FORMATOPTION "QUANTIZE_COLORS=256" | 41 | FORMATOPTION "QUANTIZE_COLORS=256" |
| 42 | + FORMATOPTION "INTERLACE=OFF" | ||
| 42 | END | 43 | END |
| 43 | 44 | ||
| 44 | OUTPUTFORMAT | 45 | OUTPUTFORMAT |
ferramentas/imprimir/a4lpaisagempdf.php
| @@ -33,11 +33,18 @@ if (array_search( "MapScript", $exts) != TRUE) | @@ -33,11 +33,18 @@ if (array_search( "MapScript", $exts) != TRUE) | ||
| 33 | } | 33 | } |
| 34 | require("../../classesphp/funcoes_gerais.php"); | 34 | require("../../classesphp/funcoes_gerais.php"); |
| 35 | $nomes = nomeRandomico(); | 35 | $nomes = nomeRandomico(); |
| 36 | +// | ||
| 37 | +//substitui a string de conexão com o banco em cada layer se for necessário | ||
| 38 | +// | ||
| 36 | substituiCon($map_file,$postgis_mapa); | 39 | substituiCon($map_file,$postgis_mapa); |
| 37 | $map = ms_newMapObj($map_file); | 40 | $map = ms_newMapObj($map_file); |
| 41 | + | ||
| 38 | $w = $map->width; | 42 | $w = $map->width; |
| 39 | $h = $map->height; | 43 | $h = $map->height; |
| 40 | 44 | ||
| 45 | +// | ||
| 46 | +//modifica o nome das classes em cada layer para que a legenda do mapa fique correta | ||
| 47 | +// | ||
| 41 | $temas = $map->getalllayernames(); | 48 | $temas = $map->getalllayernames(); |
| 42 | foreach ($temas as $tema) | 49 | foreach ($temas as $tema) |
| 43 | { | 50 | { |
| @@ -60,8 +67,9 @@ if($interface == "openlayers"){ | @@ -60,8 +67,9 @@ if($interface == "openlayers"){ | ||
| 60 | } | 67 | } |
| 61 | $legenda = $map->legend; | 68 | $legenda = $map->legend; |
| 62 | $legenda->set("status",MS_EMBED); | 69 | $legenda->set("status",MS_EMBED); |
| 70 | + $o = $map->outputformat; | ||
| 71 | + $o->set("imagemode",MS_IMAGEMODE_RGB); | ||
| 63 | } | 72 | } |
| 64 | - | ||
| 65 | $imgo = $map->draw(); | 73 | $imgo = $map->draw(); |
| 66 | $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; | 74 | $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; |
| 67 | $imgo->saveImage($nomer); | 75 | $imgo->saveImage($nomer); |
ferramentas/imprimir/aggpng.php
| @@ -85,6 +85,8 @@ if($interface == "openlayers"){ | @@ -85,6 +85,8 @@ if($interface == "openlayers"){ | ||
| 85 | } | 85 | } |
| 86 | $legenda = $map->legend; | 86 | $legenda = $map->legend; |
| 87 | $legenda->set("status",MS_EMBED); | 87 | $legenda->set("status",MS_EMBED); |
| 88 | + $o = $map->outputformat; | ||
| 89 | + $o->set("imagemode",MS_IMAGEMODE_RGB); | ||
| 88 | } | 90 | } |
| 89 | $imgo = $map->draw(); | 91 | $imgo = $map->draw(); |
| 90 | $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; | 92 | $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; |
ferramentas/imprimir/geotif.php
| @@ -86,6 +86,8 @@ if($interface == "openlayers"){ | @@ -86,6 +86,8 @@ if($interface == "openlayers"){ | ||
| 86 | 86 | ||
| 87 | $legenda = $map->legend; | 87 | $legenda = $map->legend; |
| 88 | $legenda->set("status",MS_EMBED); | 88 | $legenda->set("status",MS_EMBED); |
| 89 | + $o = $map->outputformat; | ||
| 90 | + $o->set("imagemode",MS_IMAGEMODE_RGB); | ||
| 89 | } | 91 | } |
| 90 | 92 | ||
| 91 | 93 |