Commit 10e466dd9ac520985d44bb6cffea59c3ffddbe3a

Authored by Edmar Moretti
1 parent b2c533e5

--no commit message

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