Commit bda52ea3c92fa908142d5003485981b59f658be5
1 parent
252f40f5
Exists in
master
and in
7 other branches
Incluida uma nova opção de configuração do mapa que possibilita a geração de um …
…contador regressivo. Baseado em um tempo definido pelo usuário ou na configuração do HTML, após o tempo definido, o mapa é redesenhado automaticamente.
Showing
8 changed files
with
119 additions
and
14 deletions
Show diff stats
aplicmap/geral.htm
... | ... | @@ -71,7 +71,9 @@ arquivos não compactados, bastando substituir por i3geonaocompacto --> |
71 | 71 | <tr><td colspan=2 ><div id=ajuda class=verdeescuro style="text-align:left;" >I3Geo</div></td></tr> |
72 | 72 | --> |
73 | 73 | <tr> |
74 | - <td class=tdbranca ><div id=visual ></div> | |
74 | + <td class=tdbranca > | |
75 | + <div id=visual ></div> | |
76 | + <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div> | |
75 | 77 | </td> |
76 | 78 | <td class=tdbranca > |
77 | 79 | <table width=100% ><tr> |
... | ... | @@ -418,6 +420,15 @@ Os visuais disponíveis são obtidos do diretório i3geo/imagens/visual na iniciali |
418 | 420 | g_visual = "default"; |
419 | 421 | |
420 | 422 | /* |
423 | +Variable: g_autoRedesenho | |
424 | + | |
425 | +Ativa o auto redesenho após um determinado tempo (milisegundos). | |
426 | + | |
427 | +Após decorrido o tempo definido, o mapa é redesenhado. Se for 0 o temporizador não é ativado. | |
428 | +*/ | |
429 | +g_autoRedesenho = 0; | |
430 | + | |
431 | +/* | |
421 | 432 | Variable: objmapa.guiaTemas |
422 | 433 | |
423 | 434 | Define qual div corresponde ao local de listagem das camadas disponíveis no mapa | ... | ... |
classesjs/ferramentas.js
... | ... | @@ -31,6 +31,13 @@ Free Software Foundation, Inc., no endereço |
31 | 31 | Section: propriedades do mapa |
32 | 32 | */ |
33 | 33 | /* |
34 | +Function: temporizador | |
35 | + | |
36 | +Define o intervalo de tempo para redesenho automático do mapa. | |
37 | +*/ | |
38 | +function autoredesenha() | |
39 | +{wdocaf("300px","180px",g_locaplic+"/ferramentas/opcoes_autoredesenha/index.htm","","","");} | |
40 | +/* | |
34 | 41 | Function: salvaMapa |
35 | 42 | |
36 | 43 | Salva o map file localmente | ... | ... |
classesjs/ferramentas_compacto.js
1 | +function autoredesenha(){wdocaf("300px","180px",g_locaplic+"/ferramentas/opcoes_autoredesenha/index.htm","","","");} | |
1 | 2 | function salvaMapa(){wdocaf("300px","180px",g_locaplic+"/ferramentas/salvamapa/index.htm","","","Salva mapa");} |
2 | 3 | function carregaMapa(){wdocaf("300px","150px",g_locaplic+"/ferramentas/carregamapa/index.htm?urlatual="+window.location,"","","Carrega mapa");} |
3 | 4 | function convertews(){wdocaf("440px","280px",g_locaplic+"/ferramentas/convertews/index.htm","","","Web service");} | ... | ... |
classesjs/funcoes.js
... | ... | @@ -1413,6 +1413,7 @@ function mudaboxnf(tipo) |
1413 | 1413 | g_operacao = tipo; |
1414 | 1414 | clearTimeout(objmapa.tempo); |
1415 | 1415 | objmapa.tempo = setTimeout('remapaf()',(4000)); |
1416 | + autoRedesenho("reinicia"); | |
1416 | 1417 | if ($i("aplicari")) |
1417 | 1418 | { |
1418 | 1419 | $i("aplicari").style.display="block"; |
... | ... | @@ -2584,6 +2585,58 @@ function pegaTema(celula) |
2584 | 2585 | Section: redesenho do mapa |
2585 | 2586 | */ |
2586 | 2587 | /* |
2588 | +Function: autoRedesenho | |
2589 | + | |
2590 | +Controla a opção de redesenho automático temporizado | |
2591 | + | |
2592 | +Para funcionar, a variável de inicialização g_autoRedesenho deve ser > 0 | |
2593 | + | |
2594 | +Parameters: | |
2595 | + | |
2596 | +opcao: ativa|desativa|redesenha | |
2597 | +*/ | |
2598 | +function autoRedesenho(opcao) | |
2599 | +{ | |
2600 | + if (opcao == "desativa") | |
2601 | + { | |
2602 | + g_autoRedesenho = 0; | |
2603 | + clearTimeout(objmapa.tempoRedesenho); | |
2604 | + clearTimeout(objmapa.contaTempoRedesenho); | |
2605 | + objmapa.tempoRedesenho = ""; | |
2606 | + objmapa.contaTempoRedesenho = ""; | |
2607 | + objmapa.tempoRedesenho = ""; | |
2608 | + if ($i("tempoRedesenho")) | |
2609 | + {$i("tempoRedesenho").style.display = "none";} | |
2610 | + } | |
2611 | + if (opcao == "ativa") | |
2612 | + { | |
2613 | + if (($i("tempoRedesenho")) && (g_autoRedesenho > 0)) | |
2614 | + {$i("tempoRedesenho").style.display = "block";} | |
2615 | + if (g_autoRedesenho > 0) | |
2616 | + {objmapa.tempoRedesenho = setTimeout('autoRedesenho("redesenha")',g_autoRedesenho);} | |
2617 | + if (($i("tempoRedesenho")) && (g_autoRedesenho > 0)) | |
2618 | + { | |
2619 | + $i("tempoRedesenho").innerHTML = g_autoRedesenho/1000; | |
2620 | + objmapa.contaTempoRedesenho = setTimeout('autoRedesenho("contagem")',1000); | |
2621 | + } | |
2622 | + } | |
2623 | + if (opcao == "redesenha") | |
2624 | + { | |
2625 | + clearTimeout(objmapa.tempoRedesenho); | |
2626 | + clearTimeout(objmapa.contaTempoRedesenho); | |
2627 | + remapaf(); | |
2628 | + autoRedesenho("ativa"); | |
2629 | + } | |
2630 | + if (opcao == "contagem") | |
2631 | + { | |
2632 | + if ($i("tempoRedesenho")) | |
2633 | + { | |
2634 | + $i("tempoRedesenho").innerHTML = parseInt($i("tempoRedesenho").innerHTML) - 1; | |
2635 | + objmapa.contaTempoRedesenho = setTimeout('autoRedesenho("contagem")',1000); | |
2636 | + } | |
2637 | + } | |
2638 | +} | |
2639 | +/* | |
2587 | 2640 | Function: remapaf |
2588 | 2641 | |
2589 | 2642 | Prepara o redesenho do mapa de acordo com o que esta visivel ou nao. | ... | ... |
classesjs/funcoes_compacto.js
... | ... | @@ -156,7 +156,7 @@ function initJanelaRef(){ if(!$i("winRef")){ var novoel=document.createElement(" |
156 | 156 | else{YAHOO.janelaRef.xp.panel.moveTo((imagemxi+objmapa.w-167),imagemyi+4);} |
157 | 157 | var escondeRef=function(){ YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close, "click"); YAHOO.janelaRef.xp.panel.destroy(); iCookie("g_mapaRefDisplay","none");} |
158 | 158 | YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close, "click", escondeRef); iCookie("g_mapaRefDisplay","block"); objmapa.atualizaReferencia();} |
159 | -function mudaboxnf(tipo){ g_operacao=tipo; clearTimeout(objmapa.tempo); objmapa.tempo=setTimeout('remapaf()',(4000)); if($i("aplicari")){ $i("aplicari").style.display="block"; if(navm){ mx=objposicaomouse.x-10; my=objposicaomouse.y-15; with($i("aplicari").style){ pixelLeft=mx+document.body.scrollLeft; pixelTop=my+document.body.scrollTop;}} | |
159 | +function mudaboxnf(tipo){ g_operacao=tipo; clearTimeout(objmapa.tempo); objmapa.tempo=setTimeout('remapaf()',(4000)); autoRedesenho("reinicia"); if($i("aplicari")){ $i("aplicari").style.display="block"; if(navm){ mx=objposicaomouse.x-10; my=objposicaomouse.y-15; with($i("aplicari").style){ pixelLeft=mx+document.body.scrollLeft; pixelTop=my+document.body.scrollTop;}} | |
160 | 160 | if(navn){ with($i("aplicari").style){ left=objposicaomouse.x; top=objposicaomouse.y+document.body.scrollTop;}}}} |
161 | 161 | function movelentef(){ if($i("lente")){ if($i("lente").style.visibility=="visible"){ var esq=(objposicaocursor.telax-imagemxi)*2.25; var topo=(objposicaocursor.telay-imagemyi)*2.25; var clipt="rect("+(topo-40)+" "+(esq+40)+" "+(topo+40)+" "+(esq-40)+")"; with($i("lente").style){ clip=clipt; eval(g_tipotop+"=(imagemyi-(topo-40))+g_postpx"); eval(g_tipoleft+"=(imagemxi-(esq-40))+g_postpx");}}}} |
162 | 162 | function zoomiauto(){ objaguarde.abre("ajaxredesenha","Aguarde..."); g_fatordezoom=0; var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel=2&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); g_operacao="navega"; cp.call(p,"aproxima",ajaxredesenha);} |
... | ... | @@ -276,6 +276,12 @@ function pegaMapas(retorno){ var ins="<br>"; var mapa=retorno.data.mapas; for(ig |
276 | 276 | function arvoreclick(itemID){ if(itemID.search("tema")==0){ if($i(itemID).checked==true){$i(itemID).checked=false;} |
277 | 277 | else{$i(itemID).checked=true;}}} |
278 | 278 | function pegaTema(celula){ var nos=celula.parentNode.childNodes; for(no=0;no<nos.length;no++){if(nos[no].type=="checkbox"){return nos[no].value;}}} |
279 | +function autoRedesenho(opcao){ if(opcao=="desativa"){ g_autoRedesenho=0; clearTimeout(objmapa.tempoRedesenho); clearTimeout(objmapa.contaTempoRedesenho); objmapa.tempoRedesenho=""; objmapa.contaTempoRedesenho=""; objmapa.tempoRedesenho=""; if($i("tempoRedesenho")){$i("tempoRedesenho").style.display="none";}} | |
280 | + if(opcao=="ativa"){ if(($i("tempoRedesenho"))&&(g_autoRedesenho > 0)){$i("tempoRedesenho").style.display="block";} | |
281 | + if(g_autoRedesenho > 0){objmapa.tempoRedesenho=setTimeout('autoRedesenho("redesenha")',g_autoRedesenho);} | |
282 | + if(($i("tempoRedesenho"))&&(g_autoRedesenho > 0)){ $i("tempoRedesenho").innerHTML=g_autoRedesenho/1000; objmapa.contaTempoRedesenho=setTimeout('autoRedesenho("contagem")',1000);}} | |
283 | + if(opcao=="redesenha"){ clearTimeout(objmapa.tempoRedesenho); clearTimeout(objmapa.contaTempoRedesenho); remapaf(); autoRedesenho("ativa");} | |
284 | + if(opcao=="contagem"){ if($i("tempoRedesenho")){ $i("tempoRedesenho").innerHTML=parseInt($i("tempoRedesenho").innerHTML)-1; objmapa.contaTempoRedesenho=setTimeout('autoRedesenho("contagem")',1000);}}} | |
279 | 285 | function remapaf(){ clearTimeout(objmapa.tempo); objmapa.tempo=""; objmapa.temaAtivo=""; if($i(objmapa.guiaTemas+"obj")){ var iguias=$i(objmapa.guiaTemas+"obj").getElementsByTagName("input"); var tsl=new Array(); var tsd=new Array(); for(i=0;i<iguias.length;i++){ if(iguias[i].type=="checkbox"){ if(iguias[i].checked==false){tsd.push(iguias[i].value);} |
280 | 286 | if(iguias[i].checked==true){tsl.push(iguias[i].value);}}} |
281 | 287 | var remapaAdicNovos=function remapaAdicNovos(retorno){ if($i("buscatema")){ var g=$i(objmapa.guiaMenu+"obj"); var iguias=g.getElementsByTagName("input"); var ta=new Array(); for(i=0;i<iguias.length;i++){ if(iguias[i].type=="checkbox"){ if(iguias[i].checked==true){ ta.push(iguias[i].value); iguias[i].checked=false;}}} | ... | ... |
classesjs/i3geo_tudo_compacto.js
... | ... | @@ -916,7 +916,7 @@ function initJanelaRef(){ if(!$i("winRef")){ var novoel=document.createElement(" |
916 | 916 | else{YAHOO.janelaRef.xp.panel.moveTo((imagemxi+objmapa.w-167),imagemyi+4);} |
917 | 917 | var escondeRef=function(){ YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close, "click"); YAHOO.janelaRef.xp.panel.destroy(); iCookie("g_mapaRefDisplay","none");} |
918 | 918 | YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close, "click", escondeRef); iCookie("g_mapaRefDisplay","block"); objmapa.atualizaReferencia();} |
919 | -function mudaboxnf(tipo){ g_operacao=tipo; clearTimeout(objmapa.tempo); objmapa.tempo=setTimeout('remapaf()',(4000)); if($i("aplicari")){ $i("aplicari").style.display="block"; if(navm){ mx=objposicaomouse.x-10; my=objposicaomouse.y-15; with($i("aplicari").style){ pixelLeft=mx+document.body.scrollLeft; pixelTop=my+document.body.scrollTop;}} | |
919 | +function mudaboxnf(tipo){ g_operacao=tipo; clearTimeout(objmapa.tempo); objmapa.tempo=setTimeout('remapaf()',(4000)); autoRedesenho("reinicia"); if($i("aplicari")){ $i("aplicari").style.display="block"; if(navm){ mx=objposicaomouse.x-10; my=objposicaomouse.y-15; with($i("aplicari").style){ pixelLeft=mx+document.body.scrollLeft; pixelTop=my+document.body.scrollTop;}} | |
920 | 920 | if(navn){ with($i("aplicari").style){ left=objposicaomouse.x; top=objposicaomouse.y+document.body.scrollTop;}}}} |
921 | 921 | function movelentef(){ if($i("lente")){ if($i("lente").style.visibility=="visible"){ var esq=(objposicaocursor.telax-imagemxi)*2.25; var topo=(objposicaocursor.telay-imagemyi)*2.25; var clipt="rect("+(topo-40)+" "+(esq+40)+" "+(topo+40)+" "+(esq-40)+")"; with($i("lente").style){ clip=clipt; eval(g_tipotop+"=(imagemyi-(topo-40))+g_postpx"); eval(g_tipoleft+"=(imagemxi-(esq-40))+g_postpx");}}}} |
922 | 922 | function zoomiauto(){ objaguarde.abre("ajaxredesenha","Aguarde..."); g_fatordezoom=0; var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel=2&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); g_operacao="navega"; cp.call(p,"aproxima",ajaxredesenha);} |
... | ... | @@ -1036,6 +1036,12 @@ function pegaMapas(retorno){ var ins="<br>"; var mapa=retorno.data.mapas; for(ig |
1036 | 1036 | function arvoreclick(itemID){ if(itemID.search("tema")==0){ if($i(itemID).checked==true){$i(itemID).checked=false;} |
1037 | 1037 | else{$i(itemID).checked=true;}}} |
1038 | 1038 | function pegaTema(celula){ var nos=celula.parentNode.childNodes; for(no=0;no<nos.length;no++){if(nos[no].type=="checkbox"){return nos[no].value;}}} |
1039 | +function autoRedesenho(opcao){ if(opcao=="desativa"){ g_autoRedesenho=0; clearTimeout(objmapa.tempoRedesenho); clearTimeout(objmapa.contaTempoRedesenho); objmapa.tempoRedesenho=""; objmapa.contaTempoRedesenho=""; objmapa.tempoRedesenho=""; if($i("tempoRedesenho")){$i("tempoRedesenho").style.display="none";}} | |
1040 | + if(opcao=="ativa"){ if(($i("tempoRedesenho"))&&(g_autoRedesenho > 0)){$i("tempoRedesenho").style.display="block";} | |
1041 | + if(g_autoRedesenho > 0){objmapa.tempoRedesenho=setTimeout('autoRedesenho("redesenha")',g_autoRedesenho);} | |
1042 | + if(($i("tempoRedesenho"))&&(g_autoRedesenho > 0)){ $i("tempoRedesenho").innerHTML=g_autoRedesenho/1000; objmapa.contaTempoRedesenho=setTimeout('autoRedesenho("contagem")',1000);}} | |
1043 | + if(opcao=="redesenha"){ clearTimeout(objmapa.tempoRedesenho); clearTimeout(objmapa.contaTempoRedesenho); remapaf(); autoRedesenho("ativa");} | |
1044 | + if(opcao=="contagem"){ if($i("tempoRedesenho")){ $i("tempoRedesenho").innerHTML=parseInt($i("tempoRedesenho").innerHTML)-1; objmapa.contaTempoRedesenho=setTimeout('autoRedesenho("contagem")',1000);}}} | |
1039 | 1045 | function remapaf(){ clearTimeout(objmapa.tempo); objmapa.tempo=""; objmapa.temaAtivo=""; if($i(objmapa.guiaTemas+"obj")){ var iguias=$i(objmapa.guiaTemas+"obj").getElementsByTagName("input"); var tsl=new Array(); var tsd=new Array(); for(i=0;i<iguias.length;i++){ if(iguias[i].type=="checkbox"){ if(iguias[i].checked==false){tsd.push(iguias[i].value);} |
1040 | 1046 | if(iguias[i].checked==true){tsl.push(iguias[i].value);}}} |
1041 | 1047 | var remapaAdicNovos=function remapaAdicNovos(retorno){ if($i("buscatema")){ var g=$i(objmapa.guiaMenu+"obj"); var iguias=g.getElementsByTagName("input"); var ta=new Array(); for(i=0;i<iguias.length;i++){ if(iguias[i].type=="checkbox"){ if(iguias[i].checked==true){ ta.push(iguias[i].value); iguias[i].checked=false;}}} |
... | ... | @@ -1124,6 +1130,7 @@ function limpacontainerf(){ if($i("pontosins")){$i("pontosins").innerHTML="";} |
1124 | 1130 | if($i("mostradistancia")){$i("mostradistancia").style.display="none";}} |
1125 | 1131 | function testafuncoes(){} |
1126 | 1132 | |
1133 | +function autoredesenha(){wdocaf("300px","180px",g_locaplic+"/ferramentas/opcoes_autoredesenha/index.htm","","","");} | |
1127 | 1134 | function salvaMapa(){wdocaf("300px","180px",g_locaplic+"/ferramentas/salvamapa/index.htm","","","Salva mapa");} |
1128 | 1135 | function carregaMapa(){wdocaf("300px","150px",g_locaplic+"/ferramentas/carregamapa/index.htm?urlatual="+window.location,"","","Carrega mapa");} |
1129 | 1136 | function convertews(){wdocaf("440px","280px",g_locaplic+"/ferramentas/convertews/index.htm","","","Web service");} |
... | ... | @@ -1246,7 +1253,7 @@ function ajaxabrelente(retorno){ try{ var retorno=retorno.data; if(retorno=="err |
1246 | 1253 | function ajaxdestaca(retorno){ var retorno=retorno.data; var m=new Image(); m.src=retorno; if(!$i("img_d")){ var novoel=document.createElement("div"); novoel.id="div_d"; document.body.appendChild(novoel); $i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d'/>"; $i("div_d").style.left=parseInt($i("corpoMapa").style.left); $i("div_d").style.top=parseInt($i("corpoMapa").style.top); $i("img_d").style.left=0; $i("img_d").style.top=0; $i("img_d").style.width=objmapa.w; $i("img_d").style.height=objmapa.h; $i("div_d").style.clip='rect(0 75 75 0)'; $i("img_d").src=retorno; var novoeli=document.createElement("div"); novoeli.id="div_di"; novoel.appendChild(novoeli); $i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>";} |
1247 | 1254 | $i("div_d").innerHTML=""; var novoel=document.createElement("input"); novoel.id="img_d"; novoel.style.position="relative"; novoel.style.top="0px"; novoel.style.left="0px"; novoel.type="image"; novoel.src=m.src; novoel.style.display="block"; $i("div_d").appendChild(novoel); objaguarde.fecha("ajaxdestaca");}function testaajax(){} |
1248 | 1255 | |
1249 | -g_sid=window.location.href.split("?")[1];atuaLeg="nao";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
1256 | +g_autoRedesenha=0;g_sid=window.location.href.split("?")[1];atuaLeg="nao";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
1250 | 1257 | else{ g_postpx="px"; g_tipotop="top"; g_tipoleft="left";}window.onresize=function(){window.status="Após alterar o tamanho da janela, clique no botão de refresh do navegador";} |
1251 | 1258 | function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor(); objposicaomouse=new posicaomouse(); imgBranco=new Image(); imgBranco.src=g_locaplic+"/imagens/branco.gif"; var icache=new Array("foldermapa.gif","extent.gif","tic.png","maisvermelho.png","maisverde.png","maisamarelo.png","temas.png","x.gif","sobe.gif","desce.gif","quadro.png","quadro1.png","excluir.png"); for(i=0;icache.lenght;i++){ var temp=new Image(); temp.src=g_locaplic+"/imagens/"+icache[i];} |
1252 | 1259 | var temp=new Image(); temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/plus.gif"; temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/minus.gif"; var diminuix=(navm)? g_diminuixM : g_diminuixN; var diminuiy=(navm)? g_diminuiyM : g_diminuiyN; if(e==undefined){ var menos=0; if($i("contemFerramentas")){menos=menos+parseInt($i("contemFerramentas").style.width);} |
... | ... | @@ -1258,7 +1265,7 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
1258 | 1265 | document.body.style.width=novow; document.body.style.height=novoh; this.w=parseInt(document.body.style.width)-menos-diminuix; this.h=parseInt(document.body.style.height)-diminuiy; if(document.getElementById("corpoMapa")){ if(document.getElementById("corpoMapa").style.width){ this.w=parseInt(document.getElementById("corpoMapa").style.width); this.h=parseInt(document.getElementById("corpoMapa").style.height);}}} |
1259 | 1266 | else{ this.w=document.body.offsetWidth-parseInt($i("contemFerramentas").style.width)-diminuix; this.h=document.body.offsetHeight-diminuiy;} |
1260 | 1267 | if($i("openlayers")){ $i("openlayers").style.width=this.w; $i("openlayers").style.height=this.h;} |
1261 | - this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
1268 | + this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.tempoRedesenho=""; this.contaTempoRedesenho=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
1262 | 1269 | if(!window.testamenususpenso){alert("menususpenso.js com problemas");} |
1263 | 1270 | if(!window.testaferramentas){alert("ferramentas.js com problemas");} |
1264 | 1271 | if(!window.testaajax){alert("redesenho.js com problemas");} |
... | ... | @@ -1286,7 +1293,8 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
1286 | 1293 | $i("mst").style.width=objmapa.w+temp+"px"; $i("contemImg").style.height=objmapa.h+"px"; $i("contemImg").style.width=objmapa.w+"px"; calcposf(); if($i("maisBotoes1")){YAHOO.janelaBotoes1.xp.panel.moveTo(imagemxi+40,imagemyi+10);} |
1287 | 1294 | if($i("maisBotoes2")){YAHOO.janelaBotoes2.xp.panel.moveTo(imagemxi,imagemyi+10);} |
1288 | 1295 | mudaiconf("pan"); if(g_entorno=="sim"){ geraURLentorno(); var letras=["L","O","N","S"]; for(l=0;l<letras.length;l++){ if($i("img"+letras[l])){ $i("img"+letras[l]).style.width=objmapa.w; $i("img"+letras[l]).style.height=objmapa.h; $i("img"+letras[l]).style.display="block";}} |
1289 | - ajustaEntorno();}} | |
1296 | + ajustaEntorno();} | |
1297 | + autoRedesenho("ativa");} | |
1290 | 1298 | else{alert("Erro. Impossivel criar o mapa "+retorno.data);return;} |
1291 | 1299 | var temp=g_guiaativa.split("guia"); mostraguiaf(temp[1]); if($i(objmapa.guiaListaMapas)){ if(g_locmapas==""){$i(objmapa.guiaListaMapas).style.display="none"}} |
1292 | 1300 | if(pCookie("g_janelaMen")){g_janelaMen=pCookie("g_janelaMen");} |
... | ... | @@ -1302,7 +1310,7 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
1302 | 1310 | this.ativaLocallizarXY=function(id){ if($i(id)){ $i(id).innerHTML="localiza X:<input class=digitar id='xg' title='grau' type=text size=5 value='-00'/> <input class=digitar id='xm' title='minuto' type=text size=3 value='00'/> <input class=digitar id='xs' title='segundo' type=text size=5 value='00.00'/> Y:<input class=digitar id='yg' title='grau' type=text size=3 value='-00'/> <input class=digitar id='ym' title='minuto' type=text size=3 value='00'/> <input class=digitar id='ys' title='segundo' type=text size=5 value='00.00'/><img title='zoom' onclick='zoomPonto()' src="+$im("tic.png")+" id=procurarxy/>"; $i(id).onmouseover=function(){mostradicasf(this,'Digite as coordenadas de um ponto(X=longitude e Y=latitude)para localizá-lo no mapa. O centro do mapa será deslocado para o ponto digitado.','');} |
1303 | 1311 | $i(id).onmouseout=function(){mostradicasf(this,'');}}} |
1304 | 1312 | this.ativaBuscaRapida=function(id){ if($i(id)){ var ins="<input onclick='javascript:this.value=\"\"' id=valorBuscaRapida title='digite o texto para busca' type=text size=30 class=digitar value='busca rápida...'/>"; ins+="<img src='"+g_locaplic+"/imagens/tic.png' onclick='buscaRapida()'/>"; $i(id).innerHTML=ins;}} |
1305 | - this.ativaListaPropriedades=function(id){ if($i(id)){ var lista={ "propriedades": [{text: "Tipo de imagem", url: "javascript:tipoimagem()"},{text: "Legenda", url: "javascript:opcoesLegenda()"},{text: "Escala", url: "javascript:opcoesEscala()"},{text: "Tamanho", url: "javascript:tamanho()"},{text: "Ativa/desativa entorno", url: "javascript:ativaEntorno()"},{text: "Ativa/desativa logo", url: "javascript:ativaLogo()"},{text: "Cor da selecao", url: "javascript:queryMap()"},{text: "Cor do fundo", url: "javascript:corFundo()"},{text: "Grade de coordenadas", url: "javascript:gradeCoord()"},{text: "Template", url: "javascript:template()"} | |
1313 | + this.ativaListaPropriedades=function(id){ if($i(id)){ var lista={ "propriedades": [{text: "Tipo de imagem", url: "javascript:tipoimagem()"},{text: "Legenda", url: "javascript:opcoesLegenda()"},{text: "Escala", url: "javascript:opcoesEscala()"},{text: "Tamanho", url: "javascript:tamanho()"},{text: "Ativa/desativa entorno", url: "javascript:ativaEntorno()"},{text: "Ativa/desativa logo", url: "javascript:ativaLogo()"},{text: "Cor da selecao", url: "javascript:queryMap()"},{text: "Cor do fundo", url: "javascript:corFundo()"},{text: "Grade de coordenadas", url: "javascript:gradeCoord()"},{text: "Template", url: "javascript:template()"},{text: "Temporizador", url: "javascript:autoredesenha()"} | |
1306 | 1314 | ]}; listaPr=new Object(); listaPr=treeviewNew("listaPr", "default", id, null); listaPr.createItem("propriedadesRaiz", "<b>Propriedades do mapa</b>", g_locaplic+"/imagens/visual/"+g_visual+"/foldermapa1.gif", true, false, true, null); var im=""; if(navn){var im="<img src='"+g_locaplic+"/imagens/branco.gif' width=0 height=13/>";} |
1307 | 1315 | for(l=0;l<lista.propriedades.length;l++){ tnome="<span onclick='"+lista.propriedades[l].url+"'>"+im+"<img src='"+g_locaplic+"/imagens/visual/"+g_visual+"/tic.png'/> "+lista.propriedades[l].text+" </span>"; listaPr.createItem("propriedadesMapa"+l, tnome, imgBranco, false, true, false, "propriedadesRaiz");} |
1308 | 1316 | listaPr.createItem("","", imgBranco, false, true, false, "propriedadesRaiz");}} | ... | ... |
classesjs/iniciamma.js
... | ... | @@ -36,9 +36,17 @@ Free Software Foundation, Inc., no endereço |
36 | 36 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
37 | 37 | */ |
38 | 38 | /* |
39 | -Section: variáveis internas | |
39 | +Section: variáveis de configuração | |
40 | 40 | */ |
41 | 41 | /* |
42 | +Variable: g_autoRedesenho | |
43 | + | |
44 | +Ativa o auto redesenho após um determinado temp. | |
45 | + | |
46 | +Após decorrido o tempo definido, o mapa é redesenhado. Se for 0 o temporizador não é ativado. | |
47 | +*/ | |
48 | +g_autoRedesenha = 0; | |
49 | +/* | |
42 | 50 | Variable: g_sid |
43 | 51 | |
44 | 52 | Id da seção atual no servidor. |
... | ... | @@ -610,6 +618,14 @@ function Mapa(e,m) |
610 | 618 | */ |
611 | 619 | this.tempo = ""; // |
612 | 620 | /* |
621 | + Variable: objmapa.autoRedesenho | |
622 | + | |
623 | + Inicia o temporizador para redesenhar o mapa automaticamente. | |
624 | + | |
625 | + */ | |
626 | + this.tempoRedesenho = ""; // | |
627 | + this.contaTempoRedesenho = ""; // | |
628 | + /* | |
613 | 629 | Variable: objmapa.temaAtivo |
614 | 630 | |
615 | 631 | Tema que esta ativo. |
... | ... | @@ -903,7 +919,8 @@ function Mapa(e,m) |
903 | 919 | } |
904 | 920 | } |
905 | 921 | ajustaEntorno(); |
906 | - } | |
922 | + } | |
923 | + autoRedesenho("ativa"); | |
907 | 924 | } |
908 | 925 | else |
909 | 926 | {alert("Erro. Impossivel criar o mapa "+retorno.data);return;} |
... | ... | @@ -1015,7 +1032,8 @@ function Mapa(e,m) |
1015 | 1032 | { text: "Cor da selecao", url: "javascript:queryMap()" }, |
1016 | 1033 | { text: "Cor do fundo", url: "javascript:corFundo()" }, |
1017 | 1034 | { text: "Grade de coordenadas", url: "javascript:gradeCoord()" }, |
1018 | - { text: "Template", url: "javascript:template()" } | |
1035 | + { text: "Template", url: "javascript:template()" }, | |
1036 | + { text: "Temporizador", url: "javascript:autoredesenha()" } | |
1019 | 1037 | ]}; |
1020 | 1038 | listaPr = new Object(); |
1021 | 1039 | listaPr = treeviewNew("listaPr", "default", id, null); | ... | ... |
classesjs/iniciamma_compacto.js
1 | -g_sid=window.location.href.split("?")[1];atuaLeg="nao";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
1 | +g_autoRedesenha=0;g_sid=window.location.href.split("?")[1];atuaLeg="nao";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
2 | 2 | else{ g_postpx="px"; g_tipotop="top"; g_tipoleft="left";}window.onresize=function(){window.status="Após alterar o tamanho da janela, clique no botão de refresh do navegador";} |
3 | 3 | function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor(); objposicaomouse=new posicaomouse(); imgBranco=new Image(); imgBranco.src=g_locaplic+"/imagens/branco.gif"; var icache=new Array("foldermapa.gif","extent.gif","tic.png","maisvermelho.png","maisverde.png","maisamarelo.png","temas.png","x.gif","sobe.gif","desce.gif","quadro.png","quadro1.png","excluir.png"); for(i=0;icache.lenght;i++){ var temp=new Image(); temp.src=g_locaplic+"/imagens/"+icache[i];} |
4 | 4 | var temp=new Image(); temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/plus.gif"; temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/minus.gif"; var diminuix=(navm)? g_diminuixM : g_diminuixN; var diminuiy=(navm)? g_diminuiyM : g_diminuiyN; if(e==undefined){ var menos=0; if($i("contemFerramentas")){menos=menos+parseInt($i("contemFerramentas").style.width);} |
... | ... | @@ -10,7 +10,7 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
10 | 10 | document.body.style.width=novow; document.body.style.height=novoh; this.w=parseInt(document.body.style.width)-menos-diminuix; this.h=parseInt(document.body.style.height)-diminuiy; if(document.getElementById("corpoMapa")){ if(document.getElementById("corpoMapa").style.width){ this.w=parseInt(document.getElementById("corpoMapa").style.width); this.h=parseInt(document.getElementById("corpoMapa").style.height);}}} |
11 | 11 | else{ this.w=document.body.offsetWidth-parseInt($i("contemFerramentas").style.width)-diminuix; this.h=document.body.offsetHeight-diminuiy;} |
12 | 12 | if($i("openlayers")){ $i("openlayers").style.width=this.w; $i("openlayers").style.height=this.h;} |
13 | - this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
13 | + this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.tempoRedesenho=""; this.contaTempoRedesenho=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
14 | 14 | if(!window.testamenususpenso){alert("menususpenso.js com problemas");} |
15 | 15 | if(!window.testaferramentas){alert("ferramentas.js com problemas");} |
16 | 16 | if(!window.testaajax){alert("redesenho.js com problemas");} |
... | ... | @@ -38,7 +38,8 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
38 | 38 | $i("mst").style.width=objmapa.w+temp+"px"; $i("contemImg").style.height=objmapa.h+"px"; $i("contemImg").style.width=objmapa.w+"px"; calcposf(); if($i("maisBotoes1")){YAHOO.janelaBotoes1.xp.panel.moveTo(imagemxi+40,imagemyi+10);} |
39 | 39 | if($i("maisBotoes2")){YAHOO.janelaBotoes2.xp.panel.moveTo(imagemxi,imagemyi+10);} |
40 | 40 | mudaiconf("pan"); if(g_entorno=="sim"){ geraURLentorno(); var letras=["L","O","N","S"]; for(l=0;l<letras.length;l++){ if($i("img"+letras[l])){ $i("img"+letras[l]).style.width=objmapa.w; $i("img"+letras[l]).style.height=objmapa.h; $i("img"+letras[l]).style.display="block";}} |
41 | - ajustaEntorno();}} | |
41 | + ajustaEntorno();} | |
42 | + autoRedesenho("ativa");} | |
42 | 43 | else{alert("Erro. Impossivel criar o mapa "+retorno.data);return;} |
43 | 44 | var temp=g_guiaativa.split("guia"); mostraguiaf(temp[1]); if($i(objmapa.guiaListaMapas)){ if(g_locmapas==""){$i(objmapa.guiaListaMapas).style.display="none"}} |
44 | 45 | if(pCookie("g_janelaMen")){g_janelaMen=pCookie("g_janelaMen");} |
... | ... | @@ -54,7 +55,7 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
54 | 55 | this.ativaLocallizarXY=function(id){ if($i(id)){ $i(id).innerHTML="localiza X:<input class=digitar id='xg' title='grau' type=text size=5 value='-00'/> <input class=digitar id='xm' title='minuto' type=text size=3 value='00'/> <input class=digitar id='xs' title='segundo' type=text size=5 value='00.00'/> Y:<input class=digitar id='yg' title='grau' type=text size=3 value='-00'/> <input class=digitar id='ym' title='minuto' type=text size=3 value='00'/> <input class=digitar id='ys' title='segundo' type=text size=5 value='00.00'/><img title='zoom' onclick='zoomPonto()' src="+$im("tic.png")+" id=procurarxy/>"; $i(id).onmouseover=function(){mostradicasf(this,'Digite as coordenadas de um ponto(X=longitude e Y=latitude)para localizá-lo no mapa. O centro do mapa será deslocado para o ponto digitado.','');} |
55 | 56 | $i(id).onmouseout=function(){mostradicasf(this,'');}}} |
56 | 57 | this.ativaBuscaRapida=function(id){ if($i(id)){ var ins="<input onclick='javascript:this.value=\"\"' id=valorBuscaRapida title='digite o texto para busca' type=text size=30 class=digitar value='busca rápida...'/>"; ins+="<img src='"+g_locaplic+"/imagens/tic.png' onclick='buscaRapida()'/>"; $i(id).innerHTML=ins;}} |
57 | - this.ativaListaPropriedades=function(id){ if($i(id)){ var lista={ "propriedades": [{text: "Tipo de imagem", url: "javascript:tipoimagem()"},{text: "Legenda", url: "javascript:opcoesLegenda()"},{text: "Escala", url: "javascript:opcoesEscala()"},{text: "Tamanho", url: "javascript:tamanho()"},{text: "Ativa/desativa entorno", url: "javascript:ativaEntorno()"},{text: "Ativa/desativa logo", url: "javascript:ativaLogo()"},{text: "Cor da selecao", url: "javascript:queryMap()"},{text: "Cor do fundo", url: "javascript:corFundo()"},{text: "Grade de coordenadas", url: "javascript:gradeCoord()"},{text: "Template", url: "javascript:template()"} | |
58 | + this.ativaListaPropriedades=function(id){ if($i(id)){ var lista={ "propriedades": [{text: "Tipo de imagem", url: "javascript:tipoimagem()"},{text: "Legenda", url: "javascript:opcoesLegenda()"},{text: "Escala", url: "javascript:opcoesEscala()"},{text: "Tamanho", url: "javascript:tamanho()"},{text: "Ativa/desativa entorno", url: "javascript:ativaEntorno()"},{text: "Ativa/desativa logo", url: "javascript:ativaLogo()"},{text: "Cor da selecao", url: "javascript:queryMap()"},{text: "Cor do fundo", url: "javascript:corFundo()"},{text: "Grade de coordenadas", url: "javascript:gradeCoord()"},{text: "Template", url: "javascript:template()"},{text: "Temporizador", url: "javascript:autoredesenha()"} | |
58 | 59 | ]}; listaPr=new Object(); listaPr=treeviewNew("listaPr", "default", id, null); listaPr.createItem("propriedadesRaiz", "<b>Propriedades do mapa</b>", g_locaplic+"/imagens/visual/"+g_visual+"/foldermapa1.gif", true, false, true, null); var im=""; if(navn){var im="<img src='"+g_locaplic+"/imagens/branco.gif' width=0 height=13/>";} |
59 | 60 | for(l=0;l<lista.propriedades.length;l++){ tnome="<span onclick='"+lista.propriedades[l].url+"'>"+im+"<img src='"+g_locaplic+"/imagens/visual/"+g_visual+"/tic.png'/> "+lista.propriedades[l].text+" </span>"; listaPr.createItem("propriedadesMapa"+l, tnome, imgBranco, false, true, false, "propriedadesRaiz");} |
60 | 61 | listaPr.createItem("","", imgBranco, false, true, false, "propriedadesRaiz");}} | ... | ... |