diff --git a/ferramentas/salvamapa/geraminiatura.php b/ferramentas/salvamapa/geraminiatura.php new file mode 100644 index 0000000..f3fcb29 --- /dev/null +++ b/ferramentas/salvamapa/geraminiatura.php @@ -0,0 +1,51 @@ +numlayers; + for ($i=0;$i < $numlayers;$i++){ + $layern = $mapa->getlayer($i); + if (!empty($postgis_mapa)){ + if ($layern->connectiontype == MS_POSTGIS){ + $lcon = $layern->connection; + if (($lcon == " ") || ($lcon == "") || (in_array($lcon,array_keys($postgis_mapa)))){ + if(($lcon == " ") || ($lcon == "")) //para efeitos de compatibilidade + {$layern->set("connection",$postgis_mapa); + } + else{ + $layern->set("connection",$postgis_mapa[$lcon]); + } + } + } + } + } + } + } + $mapa->setsize($_GET["w"],$_GET["h"]); + $sca = $mapa->scalebar; + $sca->set("status",MS_OFF); + $objImagemM = @$mapa->draw(); + $objImagemM->saveImage($nomeImagem); + +} +header('Content-Length: '.filesize($nomeImagem)); +header('Content-Type: image/png'); +header('Cache-Control: public, max-age=22222222'); +header('Expires: ' . gmdate('D, d M Y H:i:s', time()+48*60*60) . ' GMT'); +fpassthru(fopen($nomeImagem, 'rb')); +?> \ No newline at end of file -- libgit2 0.21.2