Commit 0b99eec41b44bd5b18f26db6d52fb87c7ed265f2
1 parent
3c414ef7
Exists in
master
and in
7 other branches
Adaptação da ferramenta de escolha do tipo de imagem para a interface openlayers
Showing
2 changed files
with
16 additions
and
3 deletions
Show diff stats
classesphp/mapa_openlayers.php
@@ -60,6 +60,7 @@ if($qy) | @@ -60,6 +60,7 @@ if($qy) | ||
60 | {$mapa->loadquery($qyfile);} | 60 | {$mapa->loadquery($qyfile);} |
61 | 61 | ||
62 | $layersNames = $mapa->getalllayernames(); | 62 | $layersNames = $mapa->getalllayernames(); |
63 | +$fundo = true; | ||
63 | foreach ($layersNames as $layerName) | 64 | foreach ($layersNames as $layerName) |
64 | { | 65 | { |
65 | $l = $mapa->getLayerByname($layerName); | 66 | $l = $mapa->getLayerByname($layerName); |
@@ -71,7 +72,10 @@ foreach ($layersNames as $layerName) | @@ -71,7 +72,10 @@ foreach ($layersNames as $layerName) | ||
71 | if($layerName != $_GET["layer"]) | 72 | if($layerName != $_GET["layer"]) |
72 | {$l->set("status",MS_OFF);} | 73 | {$l->set("status",MS_OFF);} |
73 | if($layerName == $_GET["layer"] || $l->group == $_GET["layer"] && $l->group != "") | 74 | if($layerName == $_GET["layer"] || $l->group == $_GET["layer"] && $l->group != "") |
74 | - {$l->set("status",MS_DEFAULT);} | 75 | + { |
76 | + $l->set("status",MS_DEFAULT); | ||
77 | + $fundo = false; | ||
78 | + } | ||
75 | $l->set("template","none.htm"); | 79 | $l->set("template","none.htm"); |
76 | } | 80 | } |
77 | $map_size = explode(" ",$_GET["map_size"]); | 81 | $map_size = explode(" ",$_GET["map_size"]); |
@@ -82,6 +86,11 @@ $mapa->setExtent($mapext[0],$mapext[1],$mapext[2],$mapext[3]); | @@ -82,6 +86,11 @@ $mapa->setExtent($mapext[0],$mapext[1],$mapext[2],$mapext[3]); | ||
82 | 86 | ||
83 | $o = $mapa->outputformat; | 87 | $o = $mapa->outputformat; |
84 | $o->set("imagemode",MS_IMAGEMODE_RGBA); | 88 | $o->set("imagemode",MS_IMAGEMODE_RGBA); |
89 | +// | ||
90 | +//não se aplica nos mapas que não desenham layers | ||
91 | +// | ||
92 | +if($fundo == false) | ||
93 | +{$o->set("transparent",MS_TRUE);} | ||
85 | 94 | ||
86 | if(!$qy) | 95 | if(!$qy) |
87 | {$img = $mapa->draw();} | 96 | {$img = $mapa->draw();} |
ferramentas/outputformat/index.js.php
@@ -129,8 +129,12 @@ i3GEOF.outputformat = { | @@ -129,8 +129,12 @@ i3GEOF.outputformat = { | ||
129 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=mudaOutputFormat&tipo="+tipo, | 129 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=mudaOutputFormat&tipo="+tipo, |
130 | temp = function(retorno){ | 130 | temp = function(retorno){ |
131 | i3GEOF.outputformat.aguarde.visibility = "hidden"; | 131 | i3GEOF.outputformat.aguarde.visibility = "hidden"; |
132 | - if(retorno.data != "erro") | ||
133 | - {i3GEO.atualiza();} | 132 | + if(retorno.data != "erro"){ |
133 | + if(i3GEO.Interface.ATUAL === "openlayers") | ||
134 | + {i3GEO.Interface.openlayers.atualizaMapa();} | ||
135 | + else | ||
136 | + {i3GEO.atualiza();} | ||
137 | + } | ||
134 | else | 138 | else |
135 | {alert("Nao foi possivel alterar o tipo");} | 139 | {alert("Nao foi possivel alterar o tipo");} |
136 | }; | 140 | }; |