Commit 10e466dd9ac520985d44bb6cffea59c3ffddbe3a

Authored by Edmar Moretti
1 parent b2c533e5

--no commit message

aplicmap/openlayers.htm
... ... @@ -163,23 +163,14 @@
163 163 <p style='font-size:2px;'>&nbsp;</p>
164 164 <img title="geral" alt="" src="../imagens/branco.gif" id='zoomtot'/>
165 165 </div>
166   -
167   -
168 166 <div style='display:inline;background-color:rgb(250,250,250);'>
169 167 <p style='font-size:2px;'>&nbsp;</p>
170 168 <img title="mede" alt="" src="../imagens/branco.gif" id='mede'/>
171 169 </div>
172   -
173   - <div style='display:inline;background-color:rgb(250,250,250);'>
174   - <p style='font-size:2px;'>&nbsp;</p>
175   - <img title="reinicia" alt="" src="../imagens/branco.gif" id='reinicia'/>
176   - </div>
177   -
178 170 <div style='display:inline;background-color:rgb(250,250,250);'>
179 171 <p style='font-size:2px;'>&nbsp;</p>
180 172 <img title="extensao" alt="" src="../imagens/branco.gif" id='exten'/>
181 173 </div>
182   -
183 174 <div style='display:inline;background-color:rgb(250,250,250);'>
184 175 <p style='font-size:2px;'>&nbsp;</p>
185 176 <img title="insere xy" alt="" src="../imagens/branco.gif" id='inserexy'/>
... ... @@ -194,6 +185,10 @@
194 185  
195 186 </div>
196 187 <div style='display:inline;background-color:rgb(250,250,250);'>
  188 + <p style='font-size:4px;'>&nbsp;</p>
  189 + <img title='imprimir' alt='imprimir' src='../imagens/branco.gif' id='imprimir'/>
  190 + </div>
  191 + <div style='display:inline;background-color:rgb(250,250,250);'>
197 192 <p style='font-size:2px;'>&nbsp;</p>
198 193 <img title="google" alt="" src="../imagens/branco.gif" id='google'/>
199 194 </div>
... ...
ferramentas/imprimir/a4lpaisagempdf.htm
... ... @@ -9,6 +9,6 @@
9 9 </body>
10 10 <script type="text/javascript" >
11 11 var titulo=window.prompt("Digite o título do mapa:")
12   -window.location="a4lpaisagempdf.php?titulo="+titulo
  12 +window.location="a4lpaisagempdf.php?titulo="+titulo+"&interface="+window.opener.i3GEO.Interface.ATUAL+"&mapexten="+window.opener.i3GEO.parametros.mapexten
13 13 </script>
14 14 </html>
15 15 \ No newline at end of file
... ...
ferramentas/imprimir/a4lpaisagempdf.php
... ... @@ -52,6 +52,14 @@ foreach ($temas as $tema)
52 52 }
53 53 }
54 54 }
  55 +if($interface == "openlayers"){
  56 + $ext = explode(" ",$mapexten);
  57 + $extatual = $map->extent;
  58 + $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]);
  59 + $legenda = $map->legend;
  60 + $legenda->set("status",MS_EMBED);
  61 +}
  62 +
55 63 $imgo = $map->draw();
56 64 $nomer = ($imgo->imagepath)."mapa".$nomes.".png";
57 65 $imgo->saveImage($nomer);
... ...
ferramentas/imprimir/aggpng.php
... ... @@ -56,6 +56,9 @@ $map = ms_newMapObj($map_file);
56 56 $temp = str_replace(".map","xxx.map",$map_file);
57 57 $map->save($temp);
58 58 substituiCon($temp,$postgis_mapa);
  59 +$of = $map->outputformat;
  60 +$of->set("driver","AGG/PNG");
  61 +$of->set("imagemode","RGB");
59 62 $map = ms_newMapObj($temp);
60 63 //$legenda =$map->legend;
61 64 //$legenda->set("status",MS_EMBED);
... ... @@ -74,10 +77,13 @@ foreach ($temas as $tema)
74 77 }
75 78 }
76 79 }
77   -$of = $map->outputformat;
78   -$of->set("driver","AGG/PNG");
79   -$of->set("imagemode","RGB");
80   -
  80 +if($interface == "openlayers"){
  81 + $ext = explode(" ",$mapexten);
  82 + $extatual = $map->extent;
  83 + $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]);
  84 + $legenda = $map->legend;
  85 + $legenda->set("status",MS_EMBED);
  86 +}
81 87 $imgo = $map->draw();
82 88 $nomer = ($imgo->imagepath)."mapa".$nomes.".png";
83 89 $imgo->saveImage($nomer);
... ...
ferramentas/imprimir/geotif.php
... ... @@ -56,6 +56,9 @@ $map = ms_newMapObj($map_file);
56 56 $temp = str_replace(".map","xxx.map",$map_file);
57 57 $map->save($temp);
58 58 substituiCon($temp,$postgis_mapa);
  59 +$of = $map->outputformat;
  60 +$of->set("driver","GDAL/GTiff");
  61 +$of->set("imagemode","RGB");
59 62 $map = ms_newMapObj($temp);
60 63 //$legenda =$map->legend;
61 64 //$legenda->set("status",MS_EMBED);
... ... @@ -74,9 +77,14 @@ foreach ($temas as $tema)
74 77 }
75 78 }
76 79 }
77   -$of = $map->outputformat;
78   -$of->set("driver","GDAL/GTiff");
79   -$of->set("imagemode","RGB");
  80 +if($interface == "openlayers"){
  81 + $ext = explode(" ",$mapexten);
  82 + $extatual = $map->extent;
  83 + $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]);
  84 + $legenda = $map->legend;
  85 + $legenda->set("status",MS_EMBED);
  86 +}
  87 +
80 88  
81 89 $imgo = $map->draw();
82 90 $nomer = ($imgo->imagepath)."mapa".$nomes.".tif";
... ...
ferramentas/imprimir/geraimagens.php
... ... @@ -56,6 +56,12 @@ foreach ($temas as $tema)
56 56 }
57 57 }
58 58 }
  59 +if($interface == "openlayers"){
  60 + $ext = explode(" ",$mapexten);
  61 + $extatual = $map->extent;
  62 + $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]);
  63 +}
  64 +
59 65 $imgo = $map->draw();
60 66 $nomer = ($imgo->imagepath)."mapa".$nomes.".png";
61 67 $imgo->saveImage($nomer);
... ...
ferramentas/imprimir/index.js.php
... ... @@ -67,16 +67,18 @@ i3GEOF.imprimir = {
67 67 */
68 68 html:function(){
69 69 var ins = '<p class=paragrafo > Escolha o modelo:</p>' +
70   - '<table class=lista6 width="200px">' +
71   - ' <tr>' +
  70 + '<table class=lista6 width="200px">';
  71 + if(i3GEO.Interface.ATUAL == "padrao"){
  72 + ins += ' <tr>' +
72 73 ' <td><input style="cursor:pointer" onclick=i3GEOF.imprimir.abreI(this) type=radio value="a4l.htm" name=cmodelo /></td>' +
73 74 ' <td>A4 paisagem</td>' +
74 75 ' </tr>' +
75 76 ' <tr>' +
76 77 ' <td ><input style="cursor:pointer" onclick=i3GEOF.imprimir.abreI(this) type=radio value="a4p.htm" name=cmodelo /></td>' +
77 78 ' <td >A4 retrato</td>' +
78   - ' </tr>' +
79   - ' <tr>' +
  79 + ' </tr>';
  80 + }
  81 + ins += ' <tr>' +
80 82 ' <td><input style="cursor:pointer" onclick=i3GEOF.imprimir.abreI(this) type=radio value="a4lpaisagempdf.htm" name=cmodelo /></td>' +
81 83 ' <td>A4 com margens pdf</td>' +
82 84 ' </tr>' +
... ... @@ -133,7 +135,8 @@ i3GEOF.imprimir = {
133 135 Abre uma nova janela com o resultado da impressão.
134 136 */
135 137 abreI: function(obj){
136   - window.open(i3GEO.configura.locaplic+"/ferramentas/imprimir/"+obj.value+"?g_sid="+i3GEO.configura.sid);
  138 +
  139 + window.open(i3GEO.configura.locaplic+"/ferramentas/imprimir/"+obj.value+"?g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL+"&mapexten="+i3GEO.parametros.mapexten);
137 140 }
138 141 };
139 142 <?php error_reporting(0);if(extension_loaded('zlib')){ob_end_flush();}?>
140 143 \ No newline at end of file
... ...