Skip to content

Commit

Permalink
Continuação do processo de remoção da biblioteca CPAINT
Browse files Browse the repository at this point in the history
  • Loading branch information
edmarmoretti committed May 6, 2019
1 parent de287dd commit 98d53d0
Show file tree
Hide file tree
Showing 139 changed files with 2,149 additions and 11,418 deletions.
7 changes: 7 additions & 0 deletions admin/catalogo/mapfile/ferramentas/atalhosedicao/exec.php
Expand Up @@ -16,6 +16,13 @@
}
$retorno = "ok";
break;
case "MUDATRANSP":
include_once ($locaplic."/classesphp/classe_temas.php");
$m = new Temas($map_file, $tema);
$m->mudaTransparencia($_GET["valor"]);
$m->salva($map_file);
$retorno = "ok";
break;
}
if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){
restauraCon($map_file,$postgis_mapa);
Expand Down
26 changes: 25 additions & 1 deletion admin/catalogo/mapfile/ferramentas/atalhosedicao/index.js
Expand Up @@ -33,6 +33,30 @@ i3GEOF.atalhosedicao =
mesmoTema : true
});
},
mudatransp : function(valor) {
if (valor !== "") {
var prog = i3GEO.configura.locaplic + "/admin/catalogo/mapfile/ferramentas/atalhosedicao/exec.php?funcao=mudatransp&g_sid="+i3GEO.configura.sid;
var sUrl = prog
+ "&tema=" + i3GEOF.atalhosedicao.tema
+ "&valor=" + valor;
var callback = {
success:function(o) {
try {
if(JSON.parse(o.responseText) == "erro") {
}
else {
i3GEO.Interface.aplicaOpacidade(valor,i3GEOF.atalhosedicao.tema);
}
}
catch(e){core_handleFailure(e,o.responseText);}
},
argument: { foo:"foo", bar:"bar" }
};
core_makeRequest(sUrl,callback,'POST');
} else {
i3GEO.janela.tempoMsg($trad("x16"));
}
},
parametrosSql: function() {
i3GEO.temaAtivo = i3GEOF.atalhosedicao.tema;
YAHOO.namespace("admin");
Expand Down Expand Up @@ -273,7 +297,7 @@ i3GEOF.atalhosedicao =
YAHOO.admin.container.panelEditor = null;
i3GEO.Interface.openlayers.removeTodosOsLayers();
i3GEO.arvoreDeCamadas.CAMADAS = [];
i3GEO.atualiza();
i3GEO.mapa.refresh();
}
}
catch(e){core_handleFailure(e,o.responseText);}
Expand Down
Expand Up @@ -25,7 +25,7 @@
</a>
<div style="margin-top:50px;" class="form-group label-static" >
<label class="control-label">{{{opacidade}}}</label>
<form onsubmit="i3GEO.tema.mudatransp(i3GEOF.atalhosedicao.tema,this[0].value);return false;">
<form onsubmit="i3GEOF.atalhosedicao.mudatransp(this[0].value);return false;">
<input id="i3GEOFatalhosedicaoOpacidade" class="form-control input-lg" type='text' value='{{{transparency}}}' />
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion classesphp/atlas_controle.php
Expand Up @@ -112,7 +112,7 @@
//
//substitui a string de conex&atilde;o
//
substituiCon($map_file,$postgis_mapa);
substituiConObj($map_file,$postgis_mapa);
}


Expand Down
13 changes: 8 additions & 5 deletions classesphp/classe_temas.php
Expand Up @@ -477,12 +477,13 @@ function zoomTema()
else{
$ret = explode(" ",$ret);
$extatual->setextent($ret[0],$ret[1],$ret[2],$ret[3]);
//echo "oi";exit;
}
if($this->mapa->getmetadata("interface") == "googlemaps"){
$this->mapa->setProjection($projO);
}
return("ok");
$e = $this->mapa->extent;
$ext = $e->minx . " " . $e->miny . " " . $e->maxx . " " . $e->maxy;
return($ext);
}
/*
function: pegaFuncoesJs
Expand Down Expand Up @@ -699,7 +700,7 @@ function: inverteStatusLegenda
*/
function inverteStatusLegenda()
{
//error_reporting(0);
//error_reporting(0);
$valor = $this->layer->getmetadata("classe");
if($valor == "" || strtolower($valor) == "sim")
{$valor = "NAO";}
Expand Down Expand Up @@ -1258,9 +1259,11 @@ function zoomSel()
$ret->project($projInObj, $projOutObj);
}
$extatual->setextent($ret->minx,$ret->miny,$ret->maxx,$ret->maxy);
if($this->mapa->getmetadata("interface") == "googlemaps")
if($this->mapa->getmetadata("interface") == "googlemaps")
{$this->mapa->setProjection($projO);}
return("ok");
$e = $this->mapa->extent;
$ext = $e->minx . " " . $e->miny . " " . $e->maxx . " " . $e->maxy;
return($ext);
}
/*
function: sld
Expand Down
28 changes: 0 additions & 28 deletions classesphp/funcoes_gerais.php
Expand Up @@ -553,35 +553,7 @@ function listaTrueType()
*/
function substituiCon($map_file, $postgis_mapa)
{
// error_reporting(0);
return;
if (! empty($postgis_mapa) && (file_exists($map_file))) {
if (! @ms_newMapObj($map_file)) {
return false;
}
$objMap = ms_newMapObj($map_file);
$numlayers = $objMap->numlayers;
for ($i = 0; $i < $numlayers; ++ $i) {
$layer = $objMap->getlayer($i);
if ($layer->connectiontype == MS_POSTGIS) {
$lcon = $layer->connection;
if (($lcon == " ") || ($lcon == "") || (in_array($lcon, array_keys($postgis_mapa)))) {
//
// o metadata CONEXAOORIGINAL guarda o valor original para posterior substitui&ccedil;&atilde;o
//
if (($lcon == " ") || ($lcon == "")) {
$layer->set("connection", $postgis_mapa);
$layer->setmetadata("CONEXAOORIGINAL", $lcon);
} else {
$layer->set("connection", $postgis_mapa[$lcon]);
$layer->setmetadata("CONEXAOORIGINAL", $lcon);
}
}
}
}
$objMap->save($map_file);
}
return true;
}

function substituiConObj($objMap, $postgis_mapa)
Expand Down

0 comments on commit 98d53d0

Please sign in to comment.