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
aplicmap/geral1windows.map
ferramentas/imprimir/a4lpaisagempdf.php
| ... | ... | @@ -33,11 +33,18 @@ if (array_search( "MapScript", $exts) != TRUE) |
| 33 | 33 | } |
| 34 | 34 | require("../../classesphp/funcoes_gerais.php"); |
| 35 | 35 | $nomes = nomeRandomico(); |
| 36 | +// | |
| 37 | +//substitui a string de conexão com o banco em cada layer se for necessário | |
| 38 | +// | |
| 36 | 39 | substituiCon($map_file,$postgis_mapa); |
| 37 | 40 | $map = ms_newMapObj($map_file); |
| 41 | + | |
| 38 | 42 | $w = $map->width; |
| 39 | 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 | 48 | $temas = $map->getalllayernames(); |
| 42 | 49 | foreach ($temas as $tema) |
| 43 | 50 | { |
| ... | ... | @@ -60,8 +67,9 @@ if($interface == "openlayers"){ |
| 60 | 67 | } |
| 61 | 68 | $legenda = $map->legend; |
| 62 | 69 | $legenda->set("status",MS_EMBED); |
| 70 | + $o = $map->outputformat; | |
| 71 | + $o->set("imagemode",MS_IMAGEMODE_RGB); | |
| 63 | 72 | } |
| 64 | - | |
| 65 | 73 | $imgo = $map->draw(); |
| 66 | 74 | $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; |
| 67 | 75 | $imgo->saveImage($nomer); | ... | ... |
ferramentas/imprimir/aggpng.php
| ... | ... | @@ -85,6 +85,8 @@ if($interface == "openlayers"){ |
| 85 | 85 | } |
| 86 | 86 | $legenda = $map->legend; |
| 87 | 87 | $legenda->set("status",MS_EMBED); |
| 88 | + $o = $map->outputformat; | |
| 89 | + $o->set("imagemode",MS_IMAGEMODE_RGB); | |
| 88 | 90 | } |
| 89 | 91 | $imgo = $map->draw(); |
| 90 | 92 | $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; | ... | ... |
ferramentas/imprimir/geotif.php