Commit 8f5bac8aac65bdc5d4b2aee8fe1eda20c91d2c12
1 parent
2e210a46
Exists in
master
and in
7 other branches
Utilização de JSON ao invés de string javascript no retorno dos dados do servido…
…r durante a inicialização e atualização do mapa. Correções na interface Googleearth.
Showing
21 changed files
with
260 additions
and
129 deletions
Show diff stats
aplicmap/geral.htm
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | o arquivo i3geo.js por i3geonaocompacto.js |
| 14 | 14 | No modo não compactado o código está adaptado para uso com o Firebug do Firefox. |
| 15 | 15 | --> |
| 16 | -<script type="text/javascript" src="../classesjs/i3geo.js"></script> | |
| 16 | +<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | |
| 17 | 17 | <style> |
| 18 | 18 | .yui-log .i3geo {background-color:yellow;} /* customize a color */ |
| 19 | 19 | .yui-log .redesenho {background-color:yellow;} /* customize a color */ | ... | ... |
aplicmap/googleearth.phtml
| ... | ... | @@ -18,51 +18,78 @@ include_once("../ms_configura.php"); |
| 18 | 18 | <script type="text/javascript" src="http://www.google.com/jsapi?key=<?php echo $googleApiKey; ?>"></script> |
| 19 | 19 | <script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> |
| 20 | 20 | </head> |
| 21 | -<body id=i3geo > | |
| 21 | +<body id="i3geo" > | |
| 22 | 22 | <center> |
| 23 | -<table id='mst' width=100% cellspacing='0'> | |
| 24 | -<tr style="border:0px"><td colspan=2 style="background-image:url('../imagens/visual/default/cabeca.png');height:10px"></td></tr> | |
| 23 | +<table id='mst' summary="" style='display:none' width=100% cellspacing='0'> | |
| 24 | +<tr style="border:0px"> | |
| 25 | + <td colspan=2 id="barraSuperior" style="background-image:url('../imagens/visual/default/cabeca.png');height:10px"></td> | |
| 26 | +</tr> | |
| 25 | 27 | <tr> |
| 26 | - <td class=tdbranca id=contemFerramentas style="border:0px;vertical-align:top;width:268px;text-align:left;"> | |
| 28 | +<td> | |
| 27 | 29 | <table width=100% cellspacing=0 cellpadding=0 > |
| 28 | - <tr><td style="background-color:white;border-bottom:0px solid rgb(230,230,230);height:45px"> | |
| 29 | - <!-- Guias principais, não mude o ID, apenas o nome se for desejado --> | |
| 30 | - <div style="top:0px;cursor:pointer;"> | |
| 30 | + <tr> | |
| 31 | + <td title="libera guias" class=tdclaro id=encolheFerramentas style="vertical-align:top;width:5px;text-align:left;"></td> | |
| 32 | + <td> | |
| 33 | + <div class=verdeescuro style="top:0px;cursor:pointer;"> | |
| 31 | 34 | <div id=guia1 class=guia ></div> |
| 32 | 35 | <div id=guia2 class=guia ></div> |
| 33 | 36 | <div id=guia4 class=guia ></div> |
| 34 | 37 | <div id=guia5 class=guia ></div> |
| 35 | 38 | </div> |
| 36 | - </td></tr> | |
| 39 | + </td> | |
| 40 | + </tr> | |
| 37 | 41 | </table> |
| 42 | +</td> | |
| 43 | +<td id="contemMenu" style="text-align:right;height:0px;border-width:0pt 0pt 1px;border-color:rgb(240,240,240)"> | |
| 44 | + <div id="menus" ></div> | |
| 45 | +</td> | |
| 46 | +</tr> | |
| 47 | +<tr> | |
| 48 | + <td class=tdbranca id=contemFerramentas style="vertical-align:top;width:268px;text-align:left;"> | |
| 38 | 49 | <div id='guia1obj' > |
| 39 | - <div id=listaPropriedades style='top:15px;' ></div> | |
| 40 | - <div id=listaTemas style='top:15px;' ></div> | |
| 50 | + <div style='left:5px;top:10px;' id=buscaRapida ></div> | |
| 51 | + <div id=listaPropriedades style='top:15px;' ></div> | |
| 52 | + <div id=listaTemas style='top:15px;'></div> | |
| 41 | 53 | </div> |
| 42 | 54 | <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /></div> |
| 43 | 55 | <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> |
| 44 | 56 | <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> |
| 45 | 57 | </td> |
| 46 | - <td class=verdeclaro style="background-color:white;vertical-align:top;border-width:0px;"> | |
| 47 | - <table width="100%" style="vertical-align:top;"> | |
| 48 | - <!-- Corpo do mapa. Pode ser reposicionado, mas não mude os IDs --> | |
| 49 | - <tr><td></td></tr> | |
| 50 | - <tr><td class=verdeclaro id=contemImg style="text-align:left;background-image:url('../imagens/i3geo1bw.jpg')"> | |
| 51 | - <div id=googleearth ></div> | |
| 58 | + <td style="vertical-align:top;border-width:0px;"> | |
| 59 | + <table width="100%" style="vertical-align:top;border-width:0px"> | |
| 60 | + <tr><td class=verdeclaro id=contemImg > | |
| 61 | + <div id=googleearth style="background-image:url('../imagens/i3geo1bw.jpg');"></div> | |
| 52 | 62 | </td></tr> |
| 53 | 63 | </table> |
| 54 | 64 | </td> |
| 55 | -</tr> | |
| 65 | + </tr> | |
| 56 | 66 | <tr> |
| 57 | 67 | <td class=tdbranca > |
| 68 | + <div id="seletorIdiomas" ></div> | |
| 69 | + <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div> | |
| 58 | 70 | </td> |
| 59 | 71 | <td class=tdbranca > |
| 60 | - <div id=inserirKml ></div> | |
| 72 | + <table width=100% ><tr> | |
| 73 | + <td class=tdbranca > | |
| 74 | + </td> | |
| 75 | + <td class=tdbranca style=text-align:center > | |
| 76 | + <div id=escala ></div> | |
| 77 | + </td> | |
| 78 | + <td class=tdbranca > | |
| 79 | + <div id=inserirKml ></div> | |
| 80 | + </td> | |
| 81 | + <td class=tdbranca > | |
| 82 | + <div id=localizarxy ></div> | |
| 83 | + </td> | |
| 84 | + </tr> | |
| 85 | + <tr><td></td><td class="tdbranca"><div style="text-align:left;font-size:10px;background-color:white;display:none;" id=mostraUTM ></div></td><td></td></tr> | |
| 86 | + </table> | |
| 61 | 87 | </td> |
| 62 | 88 | </tr> |
| 63 | -<tr style="border:0px"><td colspan=2 style="background-image:url('../imagens/visual/default/rodape.png');height:10px"></td></tr> | |
| 89 | +<tr style="border:0px"><td colspan=3 id="barraInferior" style="background-image:url('../imagens/visual/default/rodape.png');height:10px"></td></tr> | |
| 90 | +<tr style="border:0px"><td colspan=3 style=background-color:black ><input style="border:0px none; background-color:black;color:white;font-size:12pt;" type="text" size="1" id="i3geo_letreiro" ></td></tr> | |
| 91 | +<tr style="border:0px"><td colspan=3 style=background-color:black;color:white >geoprocessamento@mma.gov.br</td></tr> | |
| 64 | 92 | </table> |
| 65 | -<a style=text-align:center;color:white href="mailto:edmar.moretti@mma.gov.br">Críticas e sugestões</a> | |
| 66 | 93 | </center> |
| 67 | 94 | <script type="text/javascript"> |
| 68 | 95 | /* | ... | ... |
aplicmap/googlemaps.phtml
| ... | ... | @@ -15,12 +15,8 @@ include_once("../ms_configura.php"); |
| 15 | 15 | } |
| 16 | 16 | </style> |
| 17 | 17 | <title>MMA - Mapa interativo</title> |
| 18 | -<!--- | |
| 19 | -<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=3&sensor=false&key=<?php echo $googleApiKey; ?>"></script> | |
| 20 | ----> | |
| 21 | 18 | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> |
| 22 | 19 | <script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> |
| 23 | - | |
| 24 | 20 | </head> |
| 25 | 21 | <body id="i3geo" > |
| 26 | 22 | <center> | ... | ... |
classesjs/classe_arvoredecamadas.js
| ... | ... | @@ -1228,6 +1228,8 @@ i3GEO.arvoreDeCamadas = { |
| 1228 | 1228 | if(novo[i].tema !== atual[i].tema) |
| 1229 | 1229 | {return (false);} |
| 1230 | 1230 | if(novo[i].sel !== atual[i].sel) |
| 1231 | + {return (false);} | |
| 1232 | + if(novo[i].status !== atual[i].status) | |
| 1231 | 1233 | {return (false);} |
| 1232 | 1234 | } |
| 1233 | 1235 | return(true); | ... | ... |
classesjs/classe_barradebotoes.js
| ... | ... | @@ -792,14 +792,20 @@ i3GEO.barraDeBotoes = { |
| 792 | 792 | */ |
| 793 | 793 | reativa: function(indice){ |
| 794 | 794 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.reativa()");} |
| 795 | - var n,i; | |
| 796 | - if(arguments.length == 1) | |
| 797 | - {i3GEO.barraDeBotoes.BARRAS[indice].show();} | |
| 798 | - else{ | |
| 799 | - n = i3GEO.barraDeBotoes.BARRAS.length; | |
| 800 | - for(i=0;i<n;i++) | |
| 801 | - {i3GEO.barraDeBotoes.BARRAS[i].show();} | |
| 795 | + var abre = function(){ | |
| 796 | + var i, | |
| 797 | + n = i3GEO.barraDeBotoes.BARRAS.length; | |
| 798 | + for(i=0;i<n;i++) | |
| 799 | + {i3GEO.barraDeBotoes.BARRAS[i].show();} | |
| 800 | + }; | |
| 801 | + try{ | |
| 802 | + if(arguments.length == 1) | |
| 803 | + {i3GEO.barraDeBotoes.BARRAS[indice].show();} | |
| 804 | + else{ | |
| 805 | + abre.call(); | |
| 806 | + } | |
| 802 | 807 | } |
| 808 | + catch(e){abre.call();} | |
| 803 | 809 | }, |
| 804 | 810 | /* |
| 805 | 811 | Function: recria |
| ... | ... | @@ -879,11 +885,12 @@ i3GEO.barraDeBotoes = { |
| 879 | 885 | divmensagem.id = "divMensagemBarraDeBotoes"; |
| 880 | 886 | divmensagem.style.border = "0px solid rgb(120 120 120)"; |
| 881 | 887 | divmensagem.style.position = "absolute"; |
| 888 | + divmensagem.style.zIndex = 20000; | |
| 882 | 889 | if($i("i3geo")) |
| 883 | 890 | {$i("i3geo").appendChild(divmensagem);} |
| 884 | 891 | else |
| 885 | 892 | {document.body.appendChild(divmensagem);} |
| 886 | - divmensagem.innerHTML = "<table style='z-index:8000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:left;cursor:pointer;color:blue;' onclick='javascript:i3GEO.barraDeBotoes.AJUDA = false;'>parar</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"; | |
| 893 | + divmensagem.innerHTML = "<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:left;cursor:pointer;color:blue;' onclick='javascript:i3GEO.barraDeBotoes.AJUDA = false;'>parar</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"; | |
| 887 | 894 | } |
| 888 | 895 | if(mensagem != ""){ |
| 889 | 896 | divmensagem.style.left = parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px"; | ... | ... |
classesjs/classe_configura.js
| ... | ... | @@ -142,7 +142,7 @@ i3GEO.configura = { |
| 142 | 142 | { id:"omenudataAnalise18",text: $trad("d30"), url: "javascript:i3GEO.analise.dialogo.linhaDoTempo()" } |
| 143 | 143 | ], |
| 144 | 144 | "janelas": [ |
| 145 | - { id:"omenudataJanelas1",text: $trad("u15"), url: "javascript:initJanelaZoom('1');initJanelaZoom('2')" }, | |
| 145 | + { id:"omenudataJanelas1",text: $trad("u15"), url: "javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)" }, | |
| 146 | 146 | { id:"omenudataJanelas2",text: $trad("u16"), url: "javascript:i3GEO.ajuda.abreJanela()" } |
| 147 | 147 | ], |
| 148 | 148 | "arquivos": [ |
| ... | ... | @@ -803,7 +803,8 @@ i3GEO.configura = { |
| 803 | 803 | g_operacao='identifica'; |
| 804 | 804 | i3GEO.barraDeBotoes.BOTAOPADRAO = "identifica"; |
| 805 | 805 | cliqueIdentifica = function(){ |
| 806 | - if (g_operacao === "identifica"){ | |
| 806 | + if (g_operacao === "identifica" || i3GEO.barraDeBotoes.BOTAOPADRAO === "identifica"){ | |
| 807 | + g_operacao = "identifica"; | |
| 807 | 808 | eval(i3GEO.configura.funcaoIdentifica); |
| 808 | 809 | } |
| 809 | 810 | }; | ... | ... |
classesjs/classe_gadgets.js
| ... | ... | @@ -360,6 +360,7 @@ i3GEO.gadgets = { |
| 360 | 360 | if(arguments.length === 0) |
| 361 | 361 | {id = i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml;} |
| 362 | 362 | if($i(id)){ |
| 363 | + $i(id).style.display = "block"; | |
| 363 | 364 | atualizaEscalaNumerica = function(escala){ |
| 364 | 365 | var e = $i("i3geo_escalanum"); |
| 365 | 366 | if(!e){ |
| ... | ... | @@ -1019,6 +1020,9 @@ i3GEO.gadgets = { |
| 1019 | 1020 | if(i3GEO.Interface.ATUAL !== "padrao" && $i("omenudataArquivos3")){ |
| 1020 | 1021 | YAHOO.widget.MenuManager.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled", true); |
| 1021 | 1022 | } |
| 1023 | + if(i3GEO.Interface.ATUAL === "googleearth" && $i("omenudataJanelas1")){ | |
| 1024 | + YAHOO.widget.MenuManager.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled", true); | |
| 1025 | + } | |
| 1022 | 1026 | |
| 1023 | 1027 | // |
| 1024 | 1028 | //corrige problemas de estilo | ... | ... |
classesjs/classe_i3geo.js
| ... | ... | @@ -225,6 +225,8 @@ i3GEO = { |
| 225 | 225 | // |
| 226 | 226 | tamanho = i3GEO.calculaTamanho(); |
| 227 | 227 | i3GEO.Interface.cria(tamanho[0],tamanho[1]); |
| 228 | + | |
| 229 | + /* | |
| 228 | 230 | i3GEO.parametros = { |
| 229 | 231 | mapexten: "", |
| 230 | 232 | mapscale: "", |
| ... | ... | @@ -253,6 +255,7 @@ i3GEO = { |
| 253 | 255 | embedLegenda:"nao", |
| 254 | 256 | celularef: "" |
| 255 | 257 | }; |
| 258 | + */ | |
| 256 | 259 | if(tamanho[0] < 550){ |
| 257 | 260 | i = $i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml); |
| 258 | 261 | if(i){i.style.display = "none";} |
| ... | ... | @@ -296,6 +299,8 @@ i3GEO = { |
| 296 | 299 | // |
| 297 | 300 | //executa com eval a string que é retornada pelo servidor (função inicia do mapa_controle.php |
| 298 | 301 | // |
| 302 | + | |
| 303 | + /* | |
| 299 | 304 | tempo = ""; |
| 300 | 305 | titulo = ""; |
| 301 | 306 | eval(retorno.data.variaveis); |
| ... | ... | @@ -303,10 +308,9 @@ i3GEO = { |
| 303 | 308 | if (titulo !== "") |
| 304 | 309 | {top.document.title = titulo;} |
| 305 | 310 | } |
| 306 | - catch(e){ | |
| 307 | - if(typeof(console) !== 'undefined'){console.error(e);} | |
| 308 | - } | |
| 311 | + catch(e){} | |
| 309 | 312 | i3GEO.ajuda.mostraJanela("Tempo de desenho em segundos: "+tempo,""); |
| 313 | + | |
| 310 | 314 | try{ |
| 311 | 315 | i3GEO.parametros.mapexten= mapexten; |
| 312 | 316 | i3GEO.parametros.mapscale= parseInt(mapscale,10); |
| ... | ... | @@ -333,23 +337,10 @@ i3GEO = { |
| 333 | 337 | i3GEO.parametros.interfacePadrao = interfacePadrao; |
| 334 | 338 | i3GEO.parametros.embedLegenda = embedLegenda; |
| 335 | 339 | } |
| 336 | - catch(e){alert("Erro durante a definicao de i3GEO.parametros "+e);} | |
| 340 | + catch(e){alert("Erro durante a definicao de i3GEO.parametros "+e);} | |
| 341 | + */ | |
| 342 | + i3GEO.parametros = retorno.data.variaveis; | |
| 337 | 343 | i3GEO.arvoreDeCamadas.CAMADAS = retorno.data.temas; |
| 338 | - | |
| 339 | - i3GEO.gadgets.quadros.inicia(10); | |
| 340 | - i3GEO.gadgets.quadros.grava("extensao",mapexten); | |
| 341 | - | |
| 342 | - i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa); | |
| 343 | - | |
| 344 | - i3GEO.gadgets.mostraBuscaRapida(); | |
| 345 | - i3GEO.gadgets.mostraVersao(); | |
| 346 | - i3GEO.guias.cria(); | |
| 347 | - | |
| 348 | - if($i("arvoreAdicionaTema")) | |
| 349 | - {i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"arvoreAdicionaTema");} | |
| 350 | - | |
| 351 | - if($i("mst")) | |
| 352 | - {$i("mst").style.display="block";} | |
| 353 | 344 | // |
| 354 | 345 | //na interface padrão é necessário executar a atualização pois a geração do mapa |
| 355 | 346 | //ainda não foi feita |
| ... | ... | @@ -359,20 +350,13 @@ i3GEO = { |
| 359 | 350 | // |
| 360 | 351 | //calcula (opcional) o tamanho correto da tabela onde fica o mapa |
| 361 | 352 | //se não for feito esse cálculo, o mapa fica ajustado à esquerda |
| 362 | - // | |
| 353 | + // | |
| 363 | 354 | temp = 0; |
| 364 | 355 | if ($i("contemFerramentas")){temp = temp + parseInt($i("contemFerramentas").style.width,10);} |
| 365 | 356 | if ($i("ferramentas")){temp = temp + parseInt($i("ferramentas").style.width,10);} |
| 366 | 357 | if($i("mst")) |
| 367 | 358 | {$i("mst").style.width=i3GEO.parametros.w + temp + "px";} |
| 368 | - if (i3GEO.configura.entorno === "sim"){ | |
| 369 | - i3GEO.configura.entorno = "nao"; | |
| 370 | - i3GEO.navega.entorno.ativaDesativa(); | |
| 371 | - } | |
| 372 | - i3GEO.navega.autoRedesenho.ativa(); | |
| 373 | - if ($i("i3geo_escalanum")){$i("i3geo_escalanum").value = i3GEO.parametros.mapscale;} | |
| 374 | - if ((i3GEO.parametros.geoip === "nao") && ($i("ondeestou"))) | |
| 375 | - {$i("ondeestou").style.display="none";} | |
| 359 | + | |
| 376 | 360 | i3GEO.Interface.inicia(); |
| 377 | 361 | } |
| 378 | 362 | else |
| ... | ... | @@ -458,21 +442,33 @@ i3GEO = { |
| 458 | 442 | {i3GEO.contadorAtualiza--;return;} |
| 459 | 443 | if(i3GEO.contadorAtualiza > 0) |
| 460 | 444 | {i3GEO.contadorAtualiza--;} |
| 445 | + // | |
| 446 | + //funcao que pega os dados do mapa no servidor | |
| 447 | + // | |
| 461 | 448 | corpoMapa = function(){ |
| 462 | 449 | if($i("ajaxCorpoMapa")) |
| 463 | 450 | {return;} |
| 464 | - i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando"); | |
| 451 | + i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando..."); | |
| 465 | 452 | i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); |
| 466 | 453 | }; |
| 454 | + // | |
| 455 | + //se retorno não tiver sido definido, busca os dados no servidor e chama novamente a função atualiza | |
| 456 | + // | |
| 467 | 457 | if(arguments.length === 0){ |
| 468 | 458 | i3GEO.janela.fechaAguarde("ajaxCorpoMapa"); |
| 469 | 459 | corpoMapa.call(); |
| 470 | 460 | return; |
| 471 | 461 | } |
| 462 | + // | |
| 463 | + //igual a anterior para efeitos de compatibilidade com outras versões do i3geo | |
| 464 | + // | |
| 472 | 465 | if(retorno === ""){ |
| 473 | 466 | corpoMapa.call(); |
| 474 | 467 | return; |
| 475 | 468 | } |
| 469 | + // | |
| 470 | + //se retorno.data não existir, é pq ocorreu um erro | |
| 471 | + // | |
| 476 | 472 | if(!retorno.data){ |
| 477 | 473 | alert(retorno); |
| 478 | 474 | i3GEO.mapa.recupera.inicia(); |
| ... | ... | @@ -505,40 +501,41 @@ i3GEO = { |
| 505 | 501 | } |
| 506 | 502 | return; |
| 507 | 503 | }; |
| 508 | - try{ | |
| 509 | - eval(retorno.data.variaveis); | |
| 510 | - } | |
| 511 | - catch(e){ | |
| 512 | - if(typeof(console) !== 'undefined'){console.error(e);} | |
| 513 | - erro.call(); | |
| 514 | - return; | |
| 515 | - } | |
| 504 | + // | |
| 505 | + //atualiza as variáveis | |
| 506 | + // | |
| 516 | 507 | if(arguments.length === 0 || retorno === "" || retorno.data.variaveis === undefined) |
| 517 | 508 | {erro.call();return;} |
| 518 | 509 | else{ |
| 510 | + // | |
| 511 | + //se deu tudo certo, pega os valores do retorno e seta as variáveis do mapa | |
| 512 | + // | |
| 519 | 513 | if(arguments.length === 0){return;} |
| 520 | 514 | i3GEO.mapa.verifica(retorno); |
| 521 | - tempo = ""; | |
| 515 | + var tempo = ""; | |
| 522 | 516 | if(i3GEO.desenho.richdraw) |
| 523 | 517 | {i3GEO.desenho.richdraw.clearWorkspace();} |
| 524 | - mapscale = ""; | |
| 525 | - mapexten = ""; | |
| 526 | - //transforma o retorno em variáveis | |
| 527 | - eval(retorno.data.variaveis); | |
| 528 | - if(erro != "") | |
| 529 | - {alert(erro);} | |
| 518 | + var mapscale = i3GEO.parametros.mapscale; | |
| 519 | + | |
| 520 | + i3GEO.parametros.mapscale = retorno.data.variaveis.mapscale; | |
| 521 | + i3GEO.parametros.mapres = retorno.data.variaveis.mapres; | |
| 522 | + i3GEO.parametros.pixelsize = retorno.data.variaveis.pixelsize; | |
| 523 | + i3GEO.parametros.mapexten = retorno.data.variaveis.mapexten; | |
| 524 | + i3GEO.parametros.mapimagem = retorno.data.variaveis.mapimagem; | |
| 525 | + i3GEO.parametros.w = retorno.data.variaveis.w; | |
| 526 | + i3GEO.parametros.h = retorno.data.variaveis.h; | |
| 527 | + i3GEO.parametros.mappath = retorno.data.variaveis.mappath; | |
| 528 | + i3GEO.parametros.mapurl = retorno.data.variaveis.mapurl; | |
| 529 | + | |
| 530 | + if(retorno.data.variaveis.erro != "") | |
| 531 | + {alert(retorno.data.variaveis.erro);} | |
| 530 | 532 | // |
| 531 | 533 | //o try aqui é necessário pois na interface googlemaps os parâmetros retorno.data.variaveis não são gerados completamente |
| 532 | 534 | // |
| 533 | 535 | try{ |
| 534 | 536 | i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas); |
| 535 | 537 | if (i3GEO.parametros.mapscale !== mapscale) |
| 536 | - {i3GEO.arvoreDeCamadas.atualizaFarol(mapscale);} | |
| 537 | - i3GEO.parametros.mapexten = mapexten; | |
| 538 | - i3GEO.parametros.mapscale = mapscale; | |
| 539 | - i3GEO.parametros.mapres = mapres; | |
| 540 | - i3GEO.parametros.pixelsize = g_celula; | |
| 541 | - i3GEO.parametros.mapimagem = mapimagem; | |
| 538 | + {i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale);} | |
| 542 | 539 | } |
| 543 | 540 | catch(e){} |
| 544 | 541 | i3GEO.arvoreDeCamadas.CAMADAS = retorno.data.temas; |
| ... | ... | @@ -550,7 +547,6 @@ i3GEO = { |
| 550 | 547 | } |
| 551 | 548 | else |
| 552 | 549 | {g_operacao = "";} |
| 553 | - //i3GEO.parametros.mapexten = mapexten; | |
| 554 | 550 | if ($i("mensagemt")) |
| 555 | 551 | {$i("mensagemt").value = i3GEO.parametros.mapexten;} |
| 556 | 552 | |
| ... | ... | @@ -559,7 +555,7 @@ i3GEO = { |
| 559 | 555 | i3GEO.navega.entorno.geraURL(); |
| 560 | 556 | i3GEO.navega.entorno.ajustaPosicao(); |
| 561 | 557 | } |
| 562 | - i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+tempo,""); | |
| 558 | + i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,""); | |
| 563 | 559 | } |
| 564 | 560 | }, |
| 565 | 561 | /* | ... | ... |
classesjs/classe_interface.js
| ... | ... | @@ -254,6 +254,32 @@ i3GEO.Interface = { |
| 254 | 254 | */ |
| 255 | 255 | inicia: function(w,h){ |
| 256 | 256 | if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.inicia()");} |
| 257 | + // | |
| 258 | + //inicialização que afeta todas as interfaces | |
| 259 | + // | |
| 260 | + i3GEO.gadgets.quadros.inicia(10); | |
| 261 | + i3GEO.gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal); | |
| 262 | + i3GEO.gadgets.mostraBuscaRapida(); | |
| 263 | + i3GEO.gadgets.mostraVersao(); | |
| 264 | + i3GEO.guias.cria(); | |
| 265 | + if($i("arvoreAdicionaTema")) | |
| 266 | + {i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"arvoreAdicionaTema");} | |
| 267 | + // | |
| 268 | + //esse id é utilizado apenas para manter o mapa não visível até que tudo seja montado | |
| 269 | + // | |
| 270 | + if($i("mst")) | |
| 271 | + {$i("mst").style.display="block";} | |
| 272 | + if (i3GEO.configura.entorno === "sim"){ | |
| 273 | + i3GEO.configura.entorno = "nao"; | |
| 274 | + i3GEO.navega.entorno.ativaDesativa(); | |
| 275 | + } | |
| 276 | + i3GEO.navega.autoRedesenho.ativa(); | |
| 277 | + if ($i("i3geo_escalanum")){$i("i3geo_escalanum").value = i3GEO.parametros.mapscale;} | |
| 278 | + if ((i3GEO.parametros.geoip === "nao") && ($i("ondeestou"))) | |
| 279 | + {$i("ondeestou").style.display="none";} | |
| 280 | + // | |
| 281 | + //inicialização específica de cada interface | |
| 282 | + // | |
| 257 | 283 | if(i3GEO.Interface.ATUAL === "padrao") |
| 258 | 284 | {i3GEO.Interface.padrao.inicia();} |
| 259 | 285 | if(i3GEO.Interface.ATUAL === "openlayers") |
| ... | ... | @@ -443,6 +469,7 @@ i3GEO.Interface = { |
| 443 | 469 | i3GEO.gadgets.mostraEscalaNumerica(); |
| 444 | 470 | i3GEO.gadgets.mostraEscalaGrafica(); |
| 445 | 471 | i3GEO.gadgets.visual.inicia(); |
| 472 | + i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa); | |
| 446 | 473 | // |
| 447 | 474 | //i3GEO.arvoreDeCamadas.CAMADAS é definido na inicialização (classe_i3geo) |
| 448 | 475 | // |
| ... | ... | @@ -549,7 +576,8 @@ i3GEO.Interface = { |
| 549 | 576 | // |
| 550 | 577 | //i3GEO.arvoreDeCamadas.CAMADAS é definido na inicialização (classe_i3geo) |
| 551 | 578 | // |
| 552 | - i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic); | |
| 579 | + i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic); | |
| 580 | + i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa); | |
| 553 | 581 | }, |
| 554 | 582 | ativaBotoes: function(){ |
| 555 | 583 | } |
| ... | ... | @@ -758,6 +786,7 @@ i3GEO.Interface = { |
| 758 | 786 | //i3GEO.arvoreDeCamadas.CAMADAS é definido na inicialização (classe_i3geo) |
| 759 | 787 | // |
| 760 | 788 | i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic); |
| 789 | + i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa); | |
| 761 | 790 | }, |
| 762 | 791 | criaLayers: function(){ |
| 763 | 792 | var url = i3GEO.configura.locaplic+"/classesphp/mapa_openlayers.php?map="+i3GEO.parametros.mapfile+"&TIPOIMAGEM="+i3GEO.configura.tipoimagem, |
| ... | ... | @@ -994,7 +1023,7 @@ i3GEO.Interface = { |
| 994 | 1023 | }); |
| 995 | 1024 | }, |
| 996 | 1025 | ativaBotoes: function(){ |
| 997 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.padrao.ativaBotoes()");} | |
| 1026 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.openlayers.ativaBotoes()");} | |
| 998 | 1027 | var imagemxy,x1,y1,x2,y2; |
| 999 | 1028 | imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); |
| 1000 | 1029 | if ($i("barraDeBotoes2") || i3GEO.barraDeBotoes.AUTO === true){ |
| ... | ... | @@ -1197,6 +1226,7 @@ i3GEO.Interface = { |
| 1197 | 1226 | // |
| 1198 | 1227 | i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.googlemaps.ligaDesliga(this)"; |
| 1199 | 1228 | i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic); |
| 1229 | + i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa); | |
| 1200 | 1230 | i3GEO.Interface.googlemaps.adicionaListaKml(); |
| 1201 | 1231 | if(i3GEO.parametros.kmlurl !== "") |
| 1202 | 1232 | {i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl);} |
| ... | ... | @@ -1361,7 +1391,7 @@ i3GEO.Interface = { |
| 1361 | 1391 | return (bbox); |
| 1362 | 1392 | }, |
| 1363 | 1393 | ativaBotoes: function(){ |
| 1364 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.padrao.ativaBotoes()");} | |
| 1394 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.googlemaps.ativaBotoes()");} | |
| 1365 | 1395 | var imagemxy,x1,y1,x2,y2; |
| 1366 | 1396 | imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); |
| 1367 | 1397 | if ($i("barraDeBotoes2") || i3GEO.barraDeBotoes.AUTO === true){ |
| ... | ... | @@ -1672,7 +1702,7 @@ i3GEO.Interface = { |
| 1672 | 1702 | i3GeoMap.overlayMapTypes.removeAt(indice); |
| 1673 | 1703 | } |
| 1674 | 1704 | catch(e){ |
| 1675 | - if(typeof(console) !== 'undefined'){console.error(e+" "+camada.name);} | |
| 1705 | + if(typeof(console) !== 'undefined'){} | |
| 1676 | 1706 | } |
| 1677 | 1707 | } |
| 1678 | 1708 | } |
| ... | ... | @@ -1680,9 +1710,22 @@ i3GEO.Interface = { |
| 1680 | 1710 | }, |
| 1681 | 1711 | cria: function(w,h){ |
| 1682 | 1712 | var i,i3GeoMap3d,i3GeoMap,texto; |
| 1713 | + /* | |
| 1683 | 1714 | i3GEO.configura.listaDePropriedadesDoMapa = { |
| 1684 | 1715 | "propriedades": [] |
| 1685 | 1716 | }; |
| 1717 | + */ | |
| 1718 | + i3GEO.configura.listaDePropriedadesDoMapa = { | |
| 1719 | + "propriedades": [ | |
| 1720 | + { text: "p2", url: "javascript:i3GEO.mapa.dialogo.tipoimagem()"}, | |
| 1721 | + { text: "p15", url: "javascript:i3GEO.mapa.dialogo.outputformat()"}, | |
| 1722 | + { text: "p3", url: "javascript:i3GEO.mapa.dialogo.opcoesLegenda()"}, | |
| 1723 | + { text: "p4", url: "javascript:i3GEO.mapa.dialogo.opcoesEscala()"}, | |
| 1724 | + { text: "p8", url: "javascript:i3GEO.mapa.dialogo.queryMap()"}, | |
| 1725 | + { text: "p9", url: "javascript:i3GEO.mapa.dialogo.corFundo()"}, | |
| 1726 | + { text: "p10", url: "javascript:i3GEO.mapa.dialogo.gradeCoord()"} | |
| 1727 | + ] | |
| 1728 | + }; | |
| 1686 | 1729 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
| 1687 | 1730 | if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled == true) |
| 1688 | 1731 | {texto += "CHECKED ";} |
| ... | ... | @@ -1759,6 +1802,7 @@ i3GEO.Interface = { |
| 1759 | 1802 | texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'" ; |
| 1760 | 1803 | texto += "> "+$trad("ge11"); |
| 1761 | 1804 | i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); |
| 1805 | + i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa); | |
| 1762 | 1806 | |
| 1763 | 1807 | i = $i(i3GEO.Interface.IDCORPO); |
| 1764 | 1808 | if(i){ |
| ... | ... | @@ -1814,7 +1858,7 @@ i3GEO.Interface = { |
| 1814 | 1858 | //i3GEO.arvoreDeCamadas.CAMADAS é definido na inicialização (classe_i3geo) |
| 1815 | 1859 | // |
| 1816 | 1860 | i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic); |
| 1817 | - | |
| 1861 | + i3GEO.gadgets.mostraMenuSuspenso(); | |
| 1818 | 1862 | i3GEO.Interface.googleearth.ativaBotoes(); |
| 1819 | 1863 | i3GEO.gadgets.mostraInserirKml("inserirKml"); |
| 1820 | 1864 | i3GEO.Interface.googleearth.adicionaListaKml(); |
| ... | ... | @@ -1831,13 +1875,17 @@ i3GEO.Interface = { |
| 1831 | 1875 | for (i=0;i<nlayers;i++){ |
| 1832 | 1876 | camada = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
| 1833 | 1877 | indice = i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name); |
| 1878 | + layer = i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name); | |
| 1834 | 1879 | if(indice === false){ |
| 1835 | 1880 | layer = i3GEO.Interface.googleearth.insereLayer(camada.name); |
| 1881 | + } | |
| 1882 | + try{ | |
| 1836 | 1883 | if(camada.status !== 0) |
| 1837 | 1884 | {layer.setVisibility(true);} |
| 1838 | 1885 | else |
| 1839 | 1886 | {layer.setVisibility(false);} |
| 1840 | 1887 | } |
| 1888 | + catch(e){} | |
| 1841 | 1889 | } |
| 1842 | 1890 | }, |
| 1843 | 1891 | insereLayer: function(nomeLayer){ |
| ... | ... | @@ -1884,11 +1932,12 @@ i3GEO.Interface = { |
| 1884 | 1932 | i3GeoMap.getGlobe(), |
| 1885 | 1933 | 'mousemove', |
| 1886 | 1934 | function(event){ |
| 1887 | - objposicaocursor = { | |
| 1935 | + d = i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude()); | |
| 1936 | + objposicaocursor = { | |
| 1888 | 1937 | ddx: event.getLongitude(), |
| 1889 | 1938 | ddy: event.getLatitude(), |
| 1890 | - dmsx: 0, | |
| 1891 | - dmsy: 0, | |
| 1939 | + dmsx: d[0], | |
| 1940 | + dmsy: d[1], | |
| 1892 | 1941 | imgx: event.getClientX(), |
| 1893 | 1942 | imgy: event.getClientY(), |
| 1894 | 1943 | telax: event.getClientX() + i3GEO.Interface.googleearth.POSICAOTELA[0], |
| ... | ... | @@ -1938,7 +1987,7 @@ i3GEO.Interface = { |
| 1938 | 1987 | minimiza |
| 1939 | 1988 | ); |
| 1940 | 1989 | i3GEO.barraDeBotoes.TEMPLATEBOTAO = '<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> '; |
| 1941 | - i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id); | |
| 1990 | + i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id); | |
| 1942 | 1991 | i3GEO.barraDeBotoes.ativaBotoes(); |
| 1943 | 1992 | i3GEO.Interface.googleearth.aguarde = $i("i3GEOF.ferramentasGE_imagemCabecalho").style; |
| 1944 | 1993 | $i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right = "0px"; | ... | ... |
classesjs/classe_php.js
| ... | ... | @@ -536,7 +536,9 @@ i3GEO.php = { |
| 536 | 536 | {i3GEO.Interface.googlemaps.zoom2extent(ext);} |
| 537 | 537 | } |
| 538 | 538 | if(i3GEO.Interface.ATUAL === "googleearth"){ |
| 539 | - i3GEO.Interface.googleearth.redesenha(); | |
| 539 | + if(atualiza === true) | |
| 540 | + {i3GEO.Interface.googleearth.zoom2extent(ext);} | |
| 541 | + | |
| 540 | 542 | } |
| 541 | 543 | if(i3GEO.Interface.ATUAL === "openlayers"){ |
| 542 | 544 | i3GEO.Interface.openlayers.zoom2ext(ext); | ... | ... |
classesphp/classe_mapa.php
| ... | ... | @@ -388,7 +388,17 @@ Include: |
| 388 | 388 | { |
| 389 | 389 | $nomer = $locmapserv."?map=".$this->arquivo."&mode=map&".nomeRandomico(); |
| 390 | 390 | } |
| 391 | - $res = "g_locidentifica='".$locidentifica."';g_sistemas='".$locsistemas."';var g_celula=".$this->mapa->cellsize.";var mapscale = ".$this->mapa->scale.";var mapres=".$this->mapa->resolution.";var mapcellsize=".$this->mapa->cellsize.";var mapexten='".$ext."';var mapimagem='".$nomer."';var mapwidth=".$imgo->width.";var mapheight=".$imgo->height.";var mappath='".$imgo->imagepath."';var mapurl='".$imgo->imageurl."';var erro='".$mensagemErro."'"; | |
| 391 | + //$res = "g_locidentifica='".$locidentifica."';g_sistemas='".$locsistemas."';var g_celula=".$this->mapa->cellsize.";var mapscale = ".$this->mapa->scale.";var mapres=".$this->mapa->resolution.";var mapcellsize=".$this->mapa->cellsize.";var mapexten='".$ext."';var mapimagem='".$nomer."';var mapwidth=".$imgo->width.";var mapheight=".$imgo->height.";var mappath='".$imgo->imagepath."';var mapurl='".$imgo->imageurl."';var erro='".$mensagemErro."'"; | |
| 392 | + $res["mapscale"] = $this->mapa->scale; | |
| 393 | + $res["mapres"] = $this->mapa->resolution; | |
| 394 | + $res["pixelsize"] = $this->mapa->cellsize; | |
| 395 | + $res["mapexten"] = $ext; | |
| 396 | + $res["mapimagem"] = $nomer; | |
| 397 | + $res["w"] = $imgo->width; | |
| 398 | + $res["h"] = $imgo->height; | |
| 399 | + $res["mappath"] = $imgo->imagepath; | |
| 400 | + $res["mapurl"] = $imgo->imageurl; | |
| 401 | + $res["erro"] = $mensagemErro; | |
| 392 | 402 | return $res; |
| 393 | 403 | } |
| 394 | 404 | /* | ... | ... |
classesphp/mapa_controle.php
| ... | ... | @@ -2986,29 +2986,21 @@ function redesenhaMapa() |
| 2986 | 2986 | { |
| 2987 | 2987 | $e = $m->mapa->extent; |
| 2988 | 2988 | $ext = $e->minx." ".$e->miny." ".$e->maxx." ".$e->maxy; |
| 2989 | - $imagem = "var erro = '';var mapimagem='';var mapexten='".$ext."';var mapres = ''"; | |
| 2989 | + $res["mapimagem"] = ""; | |
| 2990 | + $res["mapexten"] = $ext; | |
| 2991 | + $res["mapres"] = ""; | |
| 2990 | 2992 | } |
| 2991 | 2993 | else{ |
| 2992 | - $imagem = $m->redesenhaCorpo($locsistemas,$locidentifica,$tipoimagem,$utilizacgi,$locmapserv); | |
| 2993 | - if ($imagem == "erro") | |
| 2994 | - { | |
| 2995 | - unlink($map_file); | |
| 2996 | - copy(str_replace(".map","seguranca.map",$map_file),$map_file); | |
| 2997 | - $m = New Mapa($map_file); | |
| 2998 | - $par = $m->parametrosTemas(); | |
| 2999 | - if (isset($utilizacgi) && strtolower($utilizacgi) == "sim") | |
| 3000 | - {$imagem = "var erro = '';var mapimagem='".$locmapserv."?map=".$map_file."&mode=map&".nomeRandomico()."'";} | |
| 3001 | - else | |
| 3002 | - {$imagem = $m->redesenhaCorpo($locsistemas,$locidentifica,$tipoimagem);} | |
| 3003 | - } | |
| 2994 | + $res = $m->redesenhaCorpo($locsistemas,$locidentifica,$tipoimagem,$utilizacgi,$locmapserv); | |
| 3004 | 2995 | } |
| 3005 | - $mensagens = "var mensagens ='".$m->pegaMensagens()."'"; | |
| 2996 | + $res["mensagens"] = $m->pegaMensagens(); | |
| 2997 | + $res["tempo"] = microtime(1) - $tempo; | |
| 3006 | 2998 | restauraCon($map_file,$postgis_mapa); |
| 3007 | 2999 | ob_clean(); |
| 3008 | - if (($par == "") || ($imagem == "")) | |
| 3000 | + if ($par == "") | |
| 3009 | 3001 | {$retorno = "erro";} |
| 3010 | 3002 | else |
| 3011 | - {$retorno = array("variaveis"=>($mensagens.";".$imagem.";var erro = '';var tempo=".(microtime(1) - $tempo)),"temas"=>$par);} | |
| 3003 | + {$retorno = array("variaveis"=>$res,"temas"=>$par);} | |
| 3012 | 3004 | cpjson($retorno); |
| 3013 | 3005 | } |
| 3014 | 3006 | ?> |
| 3015 | 3007 | \ No newline at end of file | ... | ... |
classesphp/mapa_inicia.php
| ... | ... | @@ -234,6 +234,46 @@ function iniciaMapa() |
| 234 | 234 | {$nomer = ($imgo->imageurl).basename($nomer);} |
| 235 | 235 | $iref = $m->mapa->reference; |
| 236 | 236 | $irefH = $iref->height; |
| 237 | + | |
| 238 | + $res["mapexten"] = $ext; | |
| 239 | + $res["mapscale"] = $escalaMapa; | |
| 240 | + $res["mapres"] = $m->mapa->resolution; | |
| 241 | + $res["pixelsize"] = $celula; | |
| 242 | + if ((isset($expoeMapfile)) && ($expoeMapfile == "nao")) | |
| 243 | + {$res["mapfile"] = "";} | |
| 244 | + else | |
| 245 | + {$res["mapfile"] = $map_file;} | |
| 246 | + $res["cgi"] = $locmapserv; | |
| 247 | + $res["extentTotal"] = $ext; | |
| 248 | + $res["mapimagem"] = $nomer; | |
| 249 | + $geoip = "nao"; | |
| 250 | + if (file_exists($locaplic."/pacotes/geoip") && file_exists($locaplic."/pacotes/geoip/GeoLiteCity.dat")) | |
| 251 | + {$geoip = "sim";} | |
| 252 | + $res["geoip"] = $geoip; | |
| 253 | + $res["listavisual"] = (file_exists($locaplic."/imagens/visual")) ? implode(",",listaDiretorios($locaplic."/imagens/visual")) : ""; | |
| 254 | + $res["utilizacgi"] = $utilizacgi; | |
| 255 | + $versao = versao(); | |
| 256 | + $res["versaoms"] = $versao["principal"]; | |
| 257 | + $res["versaomscompleta"] = $versao["completa"]; | |
| 258 | + $res["mensagens"] = $m->pegaMensagens(); | |
| 259 | + $res["locsistemas"] = $locsistemas; | |
| 260 | + $res["locidentifica"] = $locidentifica; | |
| 261 | + $res["r"] = (isset($R_path)) ? "sim" : "nao"; | |
| 262 | + $res["locmapas"] = $locmapas; | |
| 263 | + $res["extentref"] = ""; | |
| 264 | + $res["kmlurl"] = $kmlurl; | |
| 265 | + $res["mensageminicia"] = $mensagemInicia; | |
| 266 | + $res["interfacePadrao"] = $interfacePadrao; | |
| 267 | + $res["embedLegenda"] = $embedLegenda; | |
| 268 | + $res["w"] = $w; | |
| 269 | + $res["h"] = $h; | |
| 270 | + $res["titulo"] = $tituloInstituicao; | |
| 271 | + $res["tempo"] = microtime(1) - $tempo; | |
| 272 | + $res["embedLegenda"] = $embedLegenda; | |
| 273 | + $res["erro"] = ''; | |
| 274 | + $res["mappath"] = $imgo->imagepath; | |
| 275 | + $res["mapurl"] = $imgo->imageurl; | |
| 276 | + /* | |
| 237 | 277 | $res = "var mapexten= '".$ext."';var mapscale=".$escalaMapa.";var mapres=".$m->mapa->resolution.";var g_celula=".$celula.";var mapimagem='".$nomer."';var mapwidth=".$imgo->width.";var mapheight=".$imgo->height.";var mappath='".$imgo->imagepath."';var mapurl='".$imgo->imageurl."'"; |
| 238 | 278 | $res .= ";var extentref = '';var refimagem='';var refwidth=0;var refpath='';var refurl=''"; |
| 239 | 279 | $res .= ";var legimagem='';var legwidth=0;var legheight=0;var legpath='';var legurl='';var locsistemas='".$locsistemas."';var locidentifica='".$locidentifica."'"; |
| ... | ... | @@ -270,7 +310,9 @@ function iniciaMapa() |
| 270 | 310 | $res .= "var mensagemInicia ='".$mensagemInicia."';"; |
| 271 | 311 | $res .= "var interfacePadrao ='".$interfacePadrao."';"; |
| 272 | 312 | $res .= "var embedLegenda ='".$embedLegenda."';"; |
| 273 | - $res .= "var erro ='';"; | |
| 313 | + $res .= "var erro ='';"; | |
| 314 | + */ | |
| 315 | + | |
| 274 | 316 | copy($map_file,(str_replace(".map","reinc.map",$map_file))); |
| 275 | 317 | copy($map_file,(str_replace(".map","seguranca.map",$map_file))); |
| 276 | 318 | //$cp->set_data(array("variaveis"=>$res,"temas"=>$temas)); | ... | ... |
ferramentas/convertekml/index.js.php
| ... | ... | @@ -91,7 +91,7 @@ i3GEOF.converteKml = { |
| 91 | 91 | titulo = "Kml <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=81' > </a>"; |
| 92 | 92 | janela = i3GEO.janela.cria( |
| 93 | 93 | "450px", |
| 94 | - "250px", | |
| 94 | + "260px", | |
| 95 | 95 | "", |
| 96 | 96 | "", |
| 97 | 97 | "", | ... | ... |
ferramentas/convertemapakml/index.js.php
| ... | ... | @@ -81,7 +81,7 @@ i3GEOF.converteMapaKml = { |
| 81 | 81 | titulo = "Kml <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=2&idajuda=13' > </a>"; |
| 82 | 82 | janela = i3GEO.janela.cria( |
| 83 | 83 | "440px", |
| 84 | - "315px", | |
| 84 | + "325px", | |
| 85 | 85 | "", |
| 86 | 86 | "", |
| 87 | 87 | "", | ... | ... |
ferramentas/gradepol/index.js.php
| ... | ... | @@ -18,7 +18,7 @@ Licenca: |
| 18 | 18 | |
| 19 | 19 | GPL2 |
| 20 | 20 | |
| 21 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
| 21 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
| 22 | 22 | |
| 23 | 23 | Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil |
| 24 | 24 | Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | ... | ... |
ferramentas/imprimir/a4lpaisagempdf.php
| ... | ... | @@ -88,8 +88,8 @@ if($interface == "openlayers" || $interface == "googlemaps" || $interface == "go |
| 88 | 88 | $extatual = $map->extent; |
| 89 | 89 | $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]); |
| 90 | 90 | } |
| 91 | - $legenda = $map->legend; | |
| 92 | - $legenda->set("status",MS_EMBED); | |
| 91 | + //$legenda = $map->legend; | |
| 92 | + //$legenda->set("status",MS_EMBED); | |
| 93 | 93 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| 94 | 94 | } |
| 95 | 95 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| ... | ... | @@ -101,10 +101,10 @@ $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
| 101 | 101 | $pathMapa = $dir_tmp."/".basename($imgo->imageurl)."/".basename($nomer); |
| 102 | 102 | $nomeImagem = nomeRandomico(); |
| 103 | 103 | $legenda = $map->legend; |
| 104 | -$legenda->set("keysizex",20); | |
| 105 | -$legenda->set("keysizey",20); | |
| 106 | -$label = $legenda->label; | |
| 107 | -$label->set("size",14); | |
| 104 | +//$legenda->set("keysizex",20); | |
| 105 | +//$legenda->set("keysizey",20); | |
| 106 | +//$label = $legenda->label; | |
| 107 | +//$label->set("size",14); | |
| 108 | 108 | $imgo = $map->drawlegend(); |
| 109 | 109 | $nomer = ($imgo->imagepath)."leg".$nomeImagem.".PNG"; |
| 110 | 110 | $imgo->saveImage($nomer); | ... | ... |
ferramentas/imprimir/aggpng.php
| ... | ... | @@ -101,8 +101,8 @@ if($interface == "openlayers" || $interface == "googlemaps" || $interface == "g |
| 101 | 101 | $extatual = $map->extent; |
| 102 | 102 | $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]); |
| 103 | 103 | } |
| 104 | - $legenda = $map->legend; | |
| 105 | - $legenda->set("status",MS_EMBED); | |
| 104 | + //$legenda = $map->legend; | |
| 105 | + //$legenda->set("status",MS_EMBED); | |
| 106 | 106 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| 107 | 107 | } |
| 108 | 108 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| ... | ... | @@ -111,5 +111,6 @@ $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; |
| 111 | 111 | $imgo->saveImage($nomer); |
| 112 | 112 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
| 113 | 113 | $nomemapa = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); |
| 114 | +echo "<p>Utilize a opção de alteração das propriedades do mapa para ajustar a legenda, tamanho e outras características</p>"; | |
| 114 | 115 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' >Arquivo gerado! Clique para ver.</a>"; |
| 115 | 116 | ?> |
| 116 | 117 | \ No newline at end of file | ... | ... |
ferramentas/imprimir/geotif.php
| ... | ... | @@ -101,8 +101,8 @@ if($interface == "openlayers" || $interface == "googlemaps" || $interface == "go |
| 101 | 101 | $extatual = $map->extent; |
| 102 | 102 | $extatual->setextent($ext[0],$ext[1],$ext[2],$ext[3]); |
| 103 | 103 | } |
| 104 | - $legenda = $map->legend; | |
| 105 | - $legenda->set("status",MS_EMBED); | |
| 104 | + //$legenda = $map->legend; | |
| 105 | + //$legenda->set("status",MS_EMBED); | |
| 106 | 106 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| 107 | 107 | } |
| 108 | 108 | $o->set("imagemode",MS_IMAGEMODE_RGB); |
| ... | ... | @@ -111,5 +111,6 @@ $nomer = ($imgo->imagepath)."mapa".$nomes.".tif"; |
| 111 | 111 | $imgo->saveImage($nomer); |
| 112 | 112 | $protocolo = explode("/",$_SERVER['SERVER_PROTOCOL']); |
| 113 | 113 | $nomemapa = strtolower($protocolo[0])."://".$_SERVER['HTTP_HOST'].($imgo->imageurl).basename($nomer); |
| 114 | +echo "<p>Utilize a opção de alteração das propriedades do mapa para ajustar a legenda, tamanho e outras características</p>"; | |
| 114 | 115 | echo "<a style=font-family:Verdana,Arial,Helvetica,sans-serif; href='$nomemapa' >Arquivo gerado! Clique para ver.</a>"; |
| 115 | 116 | ?> |
| 116 | 117 | \ No newline at end of file | ... | ... |
ferramentas/selecao/index.js.php
| ... | ... | @@ -255,7 +255,8 @@ i3GEOF.selecao = { |
| 255 | 255 | mudaicone: function(){ |
| 256 | 256 | $i("i3GEOselecaopt").style.border = "1px solid RGB(230,230,230)" |
| 257 | 257 | $i("i3GEOselecaoext").style.border = "1px solid RGB(230,230,230)" |
| 258 | - $i("i3GEOselecaobox").style.border = "1px solid RGB(230,230,230)" | |
| 258 | + if($i("i3GEOselecaobox")) | |
| 259 | + {$i("i3GEOselecaobox").style.border = "1px solid RGB(230,230,230)";} | |
| 259 | 260 | $i("i3GEOselecaopoli").style.border = "1px solid RGB(230,230,230)" |
| 260 | 261 | i3GEO.desenho.richdraw.fecha; |
| 261 | 262 | if($i(i3GEO.Interface.IDMAPA)){ | ... | ... |
menutemas/admin.db
No preview for this file type