From 0b99eec41b44bd5b18f26db6d52fb87c7ed265f2 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Mon, 17 May 2010 17:29:15 +0000 Subject: [PATCH] Adaptação da ferramenta de escolha do tipo de imagem para a interface openlayers --- classesphp/mapa_openlayers.php | 11 ++++++++++- ferramentas/outputformat/index.js.php | 8 ++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/classesphp/mapa_openlayers.php b/classesphp/mapa_openlayers.php index a207d32..110c67f 100644 --- a/classesphp/mapa_openlayers.php +++ b/classesphp/mapa_openlayers.php @@ -60,6 +60,7 @@ if($qy) {$mapa->loadquery($qyfile);} $layersNames = $mapa->getalllayernames(); +$fundo = true; foreach ($layersNames as $layerName) { $l = $mapa->getLayerByname($layerName); @@ -71,7 +72,10 @@ foreach ($layersNames as $layerName) if($layerName != $_GET["layer"]) {$l->set("status",MS_OFF);} if($layerName == $_GET["layer"] || $l->group == $_GET["layer"] && $l->group != "") - {$l->set("status",MS_DEFAULT);} + { + $l->set("status",MS_DEFAULT); + $fundo = false; + } $l->set("template","none.htm"); } $map_size = explode(" ",$_GET["map_size"]); @@ -82,6 +86,11 @@ $mapa->setExtent($mapext[0],$mapext[1],$mapext[2],$mapext[3]); $o = $mapa->outputformat; $o->set("imagemode",MS_IMAGEMODE_RGBA); +// +//não se aplica nos mapas que não desenham layers +// +if($fundo == false) +{$o->set("transparent",MS_TRUE);} if(!$qy) {$img = $mapa->draw();} diff --git a/ferramentas/outputformat/index.js.php b/ferramentas/outputformat/index.js.php index c0d263c..4ec2aa1 100644 --- a/ferramentas/outputformat/index.js.php +++ b/ferramentas/outputformat/index.js.php @@ -129,8 +129,12 @@ i3GEOF.outputformat = { p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=mudaOutputFormat&tipo="+tipo, temp = function(retorno){ i3GEOF.outputformat.aguarde.visibility = "hidden"; - if(retorno.data != "erro") - {i3GEO.atualiza();} + if(retorno.data != "erro"){ + if(i3GEO.Interface.ATUAL === "openlayers") + {i3GEO.Interface.openlayers.atualizaMapa();} + else + {i3GEO.atualiza();} + } else {alert("Nao foi possivel alterar o tipo");} }; -- libgit2 0.21.2