Commit 10d157dcb3c95831a4669bc68ca62b4e5d455225
1 parent
b96a3623
Exists in
master
and in
7 other branches
Abertura da lista de arquivos para download em janelas flutuantes. Inclusão de l…
…inks para o mapa de referência, legenda e barra de escalas.
Showing
4 changed files
with
109 additions
and
19 deletions
Show diff stats
ferramentas/imprimir/aggpng.php
| 1 | +<style> | |
| 2 | +body | |
| 3 | +{margin:20px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;width:300px} | |
| 4 | +A | |
| 5 | +{text-align:left;font-family: Verdana, Arial, Helvetica, sans-serif;color: #2F4632;} | |
| 6 | +A:hover | |
| 7 | +{color: #4142ff;font-weight: normal;font-family: Verdana, Arial, Helvetica, sans-serif;} | |
| 8 | +</style> | |
| 9 | +<body> | |
| 1 | 10 | <?php |
| 2 | 11 | /* |
| 3 | 12 | About: Licença |
| ... | ... | @@ -102,11 +111,36 @@ if($mapexten != ""){ |
| 102 | 111 | $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]); |
| 103 | 112 | } |
| 104 | 113 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| 114 | +$protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 115 | +//mapa | |
| 105 | 116 | $imgo = $map->draw(); |
| 106 | 117 | $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; |
| 107 | 118 | $imgo->saveImage($nomer); |
| 108 | -$protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 109 | 119 | $nomemapa = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); |
| 110 | -echo "<p>Utilize a opção de alteração das propriedades do mapa para ajustar a legenda, tamanho e outras características</p>"; | |
| 111 | -echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' >Arquivo gerado! Clique para ver.</a>"; | |
| 120 | +//legenda | |
| 121 | +$imgo = $map->drawlegend(); | |
| 122 | +$nomer = ($imgo->imagepath)."legenda".$nomes.".png"; | |
| 123 | +$imgo->saveImage($nomer); | |
| 124 | +$nomelegenda = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); | |
| 125 | +//escala | |
| 126 | +$imgo = $map->drawscalebar(); | |
| 127 | +$nomer = ($imgo->imagepath)."escala".$nomes.".png"; | |
| 128 | +$imgo->saveImage($nomer); | |
| 129 | +$nomeescala = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); | |
| 130 | +//referência | |
| 131 | +$o = $map->reference->outlinecolor; | |
| 132 | +$o->setrgb(255,0,0); | |
| 133 | +$map->preparequery(); | |
| 134 | +$imgo = $map->drawreferencemap(); | |
| 135 | +$nomer = ($imgo->imagepath)."ref".$nomes.".png"; | |
| 136 | +$imgo->saveImage($nomer); | |
| 137 | +$nomeref = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); | |
| 138 | + | |
| 139 | + | |
| 140 | +echo "<p>Utilize a opção de alteração das propriedades do mapa para ajustar a legenda, tamanho e outras características antes de gerar os arquivos.</p>"; | |
| 141 | +echo "<p>Arquivos gerados:</p>"; | |
| 142 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' target=_blank >Mapa</a><br><br>"; | |
| 143 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; | |
| 144 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; | |
| 145 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; | |
| 112 | 146 | ?> |
| 113 | 147 | \ No newline at end of file | ... | ... |
ferramentas/imprimir/geotif.php
| 1 | +<style> | |
| 2 | +body | |
| 3 | +{margin:20px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;width:300px} | |
| 4 | +A | |
| 5 | +{text-align:left;font-family: Verdana, Arial, Helvetica, sans-serif;color: #2F4632;} | |
| 6 | +A:hover | |
| 7 | +{color: #4142ff;font-weight: normal;font-family: Verdana, Arial, Helvetica, sans-serif;} | |
| 8 | +</style> | |
| 9 | +<body> | |
| 1 | 10 | <?php |
| 2 | 11 | /* |
| 3 | 12 | About: Licença |
| ... | ... | @@ -103,11 +112,36 @@ if($mapexten != ""){ |
| 103 | 112 | //$legenda = $map->legend; |
| 104 | 113 | //$legenda->set("status",MS_EMBED); |
| 105 | 114 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| 115 | +$protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 116 | +//mapa | |
| 106 | 117 | $imgo = $map->draw(); |
| 107 | 118 | $nomer = ($imgo->imagepath)."mapa".$nomes.".tif"; |
| 108 | 119 | $imgo->saveImage($nomer); |
| 109 | -$protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 110 | 120 | $nomemapa = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); |
| 111 | -echo "<p>Utilize a opção de alteração das propriedades do mapa para ajustar a legenda, tamanho e outras características</p>"; | |
| 112 | -echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' >Arquivo gerado! Clique para ver.</a>"; | |
| 121 | +//legenda | |
| 122 | +$imgo = $map->drawlegend(); | |
| 123 | +$nomer = ($imgo->imagepath)."legenda".$nomes.".tif"; | |
| 124 | +$imgo->saveImage($nomer); | |
| 125 | +$nomelegenda = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); | |
| 126 | +//escala | |
| 127 | +$imgo = $map->drawscalebar(); | |
| 128 | +$nomer = ($imgo->imagepath)."escala".$nomes.".tif"; | |
| 129 | +$imgo->saveImage($nomer); | |
| 130 | +$nomeescala = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); | |
| 131 | +//referência | |
| 132 | +$o = $map->reference->outlinecolor; | |
| 133 | +$o->setrgb(255,0,0); | |
| 134 | +$map->preparequery(); | |
| 135 | +$imgo = $map->drawreferencemap(); | |
| 136 | +$nomer = ($imgo->imagepath)."ref".$nomes.".tif"; | |
| 137 | +$imgo->saveImage($nomer); | |
| 138 | +$nomeref = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); | |
| 139 | + | |
| 140 | + | |
| 141 | +echo "<p>Utilize a opção de alteração das propriedades do mapa para ajustar a legenda, tamanho e outras características antes de gerar os arquivos.</p>"; | |
| 142 | +echo "<p>Arquivos gerados:</p>"; | |
| 143 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' target=_blank >Mapa</a><br><br>"; | |
| 144 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeescala' target=_blank >Barra de escala</a><br><br>"; | |
| 145 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomeref' target=_blank >Mapa de referência</a><br><br>"; | |
| 146 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomelegenda' target=_blank >Legenda</a><br>"; | |
| 113 | 147 | ?> |
| 114 | 148 | \ No newline at end of file | ... | ... |
ferramentas/imprimir/index.js.php
| ... | ... | @@ -86,15 +86,15 @@ i3GEOF.imprimir = { |
| 86 | 86 | ' <td>A4 com margens pdf</td>' + |
| 87 | 87 | ' </tr>' + |
| 88 | 88 | ' <tr>' + |
| 89 | - ' <td><input style="border:0px solid white;cursor:pointer" onclick=i3GEOF.imprimir.abreI(this) type=radio value="geotif.php" name=cmodelo /></td>' + | |
| 89 | + ' <td><input style="border:0px solid white;cursor:pointer" onclick=i3GEOF.imprimir.abreI(this,"interna") type=radio value="geotif.php" name=cmodelo /></td>' + | |
| 90 | 90 | ' <td>Geo Tiff</td>' + |
| 91 | 91 | ' </tr>' + |
| 92 | 92 | ' <tr>' + |
| 93 | - ' <td><input style="border:0px solid white;cursor:pointer" onclick=i3GEOF.imprimir.abreI(this) type=radio value="aggpng.php" name=cmodelo /></td>' + | |
| 93 | + ' <td><input style="border:0px solid white;cursor:pointer" onclick=i3GEOF.imprimir.abreI(this,"interna") type=radio value="aggpng.php" name=cmodelo /></td>' + | |
| 94 | 94 | ' <td>Agg/Png alta qualidade</td>' + |
| 95 | 95 | ' </tr>' + |
| 96 | 96 | ' <tr>' + |
| 97 | - ' <td><input style="border:0px solid white;cursor:pointer" onclick=i3GEOF.imprimir.abreI(this) type=radio value="svg.php" name=cmodelo /></td>' + | |
| 97 | + ' <td><input style="border:0px solid white;cursor:pointer" onclick=i3GEOF.imprimir.abreI(this,"interna") type=radio value="svg.php" name=cmodelo /></td>' + | |
| 98 | 98 | ' <td>Svg - vetorial</td>' + |
| 99 | 99 | ' </tr>' + |
| 100 | 100 | '</table>'; |
| ... | ... | @@ -136,9 +136,22 @@ i3GEOF.imprimir = { |
| 136 | 136 | Function: abreI |
| 137 | 137 | |
| 138 | 138 | Abre uma nova janela com o resultado da impressão. |
| 139 | + | |
| 140 | + Parameters: | |
| 141 | + | |
| 142 | + obj {objeto INPUT} | |
| 143 | + | |
| 144 | + tipoAbertura {string} - (opcional) se for "interna" abre em uma janela interna do mapa | |
| 139 | 145 | */ |
| 140 | - abreI: function(obj){ | |
| 141 | - window.open(i3GEO.configura.locaplic+"/ferramentas/imprimir/"+obj.value+"?g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL+"&mapexten="+i3GEO.parametros.mapexten); | |
| 146 | + abreI: function(obj,tipoAbertura){ | |
| 147 | + var url = i3GEO.configura.locaplic+"/ferramentas/imprimir/"+obj.value+"?g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL+"&mapexten="+i3GEO.parametros.mapexten; | |
| 148 | + var id = "imprimir"+Math.random(); | |
| 149 | + if(tipoAbertura){ | |
| 150 | + i3GEO.janela.cria("350px","350px",url,"","","Arquivos",id); | |
| 151 | + } | |
| 152 | + else{ | |
| 153 | + window.open(url); | |
| 154 | + } | |
| 142 | 155 | } |
| 143 | 156 | }; |
| 144 | 157 | <?php error_reporting(0);if(extension_loaded('zlib')){ob_end_flush();}?> |
| 145 | 158 | \ No newline at end of file | ... | ... |
ferramentas/imprimir/svg.php
| 1 | +<style> | |
| 2 | +body | |
| 3 | +{margin:20px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;width:300px} | |
| 4 | +A | |
| 5 | +{text-align:left;font-family: Verdana, Arial, Helvetica, sans-serif;color: #2F4632;} | |
| 6 | +A:hover | |
| 7 | +{color: #4142ff;font-weight: normal;font-family: Verdana, Arial, Helvetica, sans-serif;} | |
| 8 | +</style> | |
| 9 | +<body> | |
| 1 | 10 | <?php |
| 2 | 11 | /* |
| 3 | 12 | About: Licença |
| ... | ... | @@ -98,17 +107,17 @@ if($mapexten != ""){ |
| 98 | 107 | $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]); |
| 99 | 108 | } |
| 100 | 109 | $map->selectOutputFormat("svg"); |
| 101 | -//$of = $map->outputformat; | |
| 102 | -//$of->set("driver","svg"); | |
| 103 | -//$of->set("mimetype","image/svg+xml"); | |
| 104 | -//$of->set("formatoption","COMPRESSED_OUTPUT=TRUE"); | |
| 105 | -//$of->set("formatoption","FULL_RESOLUTION=TRUE"); | |
| 106 | -//$of->set("imagemode","RGB"); | |
| 107 | 110 | |
| 111 | +$protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 112 | +//mapa | |
| 108 | 113 | $imgo = $map->draw(); |
| 109 | 114 | $nomer = ($imgo->imagepath)."mapa".$nomes.".svg"; |
| 110 | 115 | $imgo->saveImage($nomer); |
| 111 | -$protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); | |
| 112 | 116 | $nomemapa = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); |
| 113 | -echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' >Arquivo gerado! Clique para ver.</a>"; | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | +echo "<p>Utilize a opção de alteração das propriedades do mapa para ajustar a legenda, tamanho e outras características antes de gerar os arquivos.</p>"; | |
| 121 | +echo "<p>Arquivos gerados:</p>"; | |
| 122 | +echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' target=_blank >Mapa</a><br><br>"; | |
| 114 | 123 | ?> |
| 115 | 124 | \ No newline at end of file | ... | ... |