diff --git a/admin/admin.db b/admin/admin.db index 4b3fad6..a189c03 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/ogc.php b/ogc.php index 9dea3ff..2eadbef 100644 --- a/ogc.php +++ b/ogc.php @@ -161,9 +161,12 @@ if(!isset($tema) && isset($typename)){ } // //garante que layers possam ser especificados de diferentes maneiras +//mas evita definir o layer como o nome do mapfile // -$_GET["layers"] = $tema; -$_GET["LAYERS"] = $tema; +if(!file_exists($tema)){ + $_GET["layers"] = $tema; + $_GET["LAYERS"] = $tema; +} $layers = $tema; // //verifica o OUTPUTFORMAT e o cache de arquivo @@ -273,7 +276,15 @@ if(isset($_GET["DESLIGACACHE"]) && $_GET["DESLIGACACHE"] == "sim"){ $agora = time(); $cache = false; } -$nomeMapfileTmp = $dir_tmp."/ogc_".md5(implode("",$_GET))."_".$agora.".map"; +//remove o bbox do calculo do nome do mapfile +$arrayget = $_GET; +$arrayget["bbox"] = ""; +$arrayget["BBOX"] = ""; +$arrayget["Z"] = ""; +$arrayget["X"] = ""; +$arrayget["Y"] = ""; +$arrayget["tms"] = ""; +$nomeMapfileTmp = $dir_tmp."/ogc_".md5(implode("",$arrayget))."_".$agora.".map"; //essa variavel e usada para definir se a imagem final gerada devera ser cortada ou nao $cortePixels = 0; if(file_exists($nomeMapfileTmp) && $tipo == ""){ @@ -1220,7 +1231,8 @@ function restauraMapaSalvo(){ $l = $m->getlayerbyname("copyright"); if($l != ""){ $l->set("status",MS_DELETE); - } + } + $m->setmetadata("ows_enable_request","*"); $m->save($xbase); //$fundo = $xbase; $tema = $xbase; -- libgit2 0.21.2