Commit 5e731783b704d8151a680e3403cc91e084e052d2
1 parent
edd37fa2
Exists in
master
and in
7 other branches
Documentacao do codigo
Showing
1 changed file
with
33 additions
and
10 deletions
Show diff stats
ferramentas/metaestat/alterarep.js
| 1 | /* | 1 | /* |
| 2 | - Title: Ferramenta que mostra opcoes adicionais de analise do módulo METAESTAT | 2 | +Title: Ferramenta que mostra opcoes para alteracao da representacao cartografica de uma camada oriunda do METAESTAT |
| 3 | 3 | ||
| 4 | - Arquivo: | 4 | +Utilizado em i3geo/ferramentas/metaestat/index.js |
| 5 | 5 | ||
| 6 | - i3geo/ferramentas/metaestat/alterarep.js | 6 | +Arquivo: |
| 7 | + | ||
| 8 | +i3geo/ferramentas/metaestat/alterarep.js | ||
| 7 | 9 | ||
| 8 | Licenca: | 10 | Licenca: |
| 9 | 11 | ||
| 10 | GPL2 | 12 | GPL2 |
| 11 | 13 | ||
| 12 | - i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | 14 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet |
| 13 | 15 | ||
| 14 | - Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | ||
| 15 | - Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | 16 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil |
| 17 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | ||
| 16 | 18 | ||
| 17 | -Esse programa utiliza parcialmente os codigos da aplicacao calculadora de carbono desenvolvido pelo | ||
| 18 | -IPAM - Instituto de Pesquisa Ambiental da Amazonia | ||
| 19 | 19 | ||
| 20 | Este programa e software livre; voce pode redistribui-lo | 20 | Este programa e software livre; voce pode redistribui-lo |
| 21 | e/ou modifica-lo sob os termos da Licenca Publica Geral | 21 | e/ou modifica-lo sob os termos da Licenca Publica Geral |
| @@ -34,9 +34,12 @@ if(typeof(i3GEOF) === 'undefined'){ | @@ -34,9 +34,12 @@ if(typeof(i3GEOF) === 'undefined'){ | ||
| 34 | var i3GEOF = {}; | 34 | var i3GEOF = {}; |
| 35 | } | 35 | } |
| 36 | /* | 36 | /* |
| 37 | - Classe: i3GEOF.alterarep | 37 | +Classe: i3GEOF.alterarep |
| 38 | */ | 38 | */ |
| 39 | i3GEOF.alterarep = { | 39 | i3GEOF.alterarep = { |
| 40 | + /** | ||
| 41 | + * Ativa/desativa a imagem de aguarde | ||
| 42 | + */ | ||
| 40 | aguarde: function(obj){ | 43 | aguarde: function(obj){ |
| 41 | if(!obj){ | 44 | if(!obj){ |
| 42 | return "<img style='display:block;z-index:2' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"; | 45 | return "<img style='display:block;z-index:2' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"; |
| @@ -58,6 +61,12 @@ i3GEOF.alterarep = { | @@ -58,6 +61,12 @@ i3GEOF.alterarep = { | ||
| 58 | criaJanelaFlutuante: function(){ | 61 | criaJanelaFlutuante: function(){ |
| 59 | i3GEOF.alterarep.iniciaDicionario(); | 62 | i3GEOF.alterarep.iniciaDicionario(); |
| 60 | }, | 63 | }, |
| 64 | + /** | ||
| 65 | + * Inicia a ferramenta | ||
| 66 | + * Monta o conteudo HTML e ativa os botoes de opcoes | ||
| 67 | + * Executa i3GEOF.alterarep.html(); | ||
| 68 | + * @param id do DIV que recebera o conteudo HTML da ferramenta | ||
| 69 | + */ | ||
| 61 | inicia: function(divid){ | 70 | inicia: function(divid){ |
| 62 | $i(divid).innerHTML = i3GEOF.alterarep.html(); | 71 | $i(divid).innerHTML = i3GEOF.alterarep.html(); |
| 63 | new YAHOO.widget.Button( | 72 | new YAHOO.widget.Button( |
| @@ -91,7 +100,10 @@ i3GEOF.alterarep = { | @@ -91,7 +100,10 @@ i3GEOF.alterarep = { | ||
| 91 | ); | 100 | ); |
| 92 | $i("i3geoalterarepArea2-button").style.width = 230 + "px"; | 101 | $i("i3geoalterarepArea2-button").style.width = 230 + "px"; |
| 93 | }, | 102 | }, |
| 94 | - //utiliza o dicionario compartilhado | 103 | + /** |
| 104 | + * Carrega o dicionario com a traducao das opcoes | ||
| 105 | + * Ao final executa i3GEOF.alterarep.iniciaJanelaFlutuante() | ||
| 106 | + */ | ||
| 95 | iniciaDicionario: function(){ | 107 | iniciaDicionario: function(){ |
| 96 | if(typeof(i3GEOF.metaestat.dicionario) === 'undefined'){ | 108 | if(typeof(i3GEOF.metaestat.dicionario) === 'undefined'){ |
| 97 | i3GEO.util.scriptTag( | 109 | i3GEO.util.scriptTag( |
| @@ -104,6 +116,10 @@ i3GEOF.alterarep = { | @@ -104,6 +116,10 @@ i3GEOF.alterarep = { | ||
| 104 | i3GEOF.alterarep.iniciaJanelaFlutuante(); | 116 | i3GEOF.alterarep.iniciaJanelaFlutuante(); |
| 105 | } | 117 | } |
| 106 | }, | 118 | }, |
| 119 | + /** | ||
| 120 | + * Abre a janela flutuante que recebera o HTML com as opcoes | ||
| 121 | + * Executa ao final i3GEOF.alterarep.inicia(); | ||
| 122 | + */ | ||
| 107 | iniciaJanelaFlutuante: function(){ | 123 | iniciaJanelaFlutuante: function(){ |
| 108 | if($i("i3GEOF.alterarep_corpo")){ | 124 | if($i("i3GEOF.alterarep_corpo")){ |
| 109 | return; | 125 | return; |
| @@ -134,6 +150,9 @@ i3GEOF.alterarep = { | @@ -134,6 +150,9 @@ i3GEOF.alterarep = { | ||
| 134 | i3GEOF.alterarep.inicia(divid); | 150 | i3GEOF.alterarep.inicia(divid); |
| 135 | i3GEO.janela.tempoMsg("Utilize a guia lateral para ligar/desligar camadas que já estejam no mapa"); | 151 | i3GEO.janela.tempoMsg("Utilize a guia lateral para ligar/desligar camadas que já estejam no mapa"); |
| 136 | }, | 152 | }, |
| 153 | + /** | ||
| 154 | + * HTML com os componentes da ferramenta | ||
| 155 | + */ | ||
| 137 | html: function(){ | 156 | html: function(){ |
| 138 | var ins = "" + | 157 | var ins = "" + |
| 139 | ' <fieldset style="padding:5px;margin:2px;">'+ | 158 | ' <fieldset style="padding:5px;margin:2px;">'+ |
| @@ -150,6 +169,10 @@ i3GEOF.alterarep = { | @@ -150,6 +169,10 @@ i3GEOF.alterarep = { | ||
| 150 | ' </fieldset><br>'; | 169 | ' </fieldset><br>'; |
| 151 | return ins; | 170 | return ins; |
| 152 | }, | 171 | }, |
| 172 | + /** | ||
| 173 | + * Aplica a operacao de transformacao da representacao da camada conforme a escolha do usuario | ||
| 174 | + * Executa ferramentas/metaestat/analise.php passando como parametro o valor de &funcao, que indica a operacao que devera ser realizada | ||
| 175 | + */ | ||
| 153 | aplica: function(tipo){ | 176 | aplica: function(tipo){ |
| 154 | if($i("i3geoCartoAnaliseCamadasCombo").value == ""){ | 177 | if($i("i3geoCartoAnaliseCamadasCombo").value == ""){ |
| 155 | i3GEO.janela.tempoMsg("Ative uma camada primeiro"); | 178 | i3GEO.janela.tempoMsg("Ative uma camada primeiro"); |