From e7372e6af39827aba58cc87d06d03586be90b520 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 19 Aug 2014 00:56:37 +0000 Subject: [PATCH] - --- classesjs/classe_i3geo.js | 52 ++++++++++++++++++++++++++++------------------------ classesjs/classe_mapa.js | 33 +++++++++++++++++++-------------- classesjs/classe_php.js | 2 -- classesjs/classe_plugini3geo.js | 34 ++++------------------------------ ferramentas/markercluster/funcoes.php | 2 +- interface/openlayersdebug.htm | 4 ++-- 6 files changed, 54 insertions(+), 73 deletions(-) diff --git a/classesjs/classe_i3geo.js b/classesjs/classe_i3geo.js index 00e90fc..629bce9 100644 --- a/classesjs/classe_i3geo.js +++ b/classesjs/classe_i3geo.js @@ -284,6 +284,7 @@ var i3GEO = { // tamanho = i3GEO.calculaTamanho(); i3GEO.Interface.cria(tamanho[0],tamanho[1]); + }, /* Function: inicia @@ -466,8 +467,6 @@ var i3GEO = { } if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()") < 0) {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()");} - if(i3GEO.mapa.AUTORESIZE === true) - {i3GEO.mapa.ativaAutoResize();} //eval(i3GEO.finaliza); }, /* @@ -485,6 +484,8 @@ var i3GEO = { } if(i3GEO.guias.TIPO === "movel") {i3GEO.guias.guiaMovel.inicia();} + if(i3GEO.mapa.AUTORESIZE === true) + {i3GEO.mapa.ativaAutoResize();} }, /* Function: atualiza @@ -510,7 +511,6 @@ var i3GEO = { dessa chamada é armazenada em i3GEO.parametros */ atualiza: function(retorno){ - if(typeof(console) !== 'undefined'){console.info("i3GEO.atualiza()");} var corpoMapa,erro,mapscale,temp; if(i3GEO.contadorAtualiza > 1){ i3GEO.contadorAtualiza--;return; @@ -565,7 +565,7 @@ var i3GEO = { } } catch(e){ - if(typeof(console) !== 'undefined'){console.error("i3GEO.atualiza "+e);} + } erro = function(){ var c = confirm("Ocorreu um erro, quer tentar novamente?"); @@ -734,28 +734,32 @@ var i3GEO = { if(temp){ temp.style.width="100%"; } + i3GEO.parametros.w = w; i3GEO.parametros.h = h; - i3GEO.php.mudatamanho(i3GEO.atualiza,h,w); - switch(i3GEO.Interface.ATUAL) - { - case "googlemaps": - i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten); - break; - case "googleearth": - i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten); - break; - case "openlayers": - i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); - i3geoOL.updateSize(); - break; - } - if(i3GEO.guias.TIPO === "sanfona"){ - i3GEO.guias.ALTURACORPOGUIAS = h - (antigoh - i3GEO.guias.ALTURACORPOGUIAS); - } - else - {i3GEO.guias.ALTURACORPOGUIAS = h;} - return [w,h]; + temp = function(){ + switch(i3GEO.Interface.ATUAL) + { + case "googlemaps": + i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten); + break; + case "googleearth": + i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten); + break; + case "openlayers": + i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); + i3geoOL.updateSize(); + break; + } + if(i3GEO.guias.TIPO === "sanfona"){ + i3GEO.guias.ALTURACORPOGUIAS = h - (antigoh - i3GEO.guias.ALTURACORPOGUIAS); + } + else{ + i3GEO.guias.ALTURACORPOGUIAS = h; + } + return [w,h]; + }; + i3GEO.php.mudatamanho(temp,h,w); }, /* Atualiza os valores da variável i3GEO.parametros diff --git a/classesjs/classe_mapa.js b/classesjs/classe_mapa.js index efed371..fe04540 100644 --- a/classesjs/classe_mapa.js +++ b/classesjs/classe_mapa.js @@ -139,6 +139,7 @@ i3GEO.mapa = * e definido como um evento do elemento window */ ativaAutoResize : function() { + var ativo = true; window.onresize = function() { var Dw, Dh, r = false; Dw = YAHOO.util.Dom.getViewportWidth(); @@ -156,20 +157,24 @@ i3GEO.mapa = Dw, Dh ]; - setTimeout(function() { - i3GEO.reCalculaTamanho(); - i3GEO.barraDeBotoes.recria("i3geo_barra2"); - if (i3GEO.Interface.TABLET === true) { - i3GEO.guias.escondeGuias(); - return; - } - if (i3GEO.guias.TIPO === "movel") { - i3GEO.guias.guiaMovel.reposiciona(); - } else { - i3GEO.guias.ajustaAltura(); - } - i3GEO.mapa.reposicionaDobraPagina(); - }, 2000); + if(ativo === true){ + setTimeout(function() { + i3GEO.reCalculaTamanho(); + i3GEO.barraDeBotoes.recria("i3geo_barra2"); + if (i3GEO.Interface.TABLET === true) { + i3GEO.guias.escondeGuias(); + return; + } + if (i3GEO.guias.TIPO === "movel") { + i3GEO.guias.guiaMovel.reposiciona(); + } else { + i3GEO.guias.ajustaAltura(); + } + i3GEO.mapa.reposicionaDobraPagina(); + ativo = true; + }, 2000); + } + ativo = false; }; }, /* diff --git a/classesjs/classe_php.js b/classesjs/classe_php.js index 786b4c0..9c4de87 100644 --- a/classesjs/classe_php.js +++ b/classesjs/classe_php.js @@ -431,10 +431,8 @@ i3GEO.php = { var p = i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/exec.php", par = "funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid, retorno = function(retorno){ - i3GEO.janela.fechaAguarde("mudatamanho"); funcao.call(funcao,retorno); }; - i3GEO.janela.abreAguarde("mudatamanho",$trad("o1")); cpJSON.call(p,"pegaSistemas",retorno,par); }, /* diff --git a/classesjs/classe_plugini3geo.js b/classesjs/classe_plugini3geo.js index 510df3c..96b4816 100644 --- a/classesjs/classe_plugini3geo.js +++ b/classesjs/classe_plugini3geo.js @@ -61,7 +61,7 @@ i3GEO.pluginI3geo = inicia : function(camada) { if (i3GEO.janela) { i3GEO.janela.AGUARDEMODAL = true; - i3GEO.janela.abreAguarde("aguardePlugin", "Calculando..."); + i3GEO.janela.abreAguarde("aguardePlugin", "Plugin..."); i3GEO.janela.AGUARDEMODAL = false; } // chama a funcao conforme o tipo de plugin e a interface atual @@ -255,7 +255,7 @@ i3GEO.pluginI3geo = p += "?carregajs=" + carregaJs + "&layer=" + camada.name + "&coluna=" + camada.plugini3geo.parametros.coluna + "&tipoGradiente=" + camada.plugini3geo.parametros.tipoGradiente + "&g_sid=" + i3GEO.configura.sid - + "&nomevariavel=heatmap_dados", +"&nomevariavelConfig=heatmap_config"; + + "&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config"; i3GEO.util.scriptTag(p, criaLayer, "i3GEO.pluginI3geo.heatmap_script"); } }, @@ -358,7 +358,7 @@ i3GEO.pluginI3geo = p += "?carregajs=" + carregaJs + "&layer=" + camada.name + "&coluna=" + camada.plugini3geo.parametros.coluna + "&tipoGradiente=" + camada.plugini3geo.parametros.tipoGradiente + "&g_sid=" + i3GEO.configura.sid - + "&nomevariavel=heatmap_dados" + "&nomevariavelConfig=heatmap_config"; + + "&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config"; i3GEO.util.scriptTag(p, criaLayer, "i3GEO.pluginI3geo.heatmap_script"); } }, @@ -455,33 +455,7 @@ i3GEO.pluginI3geo = "visible" : true, "opacity" : camada.transparency, "name" : camada.name, - "styles" : [ - { - url : i3GEO.configura.locaplic + "/imagens/google/m1", - height : 53, - width : 53 - }, - { - url : i3GEO.configura.locaplic + "/imagens/google/m2", - height : 56, - width : 56 - }, - { - url : i3GEO.configura.locaplic + "/imagens/google/m3", - height : 66, - width : 66 - }, - { - url : i3GEO.configura.locaplic + "/imagens/google/m4", - height : 78, - width : 78 - }, - { - url : i3GEO.configura.locaplic + "/imagens/google/m5", - height : 90, - width : 90 - } - ] + "styles" : markercluster_config.estilos }); i3GEO.janela.fechaAguarde("aguardePlugin"); i3GEO.eventos.cliquePerm.ativo = false; diff --git a/ferramentas/markercluster/funcoes.php b/ferramentas/markercluster/funcoes.php index 700c32e..da79545 100644 --- a/ferramentas/markercluster/funcoes.php +++ b/ferramentas/markercluster/funcoes.php @@ -70,7 +70,7 @@ function markerclusterMapfile(){ } function markerclusterEstilos($map_file,$layer,$tipoEstilos){ if($tipoEstilos == "default"){ - $tipoEstilos = '[{url : i3GEO.configura.locaplic + "/imagens/google/m1",height : 53,width : 53},{url : i3GEO.configura.locaplic + "/imagens/google/m2",height : 56,width : 56},{url : i3GEO.configura.locaplic + "/imagens/google/m3",height : 66,width : 66},{url : i3GEO.configura.locaplic + "/imagens/google/m4",height : 78,width : 78},{url : i3GEO.configura.locaplic + "/imagens/google/m5",height : 90,width : 90}]'; + $tipoEstilos = '{"estilos":[{url : i3GEO.configura.locaplic + "/imagens/google/m1",height : 53,width : 53},{url : i3GEO.configura.locaplic + "/imagens/google/m2",height : 56,width : 56},{url : i3GEO.configura.locaplic + "/imagens/google/m3",height : 66,width : 66},{url : i3GEO.configura.locaplic + "/imagens/google/m4",height : 78,width : 78},{url : i3GEO.configura.locaplic + "/imagens/google/m5",height : 90,width : 90}]}'; } else{ $gradiente = array(); diff --git a/interface/openlayersdebug.htm b/interface/openlayersdebug.htm index bf1be23..0d442ba 100644 --- a/interface/openlayersdebug.htm +++ b/interface/openlayersdebug.htm @@ -203,7 +203,7 @@ i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterfac Após a criação, é criado o objeto i3geoOL que corresponde ao objeto map da API do OpenLayers. Vc pode usar i3geoOL para aplicar os métodos e verificar as propriedades da API do OpenLayers */ - +i3GEO.mapa.AUTORESIZE = true; i3GEO.cria(); /* Inicializa o mapa @@ -251,7 +251,7 @@ i3GEO.Interface.ATIVAMENUCONTEXTO = false; i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true; i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true; i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; -i3GEO.mapa.AUTORESIZE = true; + i3GEO.guias.TIPO = "movel"; -- libgit2 0.21.2