Commit e7372e6af39827aba58cc87d06d03586be90b520
1 parent
ae6422b3
Exists in
master
and in
7 other branches
-
Showing
6 changed files
with
54 additions
and
73 deletions
Show diff stats
classesjs/classe_i3geo.js
| ... | ... | @@ -284,6 +284,7 @@ var i3GEO = { |
| 284 | 284 | // |
| 285 | 285 | tamanho = i3GEO.calculaTamanho(); |
| 286 | 286 | i3GEO.Interface.cria(tamanho[0],tamanho[1]); |
| 287 | + | |
| 287 | 288 | }, |
| 288 | 289 | /* |
| 289 | 290 | Function: inicia |
| ... | ... | @@ -466,8 +467,6 @@ var i3GEO = { |
| 466 | 467 | } |
| 467 | 468 | if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()") < 0) |
| 468 | 469 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()");} |
| 469 | - if(i3GEO.mapa.AUTORESIZE === true) | |
| 470 | - {i3GEO.mapa.ativaAutoResize();} | |
| 471 | 470 | //eval(i3GEO.finaliza); |
| 472 | 471 | }, |
| 473 | 472 | /* |
| ... | ... | @@ -485,6 +484,8 @@ var i3GEO = { |
| 485 | 484 | } |
| 486 | 485 | if(i3GEO.guias.TIPO === "movel") |
| 487 | 486 | {i3GEO.guias.guiaMovel.inicia();} |
| 487 | + if(i3GEO.mapa.AUTORESIZE === true) | |
| 488 | + {i3GEO.mapa.ativaAutoResize();} | |
| 488 | 489 | }, |
| 489 | 490 | /* |
| 490 | 491 | Function: atualiza |
| ... | ... | @@ -510,7 +511,6 @@ var i3GEO = { |
| 510 | 511 | dessa chamada é armazenada em i3GEO.parametros |
| 511 | 512 | */ |
| 512 | 513 | atualiza: function(retorno){ |
| 513 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.atualiza()");} | |
| 514 | 514 | var corpoMapa,erro,mapscale,temp; |
| 515 | 515 | if(i3GEO.contadorAtualiza > 1){ |
| 516 | 516 | i3GEO.contadorAtualiza--;return; |
| ... | ... | @@ -565,7 +565,7 @@ var i3GEO = { |
| 565 | 565 | } |
| 566 | 566 | } |
| 567 | 567 | catch(e){ |
| 568 | - if(typeof(console) !== 'undefined'){console.error("i3GEO.atualiza "+e);} | |
| 568 | + | |
| 569 | 569 | } |
| 570 | 570 | erro = function(){ |
| 571 | 571 | var c = confirm("Ocorreu um erro, quer tentar novamente?"); |
| ... | ... | @@ -734,28 +734,32 @@ var i3GEO = { |
| 734 | 734 | if(temp){ |
| 735 | 735 | temp.style.width="100%"; |
| 736 | 736 | } |
| 737 | + | |
| 737 | 738 | i3GEO.parametros.w = w; |
| 738 | 739 | i3GEO.parametros.h = h; |
| 739 | - i3GEO.php.mudatamanho(i3GEO.atualiza,h,w); | |
| 740 | - switch(i3GEO.Interface.ATUAL) | |
| 741 | - { | |
| 742 | - case "googlemaps": | |
| 743 | - i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten); | |
| 744 | - break; | |
| 745 | - case "googleearth": | |
| 746 | - i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten); | |
| 747 | - break; | |
| 748 | - case "openlayers": | |
| 749 | - i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); | |
| 750 | - i3geoOL.updateSize(); | |
| 751 | - break; | |
| 752 | - } | |
| 753 | - if(i3GEO.guias.TIPO === "sanfona"){ | |
| 754 | - i3GEO.guias.ALTURACORPOGUIAS = h - (antigoh - i3GEO.guias.ALTURACORPOGUIAS); | |
| 755 | - } | |
| 756 | - else | |
| 757 | - {i3GEO.guias.ALTURACORPOGUIAS = h;} | |
| 758 | - return [w,h]; | |
| 740 | + temp = function(){ | |
| 741 | + switch(i3GEO.Interface.ATUAL) | |
| 742 | + { | |
| 743 | + case "googlemaps": | |
| 744 | + i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten); | |
| 745 | + break; | |
| 746 | + case "googleearth": | |
| 747 | + i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten); | |
| 748 | + break; | |
| 749 | + case "openlayers": | |
| 750 | + i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); | |
| 751 | + i3geoOL.updateSize(); | |
| 752 | + break; | |
| 753 | + } | |
| 754 | + if(i3GEO.guias.TIPO === "sanfona"){ | |
| 755 | + i3GEO.guias.ALTURACORPOGUIAS = h - (antigoh - i3GEO.guias.ALTURACORPOGUIAS); | |
| 756 | + } | |
| 757 | + else{ | |
| 758 | + i3GEO.guias.ALTURACORPOGUIAS = h; | |
| 759 | + } | |
| 760 | + return [w,h]; | |
| 761 | + }; | |
| 762 | + i3GEO.php.mudatamanho(temp,h,w); | |
| 759 | 763 | }, |
| 760 | 764 | /* |
| 761 | 765 | Atualiza os valores da variável i3GEO.parametros | ... | ... |
classesjs/classe_mapa.js
| ... | ... | @@ -139,6 +139,7 @@ i3GEO.mapa = |
| 139 | 139 | * e definido como um evento do elemento window |
| 140 | 140 | */ |
| 141 | 141 | ativaAutoResize : function() { |
| 142 | + var ativo = true; | |
| 142 | 143 | window.onresize = function() { |
| 143 | 144 | var Dw, Dh, r = false; |
| 144 | 145 | Dw = YAHOO.util.Dom.getViewportWidth(); |
| ... | ... | @@ -156,20 +157,24 @@ i3GEO.mapa = |
| 156 | 157 | Dw, |
| 157 | 158 | Dh |
| 158 | 159 | ]; |
| 159 | - setTimeout(function() { | |
| 160 | - i3GEO.reCalculaTamanho(); | |
| 161 | - i3GEO.barraDeBotoes.recria("i3geo_barra2"); | |
| 162 | - if (i3GEO.Interface.TABLET === true) { | |
| 163 | - i3GEO.guias.escondeGuias(); | |
| 164 | - return; | |
| 165 | - } | |
| 166 | - if (i3GEO.guias.TIPO === "movel") { | |
| 167 | - i3GEO.guias.guiaMovel.reposiciona(); | |
| 168 | - } else { | |
| 169 | - i3GEO.guias.ajustaAltura(); | |
| 170 | - } | |
| 171 | - i3GEO.mapa.reposicionaDobraPagina(); | |
| 172 | - }, 2000); | |
| 160 | + if(ativo === true){ | |
| 161 | + setTimeout(function() { | |
| 162 | + i3GEO.reCalculaTamanho(); | |
| 163 | + i3GEO.barraDeBotoes.recria("i3geo_barra2"); | |
| 164 | + if (i3GEO.Interface.TABLET === true) { | |
| 165 | + i3GEO.guias.escondeGuias(); | |
| 166 | + return; | |
| 167 | + } | |
| 168 | + if (i3GEO.guias.TIPO === "movel") { | |
| 169 | + i3GEO.guias.guiaMovel.reposiciona(); | |
| 170 | + } else { | |
| 171 | + i3GEO.guias.ajustaAltura(); | |
| 172 | + } | |
| 173 | + i3GEO.mapa.reposicionaDobraPagina(); | |
| 174 | + ativo = true; | |
| 175 | + }, 2000); | |
| 176 | + } | |
| 177 | + ativo = false; | |
| 173 | 178 | }; |
| 174 | 179 | }, |
| 175 | 180 | /* | ... | ... |
classesjs/classe_php.js
| ... | ... | @@ -431,10 +431,8 @@ i3GEO.php = { |
| 431 | 431 | var p = i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/exec.php", |
| 432 | 432 | par = "funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid, |
| 433 | 433 | retorno = function(retorno){ |
| 434 | - i3GEO.janela.fechaAguarde("mudatamanho"); | |
| 435 | 434 | funcao.call(funcao,retorno); |
| 436 | 435 | }; |
| 437 | - i3GEO.janela.abreAguarde("mudatamanho",$trad("o1")); | |
| 438 | 436 | cpJSON.call(p,"pegaSistemas",retorno,par); |
| 439 | 437 | }, |
| 440 | 438 | /* | ... | ... |
classesjs/classe_plugini3geo.js
| ... | ... | @@ -61,7 +61,7 @@ i3GEO.pluginI3geo = |
| 61 | 61 | inicia : function(camada) { |
| 62 | 62 | if (i3GEO.janela) { |
| 63 | 63 | i3GEO.janela.AGUARDEMODAL = true; |
| 64 | - i3GEO.janela.abreAguarde("aguardePlugin", "Calculando..."); | |
| 64 | + i3GEO.janela.abreAguarde("aguardePlugin", "Plugin..."); | |
| 65 | 65 | i3GEO.janela.AGUARDEMODAL = false; |
| 66 | 66 | } |
| 67 | 67 | // chama a funcao conforme o tipo de plugin e a interface atual |
| ... | ... | @@ -255,7 +255,7 @@ i3GEO.pluginI3geo = |
| 255 | 255 | p += |
| 256 | 256 | "?carregajs=" + carregaJs + "&layer=" + camada.name + "&coluna=" + camada.plugini3geo.parametros.coluna |
| 257 | 257 | + "&tipoGradiente=" + camada.plugini3geo.parametros.tipoGradiente + "&g_sid=" + i3GEO.configura.sid |
| 258 | - + "&nomevariavel=heatmap_dados", +"&nomevariavelConfig=heatmap_config"; | |
| 258 | + + "&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config"; | |
| 259 | 259 | i3GEO.util.scriptTag(p, criaLayer, "i3GEO.pluginI3geo.heatmap_script"); |
| 260 | 260 | } |
| 261 | 261 | }, |
| ... | ... | @@ -358,7 +358,7 @@ i3GEO.pluginI3geo = |
| 358 | 358 | p += |
| 359 | 359 | "?carregajs=" + carregaJs + "&layer=" + camada.name + "&coluna=" + camada.plugini3geo.parametros.coluna |
| 360 | 360 | + "&tipoGradiente=" + camada.plugini3geo.parametros.tipoGradiente + "&g_sid=" + i3GEO.configura.sid |
| 361 | - + "&nomevariavel=heatmap_dados" + "&nomevariavelConfig=heatmap_config"; | |
| 361 | + + "&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config"; | |
| 362 | 362 | i3GEO.util.scriptTag(p, criaLayer, "i3GEO.pluginI3geo.heatmap_script"); |
| 363 | 363 | } |
| 364 | 364 | }, |
| ... | ... | @@ -455,33 +455,7 @@ i3GEO.pluginI3geo = |
| 455 | 455 | "visible" : true, |
| 456 | 456 | "opacity" : camada.transparency, |
| 457 | 457 | "name" : camada.name, |
| 458 | - "styles" : [ | |
| 459 | - { | |
| 460 | - url : i3GEO.configura.locaplic + "/imagens/google/m1", | |
| 461 | - height : 53, | |
| 462 | - width : 53 | |
| 463 | - }, | |
| 464 | - { | |
| 465 | - url : i3GEO.configura.locaplic + "/imagens/google/m2", | |
| 466 | - height : 56, | |
| 467 | - width : 56 | |
| 468 | - }, | |
| 469 | - { | |
| 470 | - url : i3GEO.configura.locaplic + "/imagens/google/m3", | |
| 471 | - height : 66, | |
| 472 | - width : 66 | |
| 473 | - }, | |
| 474 | - { | |
| 475 | - url : i3GEO.configura.locaplic + "/imagens/google/m4", | |
| 476 | - height : 78, | |
| 477 | - width : 78 | |
| 478 | - }, | |
| 479 | - { | |
| 480 | - url : i3GEO.configura.locaplic + "/imagens/google/m5", | |
| 481 | - height : 90, | |
| 482 | - width : 90 | |
| 483 | - } | |
| 484 | - ] | |
| 458 | + "styles" : markercluster_config.estilos | |
| 485 | 459 | }); |
| 486 | 460 | i3GEO.janela.fechaAguarde("aguardePlugin"); |
| 487 | 461 | i3GEO.eventos.cliquePerm.ativo = false; | ... | ... |
ferramentas/markercluster/funcoes.php
| ... | ... | @@ -70,7 +70,7 @@ function markerclusterMapfile(){ |
| 70 | 70 | } |
| 71 | 71 | function markerclusterEstilos($map_file,$layer,$tipoEstilos){ |
| 72 | 72 | if($tipoEstilos == "default"){ |
| 73 | - $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}]'; | |
| 73 | + $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}]}'; | |
| 74 | 74 | } |
| 75 | 75 | else{ |
| 76 | 76 | $gradiente = array(); | ... | ... |
interface/openlayersdebug.htm
| ... | ... | @@ -203,7 +203,7 @@ i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterfac |
| 203 | 203 | Após a criação, é criado o objeto i3geoOL que corresponde ao objeto map da API do OpenLayers. |
| 204 | 204 | Vc pode usar i3geoOL para aplicar os métodos e verificar as propriedades da API do OpenLayers |
| 205 | 205 | */ |
| 206 | - | |
| 206 | +i3GEO.mapa.AUTORESIZE = true; | |
| 207 | 207 | i3GEO.cria(); |
| 208 | 208 | /* |
| 209 | 209 | Inicializa o mapa |
| ... | ... | @@ -251,7 +251,7 @@ i3GEO.Interface.ATIVAMENUCONTEXTO = false; |
| 251 | 251 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true; |
| 252 | 252 | i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true; |
| 253 | 253 | i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; |
| 254 | -i3GEO.mapa.AUTORESIZE = true; | |
| 254 | + | |
| 255 | 255 | i3GEO.guias.TIPO = "movel"; |
| 256 | 256 | |
| 257 | 257 | ... | ... |