Commit 73a4cc810679ef68926e4bb7b5a542635756abe5

Authored by Edmar Moretti
1 parent caabad34

Adaptação para bootstrap da ferramenta de conexão com WMS Time

classesphp/classe_mapa.php
... ... @@ -1663,7 +1663,6 @@ class Mapa
1663 1663 $c = $layer->offsite;
1664 1664 $c->setrgb(255,255,255);
1665 1665 $of = $this->mapa->outputformat;
1666   - //$of->set("imagemode",MS_IMAGEMODE_RGB);
1667 1666 $this->salva();
1668 1667 }
1669 1668 /*
... ...
classesphp/mapa_controle.php
... ... @@ -839,15 +839,11 @@ switch (strtoupper($funcao))
839 839 include_once("classe_mapa.php");
840 840 copiaSeguranca($map_file);
841 841 $m = new Mapa($map_file);
  842 +
842 843 $m->adicionatemawms($_pg["tema"],$_pg["servico"],$_pg["nome"],$_pg["proj"],$_pg["formato"],$locaplic,$_pg["tipo"],$_pg["versao"],$_pg["nomecamada"],$dir_tmp,$imgdir,$imgurl,$_pg["tiporep"],$_pg["suportasld"],$_pg["formatosinfo"],$_pg["time"],$_pg["tile"]);
843   - $teste = "ok";//testaMapa($map_file,$postgis_mapa);
844   - if ($teste == "ok")
845   - {
846   - $retorno = "ok";$_SESSION["contadorsalva"]++;
847   - }
848   - else
849   - {$retorno = array("erro"=>"A camada nao pode ser adicionada. ".$teste);
850   - }
  844 +
  845 + $_SESSION["contadorsalva"]++;
  846 + redesenhaMapa();
851 847 break;
852 848 /*
853 849 Valor: REFERENCIA
... ...
css/default.css
... ... @@ -137,6 +137,10 @@ span.affix {
137 137 a, a:focus, a:hover {
138 138 color: #008579;
139 139 }
  140 +.alert.alert-info {
  141 + background-color: #03a9f4;
  142 + color: #002733;
  143 +}
140 144 .alert.alert-warning {
141 145 background-color: #de3601;
142 146 }
... ...
ferramentas/conectarservicos/index.js
... ... @@ -58,22 +58,10 @@ i3GEOF.conectarservicos =
58 58 "i3GEOF.conectargeorss_script");
59 59 },
60 60 wmst: function(){
61   - i3GEO.janela.cria(
62   - "600px",
63   - "400px",
64   - i3GEO.configura.locaplic + "/ferramentas/wmstime/index.htm",
65   - "",
66   - "",
67   - $trad("x46")
68   - + "&nbsp;<a class=ajuda_usuario href='javascript:void(0)' onclick='i3GEO.ajuda.ferramenta(76)'><b> </b></a>",
69   - "i3GEO.conectarwmst",
70   - false,
71   - "hd",
72   - "",
73   - "",
74   - "",
75   - true
76   - );
  61 + i3GEO.util.scriptTag(i3GEO.configura.locaplic
  62 + + "/ferramentas/wmstime/dependencias.php",
  63 + "i3GEOF.wmstime.iniciaJanelaFlutuante()",
  64 + "i3GEOF.wmstime_script");
77 65 },
78 66 wms: function(){
79 67 i3GEO.util.scriptTag(i3GEO.configura.locaplic
... ...
ferramentas/inserexy2/index.js
... ... @@ -32,35 +32,35 @@ Voc&amp;ecirc; deve ter recebido uma c&amp;oacute;pia da Licen&amp;ccedil;a P&amp;uacute;blica G
32 32 GNU junto com este programa; se n&atilde;o, escreva para a
33 33 Free Software Foundation, Inc., no endere&ccedil;o
34 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35   -*/
  35 + */
36 36 if(typeof(i3GEOF) === 'undefined'){
37   - var i3GEOF = {};
  37 + var i3GEOF = {};
38 38 }
39 39  
40 40 /*
41 41 Classe: i3GEOF.inserexy
42 42  
43   -*/
  43 + */
44 44 i3GEOF.inserexy = {
45   - /*
  45 + /*
46 46 Variavel: aguarde
47 47  
48 48 Estilo do objeto DOM com a imagem de aguarde existente no cabe&ccedil;alho da janela.
49   - */
50   - aguarde: "",
51   - /**
52   - * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php
53   - */
54   - MUSTACHE : "",
55   - /**
56   - * Susbtitutos para o template
57   - */
58   - mustacheHash : function() {
59   - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.inserexy.dicionario);
60   - dicionario["locaplic"] = i3GEO.configura.locaplic;
61   - return dicionario;
62   - },
63   - /*
  49 + */
  50 + aguarde: "",
  51 + /**
  52 + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php
  53 + */
  54 + MUSTACHE : "",
  55 + /**
  56 + * Susbtitutos para o template
  57 + */
  58 + mustacheHash : function() {
  59 + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.inserexy.dicionario);
  60 + dicionario["locaplic"] = i3GEO.configura.locaplic;
  61 + return dicionario;
  62 + },
  63 + /*
64 64 Function: inicia
65 65  
66 66 Inicia a ferramenta. &Eacute; chamado por criaJanelaFlutuante
... ... @@ -68,53 +68,53 @@ i3GEOF.inserexy = {
68 68 Parametro:
69 69  
70 70 iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
71   - */
72   - inicia: function(iddiv){
73   - if(i3GEOF.inserexy.MUSTACHE == ""){
74   - $.get(i3GEO.configura.locaplic + "/ferramentas/inserexy2/template_mst.html", function(template) {
75   - i3GEOF.inserexy.MUSTACHE = template;
76   - i3GEOF.inserexy.inicia(iddiv);
77   - });
78   - return;
79   - }
80   -
81   - var b;
82   - $i(iddiv).innerHTML = i3GEOF.inserexy.html();
83   - i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia1","i3GEOinserexyguia");
84   - //eventos das guias
85   - $i("i3GEOinserexyguia0").onclick = function(){
86   - i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia0","i3GEOinserexyguia");
87   - };
88   - $i("i3GEOinserexyguia1").onclick = function(){
89   - i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia1","i3GEOinserexyguia");
90   - };
91   - $i("i3GEOinserexyguia2").onclick = function(){
92   - i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia2","i3GEOinserexyguia");
93   - };
94   - $i("i3GEOinserexyguia3").onclick = function(){
95   - i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia3","i3GEOinserexyguia");
96   - };
97   - $i("i3GEOinserexyguia4").onclick = function()
98   - {i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia4","i3GEOinserexyguia");};
99   - $i("i3GEOinserexyguia5").onclick = function(){
100   - i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia5","i3GEOinserexyguia");
101   - };
102   - $i("i3GEOinserexyguia6").onclick = function(){
103   - i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia6","i3GEOinserexyguia");
104   - };
105   -
106   - i3GEOF.inserexy.ativaFoco();
107   - i3GEOF.inserexy.montaComboLocal();
108   - i3GEO.util.radioEpsg(
109   - function(retorno){
110   - $i("i3GEOinserexylistaepsg").innerHTML = retorno.dados;
111   - },
112   - "i3GEOinserexylistaepsg",
113   - "i3GEOinserexy"
114   - );
115   -
116   - },
117   - /*
  71 + */
  72 + inicia: function(iddiv){
  73 + if(i3GEOF.inserexy.MUSTACHE == ""){
  74 + $.get(i3GEO.configura.locaplic + "/ferramentas/inserexy2/template_mst.html", function(template) {
  75 + i3GEOF.inserexy.MUSTACHE = template;
  76 + i3GEOF.inserexy.inicia(iddiv);
  77 + });
  78 + return;
  79 + }
  80 +
  81 + var b;
  82 + $i(iddiv).innerHTML = i3GEOF.inserexy.html();
  83 + i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia1","i3GEOinserexyguia");
  84 + //eventos das guias
  85 + $i("i3GEOinserexyguia0").onclick = function(){
  86 + i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia0","i3GEOinserexyguia");
  87 + };
  88 + $i("i3GEOinserexyguia1").onclick = function(){
  89 + i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia1","i3GEOinserexyguia");
  90 + };
  91 + $i("i3GEOinserexyguia2").onclick = function(){
  92 + i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia2","i3GEOinserexyguia");
  93 + };
  94 + $i("i3GEOinserexyguia3").onclick = function(){
  95 + i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia3","i3GEOinserexyguia");
  96 + };
  97 + $i("i3GEOinserexyguia4").onclick = function()
  98 + {i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia4","i3GEOinserexyguia");};
  99 + $i("i3GEOinserexyguia5").onclick = function(){
  100 + i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia5","i3GEOinserexyguia");
  101 + };
  102 + $i("i3GEOinserexyguia6").onclick = function(){
  103 + i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia6","i3GEOinserexyguia");
  104 + };
  105 +
  106 + i3GEOF.inserexy.ativaFoco();
  107 + i3GEOF.inserexy.montaComboLocal();
  108 + i3GEO.util.radioEpsg(
  109 + function(retorno){
  110 + $i("i3GEOinserexylistaepsg").innerHTML = retorno.dados;
  111 + },
  112 + "i3GEOinserexylistaepsg",
  113 + "i3GEOinserexy"
  114 + );
  115 +
  116 + },
  117 + /*
118 118 Function: html
119 119  
120 120 Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das op&ccedil;&otilde;es da ferramenta
... ... @@ -122,72 +122,72 @@ i3GEOF.inserexy = {
122 122 Retorno:
123 123  
124 124 String com o c&oacute;digo html
125   - */
126   - html:function() {
127   - var ins = Mustache.render(i3GEOF.inserexy.MUSTACHE, i3GEOF.inserexy.mustacheHash());
128   - return ins;
129   - },
130   - /*
  125 + */
  126 + html:function() {
  127 + var ins = Mustache.render(i3GEOF.inserexy.MUSTACHE, i3GEOF.inserexy.mustacheHash());
  128 + return ins;
  129 + },
  130 + /*
131 131 Function: iniciaJanelaFlutuante
132 132  
133 133 Cria a janela flutuante para controle da ferramenta.
134   - */
135   - iniciaJanelaFlutuante: function(){
136   - i3GEO.janela.tempoMsg("<div style='text-align:left;'>" + $trad("ajuda",i3GEOF.inserexy.dicionario) + "</div>");
137   - var minimiza,cabecalho,janela,divid,temp,titulo;
138   - if ($i("i3GEOF.inserexy")) {
139   - return;
140   - }
141   - //cria a janela flutuante
142   - cabecalho = function(){
143   - i3GEOF.inserexy.ativaFoco();
144   - };
145   - minimiza = function(){
146   - i3GEO.janela.minimiza("i3GEOF.inserexy",200);
147   - };
148   - titulo = "<span class='i3GeoTituloJanelaBsNolink' >" + $trad("d22t") + "</span></div>";
149   - janela = i3GEO.janela.cria(
150   - "520px",
151   - "310px",
152   - "",
153   - "",
154   - "",
155   - titulo,
156   - "i3GEOF.inserexy",
157   - false,
158   - "hd",
159   - cabecalho,
160   - minimiza,
161   - "",
162   - true,
163   - "",
164   - "",
165   - "",
166   - "",
167   - "83"
168   - );
169   - divid = janela[2].id;
170   - i3GEOF.inserexy.aguarde = $i("i3GEOF.inserexy_imagemCabecalho").style;
171   - $i("i3GEOF.inserexy_corpo").style.backgroundColor = "white";
172   - i3GEOF.inserexy.inicia(divid);
173   -
174   - i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEOF.inserexy.adicionaClique()"]);
175   - i3GEO.eventos.cliquePerm.desativa();
176   - temp = function(){
177   - i3GEO.eventos.cliquePerm.ativa();
178   - i3GEO.eventos.removeEventos("MOUSECLIQUE",["i3GEOF.inserexy.adicionaClique()"]);
179   - };
180   - YAHOO.util.Event.addListener(janela[0].close, "click", temp);
181   - },
182   - /*
  134 + */
  135 + iniciaJanelaFlutuante: function(){
  136 + i3GEO.janela.tempoMsg("<div style='text-align:left;'>" + $trad("ajuda",i3GEOF.inserexy.dicionario) + "</div>");
  137 + var minimiza,cabecalho,janela,divid,temp,titulo;
  138 + if ($i("i3GEOF.inserexy")) {
  139 + return;
  140 + }
  141 + //cria a janela flutuante
  142 + cabecalho = function(){
  143 + i3GEOF.inserexy.ativaFoco();
  144 + };
  145 + minimiza = function(){
  146 + i3GEO.janela.minimiza("i3GEOF.inserexy",200);
  147 + };
  148 + titulo = "<span class='i3GeoTituloJanelaBsNolink' >" + $trad("d22t") + "</span></div>";
  149 + janela = i3GEO.janela.cria(
  150 + "520px",
  151 + "310px",
  152 + "",
  153 + "",
  154 + "",
  155 + titulo,
  156 + "i3GEOF.inserexy",
  157 + false,
  158 + "hd",
  159 + cabecalho,
  160 + minimiza,
  161 + "",
  162 + true,
  163 + "",
  164 + "",
  165 + "",
  166 + "",
  167 + "83"
  168 + );
  169 + divid = janela[2].id;
  170 + i3GEOF.inserexy.aguarde = $i("i3GEOF.inserexy_imagemCabecalho").style;
  171 + $i("i3GEOF.inserexy_corpo").style.backgroundColor = "white";
  172 + i3GEOF.inserexy.inicia(divid);
  173 +
  174 + i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEOF.inserexy.adicionaClique()"]);
  175 + i3GEO.eventos.cliquePerm.desativa();
  176 + temp = function(){
  177 + i3GEO.eventos.cliquePerm.ativa();
  178 + i3GEO.eventos.removeEventos("MOUSECLIQUE",["i3GEOF.inserexy.adicionaClique()"]);
  179 + };
  180 + YAHOO.util.Event.addListener(janela[0].close, "click", temp);
  181 + },
  182 + /*
183 183 Function: ativaFoco
184 184  
185 185 Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
186   - */
187   - ativaFoco: function(){
188   - i3GEO.eventos.cliquePerm.desativa();
189   - },
190   - /*
  186 + */
  187 + ativaFoco: function(){
  188 + i3GEO.eventos.cliquePerm.desativa();
  189 + },
  190 + /*
191 191 Function: montaComboLocal
192 192  
193 193 Monta o combo com a lista de temas que podem ser editados (temas armazenados no diret&oacute;rio tempor&aacute;rio do i3Geo)
... ... @@ -195,38 +195,38 @@ i3GEOF.inserexy = {
195 195 Veja:
196 196  
197 197 <i3GEO.util.comboTemas>
198   - */
199   - montaComboLocal: function(){
200   - i3GEO.util.comboTemas(
201   - "i3GEOinserexytemasLocais",
202   - function(retorno){
203   - $i("i3GEOinserexyshapefile").innerHTML = retorno.dados + '<span class="material-icons iconeComboTemas">playlist_add_check</span>';
204   - if ($i("i3GEOinserexytemasLocais")){
205   - $i("i3GEOinserexytemasLocais").onchange = function(){
206   - i3GEO.mapa.ativaTema($i("i3GEOinserexytemasLocais").value);
207   - i3GEOF.inserexy.listaItens();
208   - i3GEOF.inserexy.listaPontos();
209   - };
210   - }
211   - if(i3GEO.temaAtivo !== ""){
212   - var temp = $i("i3GEOinserexytemasLocais");
213   - if(temp){
214   - temp.value = i3GEO.temaAtivo;
215   - temp.onchange.call();
216   - }
217   - }
218   - },
219   - "i3GEOinserexyshapefile",
220   - "",
221   - false,
222   - "locais",
223   - "",
224   - false,
225   - true,
226   - "form-control comboTema"
227   - );
228   - },
229   - /*
  198 + */
  199 + montaComboLocal: function(){
  200 + i3GEO.util.comboTemas(
  201 + "i3GEOinserexytemasLocais",
  202 + function(retorno){
  203 + $i("i3GEOinserexyshapefile").innerHTML = retorno.dados + '<span class="material-icons iconeComboTemas">playlist_add_check</span>';
  204 + if ($i("i3GEOinserexytemasLocais")){
  205 + $i("i3GEOinserexytemasLocais").onchange = function(){
  206 + i3GEO.mapa.ativaTema($i("i3GEOinserexytemasLocais").value);
  207 + i3GEOF.inserexy.listaItens();
  208 + i3GEOF.inserexy.listaPontos();
  209 + };
  210 + }
  211 + if(i3GEO.temaAtivo !== ""){
  212 + var temp = $i("i3GEOinserexytemasLocais");
  213 + if(temp){
  214 + temp.value = i3GEO.temaAtivo;
  215 + temp.onchange.call();
  216 + }
  217 + }
  218 + },
  219 + "i3GEOinserexyshapefile",
  220 + "",
  221 + false,
  222 + "locais",
  223 + "",
  224 + false,
  225 + true,
  226 + "form-control comboTema"
  227 + );
  228 + },
  229 + /*
230 230 Function: criatemaeditavel
231 231  
232 232 Cria um novo tema local para receber os pontos
... ... @@ -234,36 +234,36 @@ i3GEOF.inserexy = {
234 234 Veja:
235 235  
236 236 <CRIASHPVAZIO>
237   - */
238   - criatemaeditavel: function(){
239   - if(i3GEOF.inserexy.aguarde.visibility === "visible")
240   - {return;}
241   - var funcaoOK = function(){
242   - try{
243   - var tituloTema,cp,p;
244   - tituloTema = $i("i3GEOjanelaprompt").value;
245   - if(tituloTema === "")
246   - {tituloTema = "Pontos inseridos "+Math.random();}
247   - i3GEOF.inserexy.aguarde.visibility = "visible";
248   - temp = function(retorno){
249   - i3GEOF.inserexy.aguarde.visibility = "hidden";
250   - i3GEO.temaAtivo = retorno.data;
251   - i3GEO.atualiza();
252   - i3GEOF.inserexy.montaComboLocal();
253   - };
254   - cp = new cpaint();
255   - cp.set_response_type("JSON");
256   - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criashpvazio&tituloTema="+tituloTema;
257   - cp.call(p,"criaSHPvazio",temp);
258   - }
259   - catch(e){
260   - i3GEO.janela.tempoMsg("Erro: "+e);
261   - i3GEOF.inserexy.aguarde.visibility = "hidden";
262   - }
263   - };
264   - i3GEO.janela.prompt($trad('tituloNovoTema',i3GEOF.inserexy.dicionario),funcaoOK,$trad('pontosInseridos',i3GEOF.inserexy.dicionario)+parseInt((Math.random() * 100),10));
265   - },
266   - /*
  237 + */
  238 + criatemaeditavel: function(){
  239 + if(i3GEOF.inserexy.aguarde.visibility === "visible")
  240 + {return;}
  241 + var funcaoOK = function(){
  242 + try{
  243 + var tituloTema,cp,p;
  244 + tituloTema = $i("i3GEOjanelaprompt").value;
  245 + if(tituloTema === "")
  246 + {tituloTema = "Pontos inseridos "+Math.random();}
  247 + i3GEOF.inserexy.aguarde.visibility = "visible";
  248 + temp = function(retorno){
  249 + i3GEOF.inserexy.aguarde.visibility = "hidden";
  250 + i3GEO.temaAtivo = retorno.data;
  251 + i3GEO.atualiza();
  252 + i3GEOF.inserexy.montaComboLocal();
  253 + };
  254 + cp = new cpaint();
  255 + cp.set_response_type("JSON");
  256 + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criashpvazio&tituloTema="+tituloTema;
  257 + cp.call(p,"criaSHPvazio",temp);
  258 + }
  259 + catch(e){
  260 + i3GEO.janela.tempoMsg("Erro: "+e);
  261 + i3GEOF.inserexy.aguarde.visibility = "hidden";
  262 + }
  263 + };
  264 + i3GEO.janela.prompt($trad('tituloNovoTema',i3GEOF.inserexy.dicionario),funcaoOK,$trad('pontosInseridos',i3GEOF.inserexy.dicionario)+parseInt((Math.random() * 100),10));
  265 + },
  266 + /*
267 267 Function: listaPontos
268 268  
269 269 Lista os pontos existentes no tema escolhido
... ... @@ -271,25 +271,25 @@ i3GEOF.inserexy = {
271 271 Veja:
272 272  
273 273 <LISTAPONTOSSHAPE>
274   - */
275   - listaPontos: function(){
276   - var cp,p,temp;
277   - temp = function(retorno){
278   - if (retorno.data != undefined){
279   - var ins = [],i;
280   - for (i=0;i<retorno.data.length; i++)
281   - {ins.push("<div class='pontosInseridos' style='font-size:12px'>"+retorno.data[i].x+" "+retorno.data[i].y+"</div><br>");}
282   - $i("i3GEOinserexyguia6obj").innerHTML = ins.join("");
283   - }
284   - else
285   - {$i("i3GEOinserexyguia6obj").innerHTML = "<p style=color:red >Erro<br>";}
286   - };
287   - cp = new cpaint();
288   - cp.set_response_type("JSON");
289   - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaPontosShape&tema="+$i("i3GEOinserexytemasLocais").value;
290   - cp.call(p,"listaPontosShape",temp);
291   - },
292   - /*
  274 + */
  275 + listaPontos: function(){
  276 + var cp,p,temp;
  277 + temp = function(retorno){
  278 + if (retorno.data != undefined){
  279 + var ins = [],i;
  280 + for (i=0;i<retorno.data.length; i++)
  281 + {ins.push("<div class='pontosInseridos' style='font-size:12px'>"+retorno.data[i].x+" "+retorno.data[i].y+"</div><br>");}
  282 + $i("i3GEOinserexyguia6obj").innerHTML = ins.join("");
  283 + }
  284 + else
  285 + {$i("i3GEOinserexyguia6obj").innerHTML = "<p style=color:red >Erro<br>";}
  286 + };
  287 + cp = new cpaint();
  288 + cp.set_response_type("JSON");
  289 + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaPontosShape&tema="+$i("i3GEOinserexytemasLocais").value;
  290 + cp.call(p,"listaPontosShape",temp);
  291 + },
  292 + /*
293 293 Function: listaItens
294 294  
295 295 Lista os itens do tema escolhido para receber os pontos
... ... @@ -297,147 +297,147 @@ i3GEOF.inserexy = {
297 297 Veja:
298 298  
299 299 <i3GEO.util.comboItens>
300   - */
301   - listaItens: function(){
302   - i3GEO.util.comboItens(
303   - "i3GEOinserexyItem",
304   - $i("i3GEOinserexytemasLocais").value,
305   - function(retorno){
306   - $i("i3GEOinserexyshapefileitem").innerHTML = retorno.dados;
307   - $i("i3GEOinserexyopcitens").style.display = "block";
308   - },
309   - "i3GEOinserexyshapefileitem",
310   - "display:block",
311   - "",
312   - "",
313   - "form-control"
314   - );
315   - },
316   - /*
  300 + */
  301 + listaItens: function(){
  302 + i3GEO.util.comboItens(
  303 + "i3GEOinserexyItem",
  304 + $i("i3GEOinserexytemasLocais").value,
  305 + function(retorno){
  306 + $i("i3GEOinserexyshapefileitem").innerHTML = retorno.dados;
  307 + $i("i3GEOinserexyopcitens").style.display = "block";
  308 + },
  309 + "i3GEOinserexyshapefileitem",
  310 + "display:block",
  311 + "",
  312 + "",
  313 + "form-control"
  314 + );
  315 + },
  316 + /*
317 317 Function: adicionaClique
318 318  
319 319 Adiciona um ponto no mapa no local onde o usu&aacute;rio clicar com o mouse
320 320  
321 321 As coordenadas s&atilde;o obtidas do objeto objposicaocursor
322   - */
323   - adicionaClique: function(){
324   - i3GEOF.inserexy.adiciona(objposicaocursor.ddx+" "+objposicaocursor.ddy,"cliqueMapa");
325   - },
326   - /*
  322 + */
  323 + adicionaClique: function(){
  324 + i3GEOF.inserexy.adiciona(objposicaocursor.ddx+" "+objposicaocursor.ddy,"cliqueMapa");
  325 + },
  326 + /*
327 327 Function: inserirdd
328 328  
329 329 Insere um ponto com base na dire&ccedil;&atilde;o e distancia
330   - */
331   - inserirdd: function(){
332   - try{
333   - var regv,xgv,xmv,xsv,direcao,divs,x,y,xy;
334   - regv = new RegExp(",", "g");
335   - xgv = $i("i3GEOinserexyxgdd").value;
336   - xmv = $i("i3GEOinserexyxmdd").value;
337   - xsv = $i("i3GEOinserexyxsdd").value;
338   - xsv = xsv.replace(regv,".");
339   - direcao = i3GEO.calculo.dms2dd(xgv,xmv,xsv);
340   - //pega o &uacute;ltimo ponto
341   - divs = $i("i3GEOinserexyguia6obj").getElementsByClassName("i3GEOinserexyguia6obj");
342   - divs = divs[divs.length - 1];
343   - divs = divs.innerHTML.split(" ");
344   - x = divs[0];
345   - y = divs[1];
346   - xy = i3GEO.calculo.destinoDD(x,y,$i("i3GEOinserexydistdd").value,direcao);
347   - i3GEOF.inserexy.adiciona(xy[0]+" "+xy[1]);
348   - }catch(e){i3GEO.janela.tempoMsg("Erro: "+e);}
349   - },
350   - /*
  330 + */
  331 + inserirdd: function(){
  332 + try{
  333 + var regv,xgv,xmv,xsv,direcao,divs,x,y,xy;
  334 + regv = new RegExp(",", "g");
  335 + xgv = $i("i3GEOinserexyxgdd").value;
  336 + xmv = $i("i3GEOinserexyxmdd").value;
  337 + xsv = $i("i3GEOinserexyxsdd").value;
  338 + xsv = xsv.replace(regv,".");
  339 + direcao = i3GEO.calculo.dms2dd(xgv,xmv,xsv);
  340 + //pega o &uacute;ltimo ponto
  341 + divs = $i("i3GEOinserexyguia6obj").getElementsByClassName("i3GEOinserexyguia6obj");
  342 + divs = divs[divs.length - 1];
  343 + divs = divs.innerHTML.split(" ");
  344 + x = divs[0];
  345 + y = divs[1];
  346 + xy = i3GEO.calculo.destinoDD(x,y,$i("i3GEOinserexydistdd").value,direcao);
  347 + i3GEOF.inserexy.adiciona(xy[0]+" "+xy[1]);
  348 + }catch(e){i3GEO.janela.tempoMsg("Erro: "+e);}
  349 + },
  350 + /*
351 351 Function: inserir
352 352  
353 353 Insere pontos digitando-se as coordenadas
354   - */
355   - inserir: function(){
356   - try{
357   - var reg = new RegExp("w|W|l|L|o|O|'|G|r", "g"),
358   - regv = new RegExp(",", "g"),
359   - v,xgv = 0,xmv = 0,xsv = 0,vv,ygv = 0,ymv = 0,ysv = 0,x,y;
360   - if($i("i3GEOinserexytipodigcampo").checked){
361   - if (!$i("i3GEOinserexylongitude").value == ""){
362   - v = $i("i3GEOinserexylongitude").value + " 0" + " 0";
363   - v = v.replace(reg,"");
364   - v = v.replace(regv,".");
365   - v = v.split(" ");
366   - xgv = v[0];
367   - xmv = v[1];
368   - xsv = v[2];
369   - xsv = xsv.replace(",",".");
370   - }
371   - if (!$i("i3GEOinserexylatitude").value == ""){
372   - vv = $i("i3GEOinserexylatitude").value + " 0" + " 0";
373   - vv = vv.replace(reg,"");
374   - vv = vv.replace(regv,".");
375   - vv = vv.split(" ");
376   - ygv = vv[0];
377   - ymv = vv[1];
378   - ysv = vv[2];
379   - ysv = ysv.replace(regv,".");
380   - }
381   - }
382   - if($i("i3GEOinserexytipodigmascara").checked){
383   - xgv = $i("i3GEOinserexyxg").value;
384   - xmv = $i("i3GEOinserexyxm").value;
385   - xsv = $i("i3GEOinserexyxs").value;
386   - xsv = xsv.replace(regv,".");
387   - ygv = $i("i3GEOinserexyyg").value;
388   - ymv = $i("i3GEOinserexyym").value;
389   - ysv = $i("i3GEOinserexyys").value;
390   - ysv = ysv.replace(regv,".");
391   - }
392   - x = i3GEO.calculo.dms2dd(xgv,xmv,xsv);
393   - y = i3GEO.calculo.dms2dd(ygv,ymv,ysv);
394   - i3GEOF.inserexy.adiciona(x+" "+y);
395   - }
396   - catch(e){i3GEO.janela.tempoMsg("Erro: "+e);}
397   - },
398   - /*
  354 + */
  355 + inserir: function(){
  356 + try{
  357 + var reg = new RegExp("w|W|l|L|o|O|'|G|r", "g"),
  358 + regv = new RegExp(",", "g"),
  359 + v,xgv = 0,xmv = 0,xsv = 0,vv,ygv = 0,ymv = 0,ysv = 0,x,y;
  360 + if($i("i3GEOinserexytipodigcampo").checked){
  361 + if (!$i("i3GEOinserexylongitude").value == ""){
  362 + v = $i("i3GEOinserexylongitude").value + " 0" + " 0";
  363 + v = v.replace(reg,"");
  364 + v = v.replace(regv,".");
  365 + v = v.split(" ");
  366 + xgv = v[0];
  367 + xmv = v[1];
  368 + xsv = v[2];
  369 + xsv = xsv.replace(",",".");
  370 + }
  371 + if (!$i("i3GEOinserexylatitude").value == ""){
  372 + vv = $i("i3GEOinserexylatitude").value + " 0" + " 0";
  373 + vv = vv.replace(reg,"");
  374 + vv = vv.replace(regv,".");
  375 + vv = vv.split(" ");
  376 + ygv = vv[0];
  377 + ymv = vv[1];
  378 + ysv = vv[2];
  379 + ysv = ysv.replace(regv,".");
  380 + }
  381 + }
  382 + if($i("i3GEOinserexytipodigmascara").checked){
  383 + xgv = $i("i3GEOinserexyxg").value;
  384 + xmv = $i("i3GEOinserexyxm").value;
  385 + xsv = $i("i3GEOinserexyxs").value;
  386 + xsv = xsv.replace(regv,".");
  387 + ygv = $i("i3GEOinserexyyg").value;
  388 + ymv = $i("i3GEOinserexyym").value;
  389 + ysv = $i("i3GEOinserexyys").value;
  390 + ysv = ysv.replace(regv,".");
  391 + }
  392 + x = i3GEO.calculo.dms2dd(xgv,xmv,xsv);
  393 + y = i3GEO.calculo.dms2dd(ygv,ymv,ysv);
  394 + i3GEOF.inserexy.adiciona(x+" "+y);
  395 + }
  396 + catch(e){i3GEO.janela.tempoMsg("Erro: "+e);}
  397 + },
  398 + /*
399 399 Functin: colar
400 400  
401 401 Captura as coordenadas coladas pelo usu&aacute;rio e insere os pontos
402   - */
403   - colar: function(){
404   - var regv = new RegExp(",", "g"),
405   - valores = $i("i3GEOinserexycolar").value;
406   - valores = valores.replace(regv,".");
407   - i3GEOF.inserexy.adiciona(valores);
408   - },
409   - /*
  402 + */
  403 + colar: function(){
  404 + var regv = new RegExp(",", "g"),
  405 + valores = $i("i3GEOinserexycolar").value;
  406 + valores = valores.replace(regv,".");
  407 + i3GEOF.inserexy.adiciona(valores);
  408 + },
  409 + /*
410 410 Function: escolhedig
411 411  
412 412 Define o tipo de entrada de coordenadas (dms ou dd)
413   - */
414   - escolhedig: function(q){
415   - if(q === 0){
416   - q = "i3GEOinserexydigmascara";
417   - }
418   - else{
419   - q = "i3GEOinserexydigcampo";
420   - }
421   - $i("i3GEOinserexydigmascara").style.display="none";
422   - $i("i3GEOinserexydigcampo").style.display="none";
423   - $i(q).style.display="block";
424   - },
425   - /*
  413 + */
  414 + escolhedig: function(q){
  415 + if(q === 0){
  416 + q = "i3GEOinserexydigmascara";
  417 + }
  418 + else{
  419 + q = "i3GEOinserexydigcampo";
  420 + }
  421 + $i("i3GEOinserexydigmascara").style.display="none";
  422 + $i("i3GEOinserexydigcampo").style.display="none";
  423 + $i(q).style.display="block";
  424 + },
  425 + /*
426 426 Function: pegaProjecao
427 427  
428 428 Obt&eacute;m o c&oacute;digo da proje&ccedil;&atilde;o escolhida
429   - */
430   - pegaProjecao: function(){
431   - var inputs = $i("i3GEOinserexylistaepsg").getElementsByTagName("input"),
432   - i,
433   - projecao = "";
434   - for (i=0;i<inputs.length; i++){
435   - if (inputs[i].checked == true)
436   - {projecao = inputs[i].value;}
437   - }
438   - return(projecao);
439   - },
440   - /*
  429 + */
  430 + pegaProjecao: function(){
  431 + var inputs = $i("i3GEOinserexylistaepsg").getElementsByTagName("input"),
  432 + i,
  433 + projecao = "";
  434 + for (i=0;i<inputs.length; i++){
  435 + if (inputs[i].checked == true)
  436 + {projecao = inputs[i].value;}
  437 + }
  438 + return(projecao);
  439 + },
  440 + /*
441 441 Function: adiciona
442 442  
443 443 Adiciona um ponto no mapa
... ... @@ -451,53 +451,53 @@ i3GEOF.inserexy = {
451 451 Veja:
452 452  
453 453 <i3GEO.php.insereSHP>
454   - */
455   - adiciona: function(xy,fonte){
456   - if(i3GEOF.inserexy.aguarde.visibility === "visible"){
457   - return;
458   - }
459   - var tema,
460   - item = "",
461   - valoritem = "",
462   - temp,
463   - n,
464   - i,
465   - xyn,
466   - projecao = i3GEOF.inserexy.pegaProjecao();
467   - if(!$i("i3GEOinserexytemasLocais")){
468   - tema = "";
469   - }else{
470   - tema = $i("i3GEOinserexytemasLocais").value;
471   - }
472   - xyn = xy.split(" ");
473   - n = xyn.length;
474   - temp = "";
475   - for(i=0;i<n;i = i + 2){
476   - temp += "<div class='pontosInseridos' style='font-size:12px' >" + xyn[i]+" "+xyn[i+1] + "</div><br>";
477   - }
478   - $i("i3GEOinserexyguia6obj").innerHTML += temp;
479   - if($i("i3GEOinserexyItem") && $i("i3GEOinserexyvalorItem")){
480   - item = $i("i3GEOinserexyItem").value;
481   - valoritem = $i("i3GEOinserexyvalorItem").value;
482   - }
483   - if (tema === ""){
484   - i3GEO.janela.tempoMsg($trad('msgNenhumTemaDefinido',i3GEOF.inserexy.dicionario));
485   - }
486   - else{
487   - temp = function(retorno){
488   - if(i3GEO.Interface.ATUAL === "padrao")
489   - {i3GEO.atualiza();}
490   - i3GEO.Interface.atualizaTema(retorno,tema);
491   - i3GEOF.inserexy.aguarde.visibility = "hidden";
492   - };
493   - if(fonte !== undefined){
494   - projecao = "";
495   - }
496   - i3GEOF.inserexy.aguarde.visibility = "visible";
497   - i3GEO.php.insereSHP(temp,tema,item,valoritem,xy,projecao);
498   - }
499   - },
500   - /*
  454 + */
  455 + adiciona: function(xy,fonte){
  456 + if(i3GEOF.inserexy.aguarde.visibility === "visible"){
  457 + return;
  458 + }
  459 + var tema,
  460 + item = "",
  461 + valoritem = "",
  462 + temp,
  463 + n,
  464 + i,
  465 + xyn,
  466 + projecao = i3GEOF.inserexy.pegaProjecao();
  467 + if(!$i("i3GEOinserexytemasLocais")){
  468 + tema = "";
  469 + }else{
  470 + tema = $i("i3GEOinserexytemasLocais").value;
  471 + }
  472 + xyn = xy.split(" ");
  473 + n = xyn.length;
  474 + temp = "";
  475 + for(i=0;i<n;i = i + 2){
  476 + temp += "<div class='pontosInseridos' style='font-size:12px' >" + xyn[i]+" "+xyn[i+1] + "</div><br>";
  477 + }
  478 + $i("i3GEOinserexyguia6obj").innerHTML += temp;
  479 + if($i("i3GEOinserexyItem") && $i("i3GEOinserexyvalorItem")){
  480 + item = $i("i3GEOinserexyItem").value;
  481 + valoritem = $i("i3GEOinserexyvalorItem").value;
  482 + }
  483 + if (tema === ""){
  484 + i3GEO.janela.tempoMsg($trad('msgNenhumTemaDefinido',i3GEOF.inserexy.dicionario));
  485 + }
  486 + else{
  487 + temp = function(retorno){
  488 + if(i3GEO.Interface.ATUAL === "padrao")
  489 + {i3GEO.atualiza();}
  490 + i3GEO.Interface.atualizaTema(retorno,tema);
  491 + i3GEOF.inserexy.aguarde.visibility = "hidden";
  492 + };
  493 + if(fonte !== undefined){
  494 + projecao = "";
  495 + }
  496 + i3GEOF.inserexy.aguarde.visibility = "visible";
  497 + i3GEO.php.insereSHP(temp,tema,item,valoritem,xy,projecao);
  498 + }
  499 + },
  500 + /*
501 501 Function: criaLin
502 502  
503 503 Converte os pontos de um tema em linhas
... ... @@ -505,21 +505,21 @@ i3GEOF.inserexy = {
505 505 Veja:
506 506  
507 507 <SPHPT2SHP>
508   - */
509   - criaLin: function(){
510   - if(i3GEOF.inserexy.aguarde.visibility === "visible")
511   - {return;}
512   - i3GEOF.inserexy.aguarde.visibility = "visible";
513   - var cp = new cpaint(),
514   - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=sphPT2shp&para=linha&tema="+$i("i3GEOinserexytemasLocais").value+"&ext="+i3GEO.parametros.mapexten,
515   - temp = function(){
516   - i3GEOF.inserexy.aguarde.visibility = "hidden";
517   - i3GEO.atualiza();
518   - };
519   - cp.set_response_type("JSON");
520   - cp.call(p,"sphPT2shp",temp);
521   - },
522   - /*
  508 + */
  509 + criaLin: function(){
  510 + if(i3GEOF.inserexy.aguarde.visibility === "visible")
  511 + {return;}
  512 + i3GEOF.inserexy.aguarde.visibility = "visible";
  513 + var cp = new cpaint(),
  514 + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=sphPT2shp&para=linha&tema="+$i("i3GEOinserexytemasLocais").value+"&ext="+i3GEO.parametros.mapexten,
  515 + temp = function(){
  516 + i3GEOF.inserexy.aguarde.visibility = "hidden";
  517 + i3GEO.atualiza();
  518 + };
  519 + cp.set_response_type("JSON");
  520 + cp.call(p,"sphPT2shp",temp);
  521 + },
  522 + /*
523 523 Function: criaPol
524 524  
525 525 Converte os pontos de um tema em poligonos
... ... @@ -527,21 +527,21 @@ i3GEOF.inserexy = {
527 527 Veja:
528 528  
529 529 <SPHPT2SHP>
530   - */
531   - criaPol: function(){
532   - if(i3GEOF.inserexy.aguarde.visibility === "visible")
533   - {return;}
534   - i3GEOF.inserexy.aguarde.visibility = "visible";
535   - var cp = new cpaint(),
536   - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=sphPT2shp&para=poligono&tema="+$i("i3GEOinserexytemasLocais").value+"&ext="+i3GEO.parametros.mapexten,
537   - temp = function(){
538   - i3GEOF.inserexy.aguarde.visibility = "hidden";
539   - i3GEO.atualiza();
540   - };
541   - cp.set_response_type("JSON");
542   - cp.call(p,"sphPT2shp",temp);
543   - },
544   - /*
  530 + */
  531 + criaPol: function(){
  532 + if(i3GEOF.inserexy.aguarde.visibility === "visible")
  533 + {return;}
  534 + i3GEOF.inserexy.aguarde.visibility = "visible";
  535 + var cp = new cpaint(),
  536 + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=sphPT2shp&para=poligono&tema="+$i("i3GEOinserexytemasLocais").value+"&ext="+i3GEO.parametros.mapexten,
  537 + temp = function(){
  538 + i3GEOF.inserexy.aguarde.visibility = "hidden";
  539 + i3GEO.atualiza();
  540 + };
  541 + cp.set_response_type("JSON");
  542 + cp.call(p,"sphPT2shp",temp);
  543 + },
  544 + /*
545 545 Function: wkt
546 546  
547 547 Converte os pontos em WKT
... ... @@ -549,62 +549,62 @@ i3GEOF.inserexy = {
549 549 Veja:
550 550  
551 551 <MOSTRAWKT>
552   - */
553   - wkt: function(){
554   - if(i3GEOF.inserexy.aguarde.visibility === "visible")
555   - {return;}
556   - i3GEOF.inserexy.aguarde.visibility = "visible";
557   - try{
558   - var divs = $i("i3GEOinserexyguia6obj").getElementsByClassName("pontosInseridos"),
559   - n = divs.length,
560   - xy = [],
561   - cp = new cpaint(),
562   - i,
563   - mostra = function(retorno){
564   - i3GEOF.inserexy.aguarde.visibility = "hidden";
565   - if (retorno.data !== undefined){
566   - var ins = "<textarea class='form-control input-lg' style=height:80px >"+retorno.data[0]+"</textarea><br>";
567   - ins += "<textarea class='form-control input-lg' style=height:80px >"+retorno.data[1]+"</textarea><br>";
568   - ins += "<textarea class='form-control input-lg' style=height:80px >"+retorno.data[2]+"</textarea><br>";
569   - $i("i3GEOinserexywktres").innerHTML = "<p class=paragrafo >"+ins+"</p>";
570   - }
571   - else
572   - {$i("i3GEOinserexywktres").innerHTML = "<p style=color:red >Erro<br>";}
573   - };
574   - for (i=0;i<n;i++)
575   - {xy.push(divs[i].innerHTML);}
576   - xy = xy.join(" ");
577   - cp.set_response_type("JSON");
578   - cp.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=mostrawkt&xy="+xy,"xy2wkt",mostra);
579   - }
580   - catch(e){i3GEO.janela.tempoMsg("Erro: "+e);i3GEOF.inserexy.aguarde.visibility = "hidden";}
581   - },
582   - /*
  552 + */
  553 + wkt: function(){
  554 + if(i3GEOF.inserexy.aguarde.visibility === "visible")
  555 + {return;}
  556 + i3GEOF.inserexy.aguarde.visibility = "visible";
  557 + try{
  558 + var divs = $i("i3GEOinserexyguia6obj").getElementsByClassName("pontosInseridos"),
  559 + n = divs.length,
  560 + xy = [],
  561 + cp = new cpaint(),
  562 + i,
  563 + mostra = function(retorno){
  564 + i3GEOF.inserexy.aguarde.visibility = "hidden";
  565 + if (retorno.data !== undefined){
  566 + var ins = "<textarea class='form-control input-lg' style=height:80px >"+retorno.data[0]+"</textarea><br>";
  567 + ins += "<textarea class='form-control input-lg' style=height:80px >"+retorno.data[1]+"</textarea><br>";
  568 + ins += "<textarea class='form-control input-lg' style=height:80px >"+retorno.data[2]+"</textarea><br>";
  569 + $i("i3GEOinserexywktres").innerHTML = "<p class=paragrafo >"+ins+"</p>";
  570 + }
  571 + else
  572 + {$i("i3GEOinserexywktres").innerHTML = "<p style=color:red >Erro<br>";}
  573 + };
  574 + for (i=0;i<n;i++)
  575 + {xy.push(divs[i].innerHTML);}
  576 + xy = xy.join(" ");
  577 + cp.set_response_type("JSON");
  578 + cp.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=mostrawkt&xy="+xy,"xy2wkt",mostra);
  579 + }
  580 + catch(e){i3GEO.janela.tempoMsg("Erro: "+e);i3GEOF.inserexy.aguarde.visibility = "hidden";}
  581 + },
  582 + /*
583 583 Function: graficoPerfil
584 584  
585 585 Cria um gr&aacute;fico de perfil com base nos dados inseridos
586   - */
587   - graficoPerfil: function(){
588   - var divs = $i("i3GEOinserexyguia6obj").getElementsByClassName("pontosInseridos"),
589   - js = i3GEO.configura.locaplic+"/ferramentas/perfil/dependencias.php",
590   - n = divs.length,
591   - x = [],
592   - y = [],
593   - xy,
594   - i;
595   - for (i=0;i<n;i++){
596   - xy = divs[i].innerHTML.split(" ");
597   - x.push(xy[0]);
598   - y.push(xy[1]);
599   - }
600   - if(x.length == 0){
601   - i3GEO.janela.tempoMsg($trad('msgNenhumPontoEncontrado',i3GEOF.inserexy.dicionario));
602   - return;
603   - }
604   - pontosdistobj = {
605   - xpt: x,
606   - ypt: y
607   - };
608   - i3GEO.util.scriptTag(js,"i3GEOF.perfil.iniciaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script");
609   - }
  586 + */
  587 + graficoPerfil: function(){
  588 + var divs = $i("i3GEOinserexyguia6obj").getElementsByClassName("pontosInseridos"),
  589 + js = i3GEO.configura.locaplic+"/ferramentas/perfil/dependencias.php",
  590 + n = divs.length,
  591 + x = [],
  592 + y = [],
  593 + xy,
  594 + i;
  595 + for (i=0;i<n;i++){
  596 + xy = divs[i].innerHTML.split(" ");
  597 + x.push(xy[0]);
  598 + y.push(xy[1]);
  599 + }
  600 + if(x.length == 0){
  601 + i3GEO.janela.tempoMsg($trad('msgNenhumPontoEncontrado',i3GEOF.inserexy.dicionario));
  602 + return;
  603 + }
  604 + pontosdistobj = {
  605 + xpt: x,
  606 + ypt: y
  607 + };
  608 + i3GEO.util.scriptTag(js,"i3GEOF.perfil.iniciaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script");
  609 + }
610 610 };
... ...
ferramentas/wmstime/dependencias.php 0 → 100755
... ... @@ -0,0 +1,22 @@
  1 +<?php
  2 +include(dirname(__FILE__)."/../blacklist.php");
  3 +verificaBlFerramentas(basename(dirname(__FILE__)));
  4 +/**
  5 + * Carrega os programas javascript necessarios para a ferramenta
  6 + * Esse programa e usado na tag <script> ou com a funcao scripttag do i3Geo
  7 + * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel
  8 + * javascript i3GEOF.inserexy.MUSTACHE
  9 + * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta
  10 + */
  11 +if(extension_loaded('zlib')){
  12 + ob_start('ob_gzhandler');
  13 +}
  14 +header("Content-type: text/javascript");
  15 +include("index.js");
  16 +include("dicionario.js");
  17 +echo "\n";
  18 +
  19 +if(extension_loaded('zlib')){
  20 + ob_end_flush();
  21 +}
  22 +?>
0 23 \ No newline at end of file
... ...
ferramentas/wmstime/dicionario.js
1 1 //+$trad(1,i3GEOF.wmstime.dicionario)+
2   -i3GEOF.wmstime = {};
3 2 i3GEOF.wmstime.dicionario = {
4 3 1 : [ {
5 4 pt : "Escolha o servi&ccedil;o de fornecimento de dados (WMS-T)",
... ... @@ -80,5 +79,10 @@ i3GEOF.wmstime.dicionario = {
80 79 pt : "clique para adicionar ao mapa",
81 80 en : "",
82 81 es : ""
83   - } ]
  82 + } ],
  83 + 17 : [ {
  84 + pt : "Imagens",
  85 + en : "",
  86 + es : ""
  87 + } ]
84 88 };
... ...
ferramentas/wmstime/index.htm
... ... @@ -1,31 +0,0 @@
1   -<html>
2   -<head>
3   -<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
4   -<script src="../../classesjs/i3geo.js"></script>
5   -<link rel="stylesheet" type="text/css" href="../../css/black.css">
6   -
7   -</head>
8   - <body class="yui-skin-sam" style="background-color: white;" id="i3geo" >
9   - <div style="height:390px;top:10px;left:5px;display:block;width:95%;overflow:auto;" id="parametros" >
10   -
11   - </div>
12   - <div id=quadroAnima style="display:none">
13   - <div style="top:-10px;left:5px;display:block;width:95%;overflow:auto;position:absolute" id="imagens" >
14   - </div>
15   - <div id=imagensLidas style="width:210px;background-color:white;height:170px;overflow:auto;top:20px;"></div>
16   - <div id=marcaTempo style="display:none;position:absolute;cursor:pointer" ></div>
17   - <div id=marcaData style="display:block;position:absolute;text-align:center" ></div>
18   - <div id=controle style="margin:auto;width:90%;margin-top:10px;text-align:center;display:none;position:absolute;cursor:pointer" >
19   - <img title='inicia' src="../../imagens/player_inicia.png" onclick="iniciarFilme()" />&nbsp;
20   - <img title='pausa' src="../../imagens/player_pausa.png" onclick="pausarFilme()" />&nbsp;
21   - <img title='rebobina' src="../../imagens/player_para.png" onclick="rebobina()" />&nbsp;
22   - <img title='mais rapido' src="../../imagens/player_avanca.png" onclick="maisrapido()" />&nbsp;
23   - <img title='mais lento' src="../../imagens/player_volta.png" onclick="maislento()" />&nbsp;
24   - <br>
25   - <input id='voltar' type='button' value='Voltar' />
26   - </div>
27   - </div>
28   -<script type="text/javascript" src="dicionario.js"></script>
29   -<script type="text/javascript" src="index.js"></script>
30   -</body>
31   -</html>
ferramentas/wmstime/index.js
1   -/*
2   -Title: WMS Time
3   -
4   -Acessa um servi&ccedil;o WMS-T, baseado em uma lista pr&eacute;-definida, e monta as imagens em uma sequ&ecirc;ncia temporal.
5   -As imagens podem ser apresentadas em sequ&ecirc;ncia, simulando uma anima&ccedil;&atilde;o.
6   -
7   -Veja:
8   -
9   -<i3GEO.arvoreDeTemas.conectarwmst>
10   -
11   -Arquivo:
12   -
13   -i3geo/ferramentas/wmstime/index.js.php
14   -
15   -Licenca:
16   -
17   -GPL2
18   -
19   -i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
20   -
21   -Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
22   -Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
23   -
24   -Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
25   -e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
26   -GNU conforme publicada pela Free Software Foundation;
27   -
28   -Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
29   -por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
30   -de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
31   -Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
32   -Voc&ecirc; deve ter recebido uma c&oacute;pia da Licen&ccedil;a P&uacute;blica Geral do
33   -GNU junto com este programa; se n&atilde;o, escreva para a
34   -Free Software Foundation, Inc., no endere&ccedil;o
35   -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36   -*/
37   -//parametrosURL();
38   -//tipo = 1 anual, 2 mensal, 3 diario
39   -wms_configura = {
40   - "1": {
41   - titulo: "Active Fires (1 month - Terra/MODIS)",
42   - servico:"http://neowms.sci.gsfc.nasa.gov/wms/wms?",
43   - layers:"MOD14A1_M_FIRE",
44   - styles:"rgb",
45   - srs:"EPSG:4326",
46   - format:"image/jpeg",
47   - descricao:"Dados acumulados de um m&ecirc;s mar&ccedil;o de 2000 a mar&ccedil;o de 2009. Fire is a recurring part of nature. Wildfires can be caused by lightning striking a forest canopy or, in a few isolated cases, by lava or hot rocks ejected from erupting volcanoes. Most fires worldwide are started by humans, sometimes accidentally and sometimes on purpose. Not all fires are bad. Fire clears away dead and dying underbrush, which can help restore forest ecosystems to good health. Humans use fire as a tool in slash-and-burn agriculture to speed up the process of breaking down unwanted vegetation into the soil. Humans also use fire to clear away old-growth forests to make room for living spaces, roads, and fields for raising crops and cattle. But not all fires are good. Wildfires can destroy natural resources and human structures. Globally, fire plays a major role in Earth&apos;s carbon cycle by releasing carbon into the air, and by consuming trees that would otherwise absorb carbon from the air during photosynthesis. These maps show the locations of actively burning fires around the world, detected by instruments aboard NASA satellites.",
48   - anoInicio: 2006,
49   - mesInicio: 1,
50   - diaInicio: 1,
51   - anoFim: 2006,
52   - mesFim: 12,
53   - diaFim: 1,
54   - tipo: 2
55   - }
56   -};
57   -ins = "<p class='paragrafo'>"+$trad(1,i3GEOF.wmstime.dicionario)+":</p>";
58   -ins += "<div class='styled-select'><select onchange='escolheuServico(this.value)'>";
59   -ins += "<option value='' >---</option>";
60   -for(key in wms_configura){
61   - ins += "<option value='"+key+"'>"+wms_configura[key].titulo+"</option>";
  1 +if(typeof(i3GEOF) === 'undefined'){
  2 + var i3GEOF = {};
62 3 }
63   -ins += "</select></div>";
64   -ins += "<br><div class='i3geoForm i3geoFormIconeEdita'><input type=text id=iServico /></div>";
65   -ins += "<br><p class='paragrafo' ><TEXTAREA id='WMS_descricao' rows='3' style='width:95%' >Metadados</TEXTAREA></p>";
66   -
67   -ins += "<table class='lista6'>";
68   -ins += "<tr><td>"+$trad(2,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='0' id=WMS_anoinicio size=4 /></div></td>";
69   -ins += "<td>"+$trad(3,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='0' id=WMS_anofim size=4 /></div></td></tr>";
70   -
71   -ins += "<tr><td>"+$trad(4,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_mesinicio size=4 /></div></td>";
72   -ins += "<td>"+$trad(5,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_mesfim size=4 /></div></td></tr>";
73   -
74   -ins += "<tr><td>"+$trad(6,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_diainicio size=4 /></div></td>";
75   -ins += "<td>"+$trad(7,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_diafim size=4 /></div></td></tr>";
76   -
77   -ins += "</table>";
78   -//ins += "<div style='position:absolute;left:120px;top:180px'>"
79   -ins += "<br><p class='paragrafo'>" + $trad(8,i3GEOF.wmstime.dicionario);
80   -ins += "<div id='divumaImagemPor' class='styled-select' ></div>";
81   -
82   -ins += "<br><input id='botao1' size=18 type='button' value='"+$trad(9,i3GEOF.wmstime.dicionario)+"' />";
83   -ins += "</div>";
84   -
85   -$i("parametros").innerHTML = ins;
86   -idServicoEscolhido = "";
87   -emPausa = true;
88   -b = new YAHOO.widget.Button(
89   - "botao1",
90   - {onclick:{fn: iniciaImagens}}
91   -);
92   -b.addClass("rodar150");
93   -
94   -b = new YAHOO.widget.Button(
95   - "voltar",
96   - {
97   - onclick: function(){
98   - $i('quadroAnima').style.display='none';
99   - $i('parametros').style.display='block';
100   - }
101   - }
102   -);
103   -b.addClass("rodar150");
104   -
105   -/*
106   -Function: escolheuServico
  4 +i3GEOF.wmstime = {
  5 + configura: {
  6 + "1": {
  7 + titulo: "Active Fires (1 month - Terra/MODIS)",
  8 + servico:"http://neowms.sci.gsfc.nasa.gov/wms/wms?",
  9 + layers:"MOD14A1_M_FIRE",
  10 + styles:"rgb",
  11 + srs:"EPSG:4326",
  12 + format:"image/jpeg",
  13 + descricao:"Dados acumulados de um m&ecirc;s mar&ccedil;o de 2000 a mar&ccedil;o de 2009. Fire is a recurring part of nature. Wildfires can be caused by lightning striking a forest canopy or, in a few isolated cases, by lava or hot rocks ejected from erupting volcanoes. Most fires worldwide are started by humans, sometimes accidentally and sometimes on purpose. Not all fires are bad. Fire clears away dead and dying underbrush, which can help restore forest ecosystems to good health. Humans use fire as a tool in slash-and-burn agriculture to speed up the process of breaking down unwanted vegetation into the soil. Humans also use fire to clear away old-growth forests to make room for living spaces, roads, and fields for raising crops and cattle. But not all fires are good. Wildfires can destroy natural resources and human structures. Globally, fire plays a major role in Earth&apos;s carbon cycle by releasing carbon into the air, and by consuming trees that would otherwise absorb carbon from the air during photosynthesis. These maps show the locations of actively burning fires around the world, detected by instruments aboard NASA satellites.",
  14 + anoInicio: 2006,
  15 + mesInicio: 1,
  16 + diaInicio: 1,
  17 + anoFim: 2006,
  18 + mesFim: 12,
  19 + diaFim: 1,
  20 + tipo: 2
  21 + }
  22 + },
  23 + quadroAtual: 0,
  24 + idServicoEscolhido: "",
  25 + emPausa: true,
  26 + MUSTACHE : "",
  27 + mustacheHash : function() {
  28 + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.wmstime.dicionario);
  29 + dicionario["locaplic"] = i3GEO.configura.locaplic;
  30 + return dicionario;
  31 + },
  32 + inicia: function(iddiv){
  33 + var ins,key = "";
  34 + if(i3GEOF.wmstime.MUSTACHE == ""){
  35 + $.get(i3GEO.configura.locaplic + "/ferramentas/wmstime/template_mst.html", function(template) {
  36 + i3GEOF.wmstime.MUSTACHE = template;
  37 + i3GEOF.wmstime.inicia(iddiv);
  38 + });
  39 + return;
  40 + }
  41 + $i(iddiv).innerHTML = i3GEOF.wmstime.html();
  42 +
  43 + ins = "<select class='form-control' onchange='i3GEOF.wmstime.escolheuServico(this.value)'><option value='' >---</option>";
  44 + for(key in i3GEOF.wmstime.configura){
  45 + ins += "<option value='"+key+"'>"+i3GEOF.wmstime.configura[key].titulo+"</option>";
  46 + }
  47 + ins += "</select><b class='caret careti'></b>";
  48 + $i("i3GEOFwmstimelistaDeServicos").innerHTML = ins;
  49 + i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia1","i3GEOwmstimeguia");
  50 + $i("i3GEOwmstimeguia1").onclick = function(){
  51 + i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia1","i3GEOwmstimeguia");
  52 + };
  53 + $i("i3GEOwmstimeguia2").onclick = function(){
  54 + if(i3GEOF.wmstime.idServicoEscolhido != ""){
  55 + i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia2","i3GEOwmstimeguia");
  56 + }
  57 + };
  58 + },
  59 + html:function() {
  60 + var ins = Mustache.render(i3GEOF.wmstime.MUSTACHE, i3GEOF.wmstime.mustacheHash());
  61 + return ins;
  62 + },
  63 + iniciaJanelaFlutuante: function(){
  64 + var minimiza,cabecalho,janela,divid,temp,titulo;
  65 + if ($i("i3GEOF.wmstime")) {
  66 + return;
  67 + }
  68 + //cria a janela flutuante
  69 + cabecalho = function(){
  70 +
  71 + };
  72 + minimiza = function(){
  73 + i3GEO.janela.minimiza("i3GEOF.wmstime",200);
  74 + };
  75 + titulo = "<span class='i3GeoTituloJanelaBsNolink' >WMS Time</span></div>";
  76 + janela = i3GEO.janela.cria(
  77 + "600px",
  78 + "400px",
  79 + "",
  80 + "",
  81 + "",
  82 + titulo,
  83 + "i3GEOF.wmstime",
  84 + false,
  85 + "hd",
  86 + cabecalho,
  87 + minimiza,
  88 + "",
  89 + true,
  90 + "",
  91 + "",
  92 + "",
  93 + "",
  94 + "76"
  95 + );
  96 + divid = janela[2].id;
  97 + i3GEOF.wmstime.aguarde = $i("i3GEOF.wmstime_imagemCabecalho").style;
  98 + i3GEOF.wmstime.inicia(divid);
  99 + },
  100 + /*
  101 +Function: i3GEOF.wmstime.escolheuServico
107 102  
108 103 Monta a tela de parametros ap&oacute;s um servi&ccedil;o ter sido escolhido
109 104  
110 105 Parametro:
111 106  
112 107 idWMS {String} - id do servi&ccedil;o escolhido
113   -*/
114   -function escolheuServico(idWMS){
115   - idServicoEscolhido = idWMS;
116   - tipoServico = wms_configura[idWMS].tipo;
117   - servico = wms_configura[idWMS].servico+"&VERSION=1.1.1&REQUEST=GetMap&layers="+wms_configura[idWMS].layers+"&styles="+wms_configura[idWMS].styles+"&srs="+wms_configura[idWMS].srs+"&format="+wms_configura[idWMS].format;
118   - $i("iServico").value = servico;
119   - $i("WMS_descricao").value = wms_configura[idWMS].descricao;
120   -
121   - $i("WMS_anoinicio").value = wms_configura[idWMS].anoInicio;
122   - //if(tipoServico > 1)
123   - $i("WMS_mesinicio").value = wms_configura[idWMS].mesInicio;
124   - //if(tipoServico > 2)
125   - $i("WMS_diainicio").value = wms_configura[idWMS].diaInicio;
126   - $i("WMS_anofim").value = wms_configura[idWMS].anoFim;
127   - //if(tipoServico > 1)
128   - $i("WMS_mesfim").value = wms_configura[idWMS].mesFim;
129   - //if(tipoServico > 2)
130   - $i("WMS_diafim").value = wms_configura[idWMS].diaFim;
131   -
132   - var ins = "<select id='umaImagemPor' >";
133   - if(tipoServico == 1){
134   - ins += "<option value='ano' selected >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option></select>";
135   - }
136   - if(tipoServico == 2){
137   - ins += "<option value='ano' >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
138   - ins += "<option value='mes' selected >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option></select>";
139   - }
140   - if(tipoServico == 3){
141   - ins += "<option value='ano' >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
142   - ins += "<option value='mes' >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option>";
143   - ins += "<option value='dia' selected >"+$trad(12,i3GEOF.wmstime.dicionario)+"</option></select>";
144   - }
145   - $i("divumaImagemPor").innerHTML = ins;
146   -}
147   -/*
148   -Function: iniciaImagens
  108 + */
  109 + escolheuServico: function(idWMS){
  110 + i3GEOF.wmstime.idServicoEscolhido = idWMS;
  111 + tipoServico = i3GEOF.wmstime.configura[idWMS].tipo;
  112 + servico = i3GEOF.wmstime.configura[idWMS].servico+"&VERSION=1.1.1&REQUEST=GetMap&layers="+i3GEOF.wmstime.configura[idWMS].layers+"&styles="+i3GEOF.wmstime.configura[idWMS].styles+"&srs="+i3GEOF.wmstime.configura[idWMS].srs+"&format="+i3GEOF.wmstime.configura[idWMS].format;
  113 + $i("i3GEOFwmstimeiServico").value = servico;
  114 + $i("WMS_descricao").innerHTML = i3GEOF.wmstime.configura[idWMS].descricao;
  115 +
  116 + $i("WMS_anoinicio").value = i3GEOF.wmstime.configura[idWMS].anoInicio;
  117 + //if(tipoServico > 1)
  118 + $i("WMS_mesinicio").value = i3GEOF.wmstime.configura[idWMS].mesInicio;
  119 + //if(tipoServico > 2)
  120 + $i("WMS_diainicio").value = i3GEOF.wmstime.configura[idWMS].diaInicio;
  121 + $i("WMS_anofim").value = i3GEOF.wmstime.configura[idWMS].anoFim;
  122 + //if(tipoServico > 1)
  123 + $i("WMS_mesfim").value = i3GEOF.wmstime.configura[idWMS].mesFim;
  124 + //if(tipoServico > 2)
  125 + $i("WMS_diafim").value = i3GEOF.wmstime.configura[idWMS].diaFim;
  126 +
  127 + var ins = "<select class='form-control' id='umaImagemPor' >";
  128 + if(tipoServico == 1){
  129 + ins += "<option value='ano' selected >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option></select>";
  130 + }
  131 + if(tipoServico == 2){
  132 + ins += "<option value='ano' >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
  133 + ins += "<option value='mes' selected >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option></select>";
  134 + }
  135 + if(tipoServico == 3){
  136 + ins += "<option value='ano' >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
  137 + ins += "<option value='mes' >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option>";
  138 + ins += "<option value='dia' selected >"+$trad(12,i3GEOF.wmstime.dicionario)+"</option></select><b class='caret careti'></b>";
  139 + }
  140 + $i("divumaImagemPor").innerHTML = ins;
  141 + },
  142 + /*
  143 +Function: i3GEOF.wmstime.iniciaImagens
149 144  
150 145 Inicia a tela de apresenta&ccedil;&atilde;o das imagens
151   -*/
152   -function iniciaImagens(){
153   - $i("imagens").innerHTML = "";
154   - $i("imagensLidas").innerHTML = "";
155   - $i("marcaTempo").innerHTML = "";
156   - $i("parametros").style.display="none";
157   - $i("quadroAnima").style.display="block";
158   - if(window.parent.i3GEO.parametros.mapexten){
159   - bbox = window.parent.i3GEO.parametros.mapexten.split(" ");
160   - bbox = bbox.toString();
161   - }
162   - else
163   - bbox = "-51.0347433181,-25.2688559441,-43.4155582517,-21.1417973665";
164   - //var time = "2008-01-01"
165   - w = window.parent.i3GEO.parametros.w; //985
166   - h = window.parent.i3GEO.parametros.h;
167   - dw = 540;
168   - dh = 245;
169   -
170   - anoInicio = $i("WMS_anoinicio").value;
171   - mesInicio = $i("WMS_mesinicio").value;
172   - diaInicio = $i("WMS_diainicio").value;
173   -
174   - anoFim = $i("WMS_anofim").value;
175   - mesFim = $i("WMS_mesfim").value;
176   - diaFim = $i("WMS_diafim").value;
177   -
178   - intervalo = 1;
179   - id = 1;
180   -
181   - ids = new Array();
182   - quantasLidas = 0;
183   - onde = $i("imagens");
184   - ondeContador = $i("imagensLidas");
185   - ondeContador.style.display="block";
186   - ondeControle = $i("controle");
187   - idsValidos = new Array();
188   - idsTempo = new Array();
189   - parouQuantas = 0;
190   - ondeMarcaTempo = $i("marcaTempo");
191   - ondeData = $i("marcaData");
192   - tempoAnima = 500;
193   -
194   - if($i("umaImagemPor").value == "mes"){
195   - dataFixa = diaInicio;
196   - if(dataFixa < 10){dataFixa = "0"+dataFixa;}
197   - var anoAtual = anoInicio;
198   - var mesAtual = mesInicio;
199   - while (anoAtual <= anoFim){
200   - while (mesAtual < 13){
201   - var mes = mesAtual;
202   - if(mes < 10){mes = "0"+mes;}
203   - criaImg(anoAtual+"-"+mes+"-"+dataFixa,id);
204   - criaImgStatus(anoAtual+"-"+mes+"-"+dataFixa,id);
205   - ids.push(id);
206   - idsTempo.push(anoAtual+"-"+mes+"-"+dataFixa);
207   - id++;
208   - mesAtual++;
209   - if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
210   - }
211   - mesAtual = 1;
212   - anoAtual++;
213   - }
214   - }
215   - if($i("umaImagemPor").value == "dia"){
216   - var anoAtual = anoInicio;
217   - var mesAtual = mesInicio;
218   - var diaAtual = diaInicio;
219   - while (anoAtual <= anoFim){
220   - while (mesAtual < 13){
221   - var mes = mesAtual;
222   - if(mes < 10){mes = "0"+mes;}
223   - while (diaAtual < 31){
224   - var dia = diaAtual;
225   - if(diaAtual < 10){dia = "0"+dia;}
226   - criaImg(anoAtual+"-"+mes+"-"+dia,id);
227   - criaImgStatus(anoAtual+"-"+mes+"-"+dia,id);
228   - ids.push(id);
229   - idsTempo.push(anoAtual+"-"+mes+"-"+dia);
230   - id++;
231   - diaAtual++;
232   - if(mesAtual == mesFim && diaAtual > diaFim){diaAtual = 32;}
233   - }
234   - mesAtual++;
235   - if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
236   - }
237   - mesAtual = 1;
238   - anoAtual++;
239   - }
240   - }
241   -}
242   -/*
243   -function: criaImg
  146 + */
  147 + iniciaImagens: function(){
  148 + if(i3GEOF.wmstime.idServicoEscolhido == ""){
  149 + return;
  150 + }
  151 + i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia2","i3GEOwmstimeguia");
  152 + $i("i3GEOFwmstimeimagens").innerHTML = "";
  153 + $i("i3GEOFwmstimeimagensLidas").innerHTML = "";
  154 + $i("i3GEOFwmstimemarcaTempo").innerHTML = "";
  155 + if(i3GEO.parametros.mapexten){
  156 + bbox = i3GEO.parametros.mapexten.split(" ");
  157 + bbox = bbox.toString();
  158 + }
  159 + else {
  160 + bbox = "-51.0347433181,-25.2688559441,-43.4155582517,-21.1417973665";
  161 + }
  162 + //var time = "2008-01-01"
  163 + w = i3GEO.parametros.w; //985
  164 + h = i3GEO.parametros.h;
  165 + dw = 540;
  166 + dh = 245;
  167 +
  168 + anoInicio = $i("WMS_anoinicio").value;
  169 + mesInicio = $i("WMS_mesinicio").value;
  170 + diaInicio = $i("WMS_diainicio").value;
  171 +
  172 + anoFim = $i("WMS_anofim").value;
  173 + mesFim = $i("WMS_mesfim").value;
  174 + diaFim = $i("WMS_diafim").value;
  175 +
  176 + intervalo = 1;
  177 + id = 1;
  178 +
  179 + ids = new Array();
  180 + quantasLidas = 0;
  181 + onde = $i("i3GEOFwmstimeimagens");
  182 + ondeContador = $i("i3GEOFwmstimeimagensLidas");
  183 + ondeContador.style.display="block";
  184 + idsValidos = new Array();
  185 + idsTempo = new Array();
  186 + parouQuantas = 0;
  187 + ondeMarcaTempo = $i("i3GEOFwmstimemarcaTempo");
  188 + ondeData = $i("i3GEOFwmstimemarcaData");
  189 + tempoAnima = 500;
  190 +
  191 + if($i("umaImagemPor").value == "mes"){
  192 + dataFixa = diaInicio;
  193 + if(dataFixa < 10){dataFixa = "0"+dataFixa;}
  194 + var anoAtual = anoInicio;
  195 + var mesAtual = mesInicio;
  196 + while (anoAtual <= anoFim){
  197 + while (mesAtual < 13){
  198 + var mes = mesAtual;
  199 + if(mes < 10){mes = "0"+mes;}
  200 + i3GEOF.wmstime.criaImg(anoAtual+"-"+mes+"-"+dataFixa,id);
  201 + i3GEOF.wmstime.criaImgStatus(anoAtual+"-"+mes+"-"+dataFixa,id);
  202 + ids.push(id);
  203 + idsTempo.push(anoAtual+"-"+mes+"-"+dataFixa);
  204 + id++;
  205 + mesAtual++;
  206 + if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
  207 + }
  208 + mesAtual = 1;
  209 + anoAtual++;
  210 + }
  211 + }
  212 + if($i("umaImagemPor").value == "dia"){
  213 + var anoAtual = anoInicio;
  214 + var mesAtual = mesInicio;
  215 + var diaAtual = diaInicio;
  216 + while (anoAtual <= anoFim){
  217 + while (mesAtual < 13){
  218 + var mes = mesAtual;
  219 + if(mes < 10){mes = "0"+mes;}
  220 + while (diaAtual < 31){
  221 + var dia = diaAtual;
  222 + if(diaAtual < 10){dia = "0"+dia;}
  223 + i3GEOF.wmstime.criaImg(anoAtual+"-"+mes+"-"+dia,id);
  224 + i3GEOF.wmstime.criaImgStatus(anoAtual+"-"+mes+"-"+dia,id);
  225 + ids.push(id);
  226 + idsTempo.push(anoAtual+"-"+mes+"-"+dia);
  227 + id++;
  228 + diaAtual++;
  229 + if(mesAtual == mesFim && diaAtual > diaFim){diaAtual = 32;}
  230 + }
  231 + mesAtual++;
  232 + if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
  233 + }
  234 + mesAtual = 1;
  235 + anoAtual++;
  236 + }
  237 + }
  238 + },
  239 + /*
  240 +function: i3GEOF.wmstime.criaImg
244 241  
245 242 Cria um elemento do tipo IMG com base no servi&ccedil;o escolhido e nos parametros de tempo
246 243  
... ... @@ -249,34 +246,33 @@ Parametros:
249 246 tempo {string} - data da imagem que ser&aacute; requisitada
250 247  
251 248 id {string} - id que ser&aacute; definido para a imagem
252   -*/
253   -function criaImg(tempo,id){
254   - var novoel = document.createElement("img");
255   - var p = "absolute";
256   - //if(id==1){var p = "relative"}
257   - novoel.id = id;
258   - novoel.style.position = p;
259   - novoel.style.top = "0px";
260   - novoel.style.left = "0px";
261   - novoel.style.width = dw+"px";
262   - novoel.style.height = dh+"px";
263   - novoel.style.cursor = "pointer";
264   - novoel.src = $i("iServico").value+"&width="+dw+"&height="+dh+"&bbox="+bbox+"&time="+tempo; //"../../imagens/atlas1.jpg";
265   - novoel.title = $trad(13,i3GEOF.wmstime.dicionario);
266   - novoel.onclick = function(){
267   - adicionaMapa(idServicoEscolhido);
268   - };
269   - novoel.onload = function(){
270   - $i("status"+this.id).innerHTML = " <span style=color:red >OK</span>";
271   - idsValidos.push(this.id);
272   - parouQuantas++;
273   - if(idsValidos.length == ids.length)
274   - {pararStatus();}
275   - };
276   - onde.appendChild(novoel);
277   -}
278   -/*
279   -Function: criaImgStatus
  249 + */
  250 + criaImg: function(tempo,id){
  251 + var novoel = document.createElement("img");
  252 + var p = "absolute";
  253 + novoel.id = id;
  254 + novoel.style.position = p;
  255 + novoel.style.top = "0px";
  256 + novoel.style.left = "0px";
  257 + novoel.style.width = dw+"px";
  258 + novoel.style.height = dh+"px";
  259 + novoel.style.cursor = "pointer";
  260 + novoel.src = $i("i3GEOFwmstimeiServico").value+"&width="+dw+"&height="+dh+"&bbox="+bbox+"&time="+tempo;
  261 + novoel.title = $trad(13,i3GEOF.wmstime.dicionario);
  262 + novoel.onclick = function(){
  263 + i3GEOF.wmstime.adicionaMapa(i3GEOF.wmstime.idServicoEscolhido);
  264 + };
  265 + novoel.onload = function(){
  266 + $i("status"+this.id).innerHTML = " <span style=color:red >OK</span>";
  267 + idsValidos.push(this.id);
  268 + parouQuantas++;
  269 + if(idsValidos.length == ids.length)
  270 + {i3GEOF.wmstime.pararStatus();}
  271 + };
  272 + onde.appendChild(novoel);
  273 + },
  274 + /*
  275 +Function: i3GEOF.wmstime.criaImgStatus
280 276  
281 277 Cria um &iacute;cone que permite parar a apresenta&ccedil;&atilde;o da anima&ccedil;&atilde;o em uma determinada imagem
282 278  
... ... @@ -285,244 +281,238 @@ Parametros:
285 281 tempo {string} - data da imagem
286 282  
287 283 id {string} - id da imagem
288   -*/
289   -function criaImgStatus(tempo,id){
290   - var novoel = document.createElement("div");
291   - novoel.id = "lida"+id;
292   - novoel.style.width="200px";
293   - novoel.innerHTML = "Imagem: "+tempo+"...<span style=cursor:pointer;color:blue onclick='pararImagem(\""+id+"\")' id='status"+id+"' >parar</span>";
294   - ondeContador.appendChild(novoel);
295   -}
296   -/*
297   -Function: pararImagem
  284 + */
  285 + criaImgStatus: function(tempo,id){
  286 + var novoel = document.createElement("div");
  287 + novoel.id = "lida"+id;
  288 + novoel.style.width="200px";
  289 + novoel.innerHTML = "Imagem: "+tempo+"...<span style=cursor:pointer;color:blue onclick='i3GEOF.wmstime.pararImagem(\""+id+"\")' id='status"+id+"' >parar</span>";
  290 + ondeContador.appendChild(novoel);
  291 + },
  292 + /*
  293 +Function: i3GEOF.wmstime.pararImagem
298 294  
299 295 Parar a apresenta&ccedil;&atilde;o da anima&ccedil;&atilde;o em uma determinada imagem
300 296  
301 297 Parametro:
302 298  
303 299 id {string} - id da imagem
304   -*/
305   -function pararImagem(id){
306   - if($i(id)){
307   - $i(id).src = "";
308   - //onde.removeChild(document.getElementById(id))
309   - idsValidos.push(id);
310   - $i("status"+id).innerHTML = $trad(14,i3GEOF.wmstime.dicionario);
311   - parouQuantas++;
312   - if(parouQuantas == ids.length)
313   - {pararStatus();}
314   - }
315   - else
316   - {i3GEO.janela.tempoMsg($trad(15,i3GEOF.wmstime.dicionario));}
317   -}
318   -/*
319   -Function: pararStatus
  300 + */
  301 + pararImagem: function(id){
  302 + if($i(id)){
  303 + $i(id).src = "";
  304 + //onde.removeChild(document.getElementById(id))
  305 + idsValidos.push(id);
  306 + $i("status"+id).innerHTML = $trad(14,i3GEOF.wmstime.dicionario);
  307 + parouQuantas++;
  308 + if(parouQuantas == ids.length)
  309 + {i3GEOF.wmstime.pararStatus();}
  310 + }
  311 + else
  312 + {i3GEO.janela.tempoMsg($trad(15,i3GEOF.wmstime.dicionario));}
  313 + },
  314 + /*
  315 +Function: i3GEOF.wmstime.pararStatus
320 316  
321 317 Para o gr&aacute;fico que mostra o status das imagens
322   -*/
323   -function pararStatus(){
324   - ondeContador.style.display = "none";
325   - ondeControle.style.display="block";
326   - ondeMarcaTempo.style.display="block";
327   - ondeMarcaTempo.style.top = "10px";
328   - ondeControle.style.top = dh + 50 + "px";
329   - ondeData.style.top = dh + 30 + "px";
330   - ondeData.style.width = dw+"px";
331   - desativaQuadros();
332   - criaMarcadorTempo();
333   - //ajustaIds()
334   - ativaQuadro(1);
335   -}
336   -function ajustaIds(){
337   -
338   -}
339   -/*
340   -Function: criaMarcadorTempo
  318 + */
  319 + pararStatus: function(){
  320 + ondeContador.style.display = "none";
  321 + ondeMarcaTempo.style.display="block";
  322 + ondeMarcaTempo.style.top = "10px";
  323 + ondeData.style.top = dh + 30 + "px";
  324 + ondeData.style.width = dw+"px";
  325 + i3GEOF.wmstime.desativaQuadros();
  326 + i3GEOF.wmstime.criaMarcadorTempo();
  327 + //i3GEOF.wmstime.ajustaIds()
  328 + i3GEOF.wmstime.ativaQuadro(1);
  329 + },
  330 + ajustaIds: function(){
  331 +
  332 + },
  333 + /*
  334 +Function: i3GEOF.wmstime.criaMarcadorTempo
341 335  
342 336 Cria o gr&aacute;fico que mostra as imagens dispon&iacute;veis. Serve de base para indicar qual imagem est&aacute; sendo mostrada
343   -*/
344   -function criaMarcadorTempo(){
345   - var nmarcas = ids.length;
346   - distanciaMarcas = parseInt(dw / nmarcas);
347   - var ins = "";
348   - var ini = parseInt((distanciaMarcas*i - (distanciaMarcas/2)));
349   - for(var i=1;i<=nmarcas;i++){
350   - ins += "<img title='"+$trad(16,i3GEOF.wmstime.dicionario)+"' onclick='adicionaMapa(\""+i+"\")' onmouseover='mostraI(\""+i+"\")' onmouseout='escondeI(\""+i+"\")' style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas*i - (distanciaMarcas/2)))+"px;' src='../../imagens/dot1.gif' id='marcaTempo"+i+"' />";
351   - }
352   - ins += "<img style='position:absolute;top:"+(dh - 5)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='../../imagens/dot1red.gif' id='marcaDeTempo' />";
353   - ins += "<img style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='../../imagens/dot1cinza.gif' id='marcaGranulo' />";
354   - ngranulo = nmarcas;
355   - tgranulo = (parseInt((distanciaMarcas*i - (distanciaMarcas/2))) - ini) / 10;
356   - tempoGranulo = tempoAnima / 10;
357   - ondeMarcaTempo.innerHTML = ins;
358   - marcaVermelha = $i("marcaDeTempo");
359   - imgGranulo = $i("marcaGranulo");
360   - pararFilme();
361   - iniciarFilme();
362   -}
363   -/*
364   -Function: mostraI
  337 + */
  338 + criaMarcadorTempo: function(){
  339 + var nmarcas = ids.length;
  340 + distanciaMarcas = parseInt(dw / nmarcas);
  341 + var ins = "";
  342 + var ini = parseInt((distanciaMarcas*i - (distanciaMarcas/2)));
  343 + for(var i=1;i<=nmarcas;i++){
  344 + ins += "<img title='"+$trad(16,i3GEOF.wmstime.dicionario)+"' onclick='i3GEOF.wmstime.adicionaMapa(\""+i+"\")' onmouseover='i3GEOF.wmstime.mostraI(\""+i+"\")' onmouseout='i3GEOF.wmstime.escondeI(\""+i+"\")' style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas*i - (distanciaMarcas/2)))+"px;' src='"+i3GEO.configura.locaplic+"/imagens/dot1.gif' id='i3GEOFwmstimemarcaTempo"+i+"' />";
  345 + }
  346 + ins += "<img style='position:absolute;top:"+(dh - 5)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='"+i3GEO.configura.locaplic+"/imagens/dot1red.gif' id='marcaDeTempo' />";
  347 + ins += "<img style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='"+i3GEO.configura.locaplic+"/imagens/dot1cinza.gif' id='marcaGranulo' />";
  348 + ngranulo = nmarcas;
  349 + tgranulo = (parseInt((distanciaMarcas*i - (distanciaMarcas/2))) - ini) / 10;
  350 + tempoGranulo = tempoAnima / 10;
  351 + ondeMarcaTempo.innerHTML = ins;
  352 + marcaVermelha = $i("marcaDeTempo");
  353 + imgGranulo = $i("marcaGranulo");
  354 + i3GEOF.wmstime.pararFilme();
  355 + i3GEOF.wmstime.iniciarFilme();
  356 + },
  357 + /*
  358 +Function: i3GEOF.wmstime.mostraI
365 359  
366 360 Mostra uma imagem espec&iacute;fica
367 361  
368 362 Parametro:
369 363  
370 364 obj {dom} - objeto contendo a imagem
371   -*/
372   -function mostraI(obj){
373   - $i(obj).style.display="block";
374   - ondeData.innerHTML = "YYMMDD: "+idsTempo[obj-1];
375   - if($i(quadroAtual))
376   - $i(quadroAtual).style.display = "none";
377   - else
378   - $i("1").style.display = "none";
379   -}
380   -/*
381   -Function: escondeI
  365 + */
  366 + mostraI: function(obj){
  367 + $i(obj).style.display="block";
  368 + ondeData.innerHTML = "YYMMDD: "+idsTempo[obj-1];
  369 + if($i(i3GEOF.wmstime.quadroAtual))
  370 + $i(i3GEOF.wmstime.quadroAtual).style.display = "none";
  371 + else
  372 + $i("1").style.display = "none";
  373 + },
  374 + /*
  375 +Function: i3GEOF.wmstime.escondeI
382 376  
383 377 Esconde uma imagem
384 378  
385 379 Parametro:
386 380  
387 381 obj {dom} - objeto contendo a imagem
388   -*/
389   -function escondeI(obj){
390   - $i(obj).style.display="none";
391   - ondeData.innerHTML = "";
392   - if($i(quadroAtual))
393   - $i(quadroAtual).style.display = "block";
394   - else
395   - $i("1").style.display = "block";
396   -}
397   -/*
398   -Function: adicionaMapa
  382 + */
  383 + escondeI: function(obj){
  384 + $i(obj).style.display="none";
  385 + ondeData.innerHTML = "";
  386 + if($i(i3GEOF.wmstime.quadroAtual))
  387 + $i(i3GEOF.wmstime.quadroAtual).style.display = "block";
  388 + else
  389 + $i("1").style.display = "block";
  390 + },
  391 + /*
  392 +Function: i3GEOF.wmstime.adicionaMapa
399 393  
400 394 Adiciona uma camada ao mapa baseado na imagem vista na tela
401 395  
402   -*/
403   -function adicionaMapa(idMarca){
404   - //aguarde("block");
405   - idMarca = parseInt(idMarca,10);
406   - var serv = wms_configura[idServicoEscolhido];
407   - var fim = function(retorno){
408   - //aguarde("none");
409   - if (retorno.data.erro)
410   - {i3GEO.janela.tempoMsg(retorno.data.erro);}
411   - else
412   - {window.parent.i3GEO.atualiza("");}
413   - };
414   - var p = window.parent.i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+window.parent.i3GEO.configura.sid+"&funcao=adicionatemawms";
415   - p += "&servico="+serv.servico;
416   - if(serv.styles == "")
417   - p += "&nome=";
418   - else
419   - p += "&nome="+serv.styles;
420   - p += "&tema="+serv.layers;
421   - p += "&proj="+serv.srs;
422   - p += "&formato="+serv.format;
423   - p += "&tipo=estilo";
424   - p += "&versao=1.1.1";
425   - p += "&nomecamada="+serv.titulo+" "+idsTempo[idMarca-1];
426   - p += "&tiporep=&suportasld=nao";
427   - p += "&formatosinfo=text/plain,application/vnd.ogc.gml";
428   - p += "&time="+idsTempo[idMarca-1];
429   - var cp = new cpaint();
430   - cp.set_response_type("JSON");
431   - cp.call(p,"wmstime",fim);
432   -
433   -}
434   -function desativaQuadros(){
435   - var n = idsValidos.length;
436   - for(var i=0;i<n;i++){
437   - $i(idsValidos[i]).style.display = "none";
438   - }
439   -}
440   -function ativaQuadro(i){
441   - var q = $i(i);
442   - if(q){
443   - q.style.position = "relative";
444   - q.style.display = "block";
445   - }
446   - if($i("marcaTempo"+i)){
447   - $i("marcaTempo"+i).style.display = "block";
448   - }
449   - if($i("marcaTempo"+(i))){
450   - marcaVermelha.style.left = $i("marcaTempo"+(i)).style.left;
451   - }
452   -}
453   -function pausarFilme(){
454   - emPausa = !emPausa;
455   - if(emPausa == false){
456   - anima();
457   - }
458   - else{
459   - imgGranulo.style.display="none";
460   - pulaGranulo = 11;
461   - try{
462   - clearTimeout(ganima);
463   - }catch(e){}
464   - }
465   -}
466   -function esconderMarcasTempo(){
467   - var n = idsValidos.length;
468   - for(var i=0;i<n;i++){
469   - if($i("marcaTempo"+i)){
470   - $i("marcaTempo"+i).style.display = "none";
471   - }
472   - }
473   -}
474   -function pararFilme(){
475   - emPausa = false;
476   - imgGranulo.style.left = parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px";
477   - quadroAtual = 0;
478   - desativaQuadros();
479   - ativaQuadro(ids[0]);
480   - imgGranulo.style.display="none";
481   - ondeData.innerHTML = "";
482   - try{
483   - //clearTimeout(tanima)
484   - clearTimeout(ganima);
485   - }catch(e){}
486   -}
487   -function iniciarFilme(){
488   - emPausa = false;
489   - esconderMarcasTempo();
490   - imgGranulo.style.display="block";
491   - //tanima = setTimeout("anima()",tempoAnima)
492   - //ganima = setTimeout("animacaoGranulo()",tempoGranulo)
493   - anima();
494   -}
495   -function rebobina(){
496   - esconderMarcasTempo();
497   - pararFilme();
498   -}
499   -function anima(){
500   - desativaQuadros();
501   - ativaQuadro(ids[quadroAtual]);
502   - ondeData.innerHTML = idsTempo[quadroAtual];
503   - quadroAtual++;
504   - if(quadroAtual < idsValidos.length){
505   - //tanima = setTimeout("anima()",tempoAnima)
506   - pulaGranulo = 0;
507   - imgGranulo.style.left = $i("marcaTempo"+quadroAtual).style.left;
508   - ganima = setTimeout("animacaoGranulo()",tempoGranulo);
509   - }
510   - else{
511   - imgGranulo.style.display="none";
512   - }
513   -}
514   -function animacaoGranulo(){
515   - imgGranulo.style.left = parseInt(imgGranulo.style.left) + tgranulo + "px";
516   - pulaGranulo++;
517   - //if(quadroAtual < idsValidos.length)
518   - if(pulaGranulo <= 10)
519   - ganima = setTimeout("animacaoGranulo()",tempoGranulo);
520   - else
521   - anima();
522   -}
523   -function maisrapido(){
524   - tempoGranulo = tempoGranulo - 10;
525   -}
526   -function maislento(){
527   - tempoGranulo = tempoGranulo + 10;
528   -}
  396 + */
  397 + adicionaMapa: function(idMarca){
  398 + idMarca = parseInt(idMarca,10);
  399 + var serv = i3GEOF.wmstime.configura[i3GEOF.wmstime.idServicoEscolhido];
  400 + var fim = function(retorno){
  401 + i3GEO.atualiza(retorno);
  402 + };
  403 + var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionatemawms";
  404 + p += "&servico="+serv.servico;
  405 + if(serv.styles == "")
  406 + p += "&nome=";
  407 + else
  408 + p += "&nome="+serv.styles;
  409 + p += "&tema="+serv.layers;
  410 + p += "&proj="+serv.srs;
  411 + p += "&formato="+serv.format;
  412 + p += "&tipo=estilo";
  413 + p += "&versao=1.1.1";
  414 + p += "&nomecamada="+serv.titulo+" "+idsTempo[idMarca-1];
  415 + p += "&tiporep=&suportasld=nao";
  416 + p += "&formatosinfo=text/plain,application/vnd.ogc.gml";
  417 + p += "&time="+idsTempo[idMarca-1];
  418 + var cp = new cpaint();
  419 + cp.set_response_type("JSON");
  420 + cp.call(p,"wmstime",fim);
  421 +
  422 + },
  423 + desativaQuadros: function(){
  424 + var n = idsValidos.length;
  425 + for(var i=0;i<n;i++){
  426 + $i(idsValidos[i]).style.display = "none";
  427 + }
  428 + },
  429 + ativaQuadro: function(i){
  430 + var q = $i(i);
  431 + if(q){
  432 + q.style.position = "relative";
  433 + q.style.display = "block";
  434 + }
  435 + if($i("i3GEOFwmstimemarcaTempo"+i)){
  436 + $i("i3GEOFwmstimemarcaTempo"+i).style.display = "block";
  437 + }
  438 + if($i("i3GEOFwmstimemarcaTempo"+(i))){
  439 + marcaVermelha.style.left = $i("i3GEOFwmstimemarcaTempo"+(i)).style.left;
  440 + }
  441 + },
  442 + pausarFilme: function(){
  443 + i3GEOF.wmstime.emPausa = !i3GEOF.wmstime.emPausa;
  444 + if(i3GEOF.wmstime.emPausa == false){
  445 + i3GEOF.wmstime.anima();
  446 + }
  447 + else{
  448 + imgGranulo.style.display="none";
  449 + pulaGranulo = 11;
  450 + try{
  451 + clearTimeout(ganima);
  452 + }catch(e){}
  453 + }
  454 + },
  455 + esconderMarcasTempo: function(){
  456 + var n = idsValidos.length;
  457 + for(var i=0;i<n;i++){
  458 + if($i("i3GEOFwmstimemarcaTempo"+i)){
  459 + $i("i3GEOFwmstimemarcaTempo"+i).style.display = "none";
  460 + }
  461 + }
  462 + },
  463 + pararFilme: function(){
  464 + i3GEOF.wmstime.emPausa = false;
  465 + imgGranulo.style.left = parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px";
  466 + i3GEOF.wmstime.quadroAtual = 0;
  467 + i3GEOF.wmstime.desativaQuadros();
  468 + i3GEOF.wmstime.ativaQuadro(ids[0]);
  469 + imgGranulo.style.display="none";
  470 + ondeData.innerHTML = "";
  471 + try{
  472 + //clearTimeout(tanima)
  473 + clearTimeout(ganima);
  474 + }catch(e){}
  475 + },
  476 + iniciarFilme: function(){
  477 + i3GEOF.wmstime.emPausa = false;
  478 + i3GEOF.wmstime.esconderMarcasTempo();
  479 + imgGranulo.style.display="block";
  480 + //tanima = setTimeout("anima()",tempoAnima)
  481 + //ganima = setTimeout("i3GEOF.wmstime.animacaoGranulo()",tempoGranulo)
  482 + i3GEOF.wmstime.anima();
  483 + },
  484 + rebobina: function(){
  485 + i3GEOF.wmstime.esconderMarcasTempo();
  486 + i3GEOF.wmstime.pararFilme();
  487 + },
  488 + anima: function(){
  489 + i3GEOF.wmstime.desativaQuadros();
  490 + i3GEOF.wmstime.ativaQuadro(ids[i3GEOF.wmstime.quadroAtual]);
  491 + ondeData.innerHTML = idsTempo[i3GEOF.wmstime.quadroAtual];
  492 + i3GEOF.wmstime.quadroAtual++;
  493 + if(i3GEOF.wmstime.quadroAtual < idsValidos.length){
  494 + //tanima = setTimeout("anima()",tempoAnima)
  495 + pulaGranulo = 0;
  496 + imgGranulo.style.left = $i("i3GEOFwmstimemarcaTempo"+i3GEOF.wmstime.quadroAtual).style.left;
  497 + ganima = setTimeout("i3GEOF.wmstime.animacaoGranulo()",tempoGranulo);
  498 + }
  499 + else{
  500 + imgGranulo.style.display="none";
  501 + }
  502 + },
  503 + animacaoGranulo: function(){
  504 + imgGranulo.style.left = parseInt(imgGranulo.style.left) + tgranulo + "px";
  505 + pulaGranulo++;
  506 + //if(quadroAtual < idsValidos.length)
  507 + if(pulaGranulo <= 10)
  508 + ganima = setTimeout("i3GEOF.wmstime.animacaoGranulo()",tempoGranulo);
  509 + else
  510 + i3GEOF.wmstime.anima();
  511 + },
  512 + maisrapido: function(){
  513 + tempoGranulo = tempoGranulo - 10;
  514 + },
  515 + maislento: function(){
  516 + tempoGranulo = tempoGranulo + 10;
  517 + }
  518 +};
529 519 \ No newline at end of file
... ...
ferramentas/wmstime/template_mst.html
1   -<div id='i3GEOwikiLista' style='display: block; background-color: white; text-align: left; padding: 5px;'></div>
2 1 \ No newline at end of file
  2 +<div class='yui-navset' style='height: 38px; top: 0px; cursor: pointer; margin-left: 2px;'>
  3 + <ul class='yui-nav' style='border-width: 0pt 0pt 0px; border-color: rgb(240, 240, 240); border-bottom-color: white;'>
  4 + <li>
  5 + <div id='i3GEOwmstimeguia1' style='text-align: center; left: 0px;'>
  6 + <a>
  7 + <em><span class="material-icons">settings</span></em>
  8 + </a>
  9 + </div>
  10 + </li>
  11 + <li>
  12 + <div id='i3GEOwmstimeguia2' style='text-align: center; left: 0px;'>
  13 + <a>
  14 + <em>{{{17}}}</em>
  15 + </a>
  16 + </div>
  17 + </li>
  18 + </ul>
  19 +</div>
  20 +<div class='container-fluid ' id='i3GEOwmstimeguia1obj'>
  21 + <div style='width: 100%;' class='form-group label-fixed condensed'>
  22 + <label class='control-label' for=''>{{{1}}}</label>
  23 + <div style='width: 100%;' class='input-group'>
  24 + <div id='i3GEOFwmstimelistaDeServicos'></div>
  25 + </div>
  26 + </div>
  27 + <div class='form-group label-fixed condensed'>
  28 + <label class='control-label' for='i3GEOFwmstimeiServico'></label>
  29 + <input class='form-control input-lg' type='text' id='i3GEOFwmstimeiServico' value='' />
  30 + </div>
  31 + <div class='form-group label-fixed condensed'>
  32 + <label class='control-label' for=''>Metadados</label>
  33 + <h5 class='alert alert-info' id='WMS_descricao'></h5>
  34 + </div>
  35 + <div class='form-group label-fixed condensed'>
  36 + <label class='control-label' for='WMS_anoinicio'>{{{2}}}</label>
  37 + <input class='form-control input-lg' type='text' id='WMS_anoinicio' value='0' />
  38 + </div>
  39 + <div class='form-group label-fixed condensed'>
  40 + <label class='control-label' for='WMS_anofim'>{{{3}}}</label>
  41 + <input class='form-control input-lg' type='text' id='WMS_anofim' value='0' />
  42 + </div>
  43 + <div class='form-group label-fixed condensed'>
  44 + <label class='control-label' for='WMS_mesinicio'>{{{4}}}</label>
  45 + <input class='form-control input-lg' type='text' id='WMS_mesinicio' value='nulo' />
  46 + </div>
  47 + <div class='form-group label-fixed condensed'>
  48 + <label class='control-label' for='WMS_mesfim'>{{{5}}}</label>
  49 + <input class='form-control input-lg' type='text' id='WMS_mesfim' value='nulo' />
  50 + </div>
  51 + <div class='form-group label-fixed condensed'>
  52 + <label class='control-label' for='WMS_diainicio'>{{{6}}}</label>
  53 + <input class='form-control input-lg' type='text' id='WMS_diainicio' value='nulo' />
  54 + </div>
  55 + <div class='form-group label-fixed condensed'>
  56 + <label class='control-label' for='WMS_diafim'>{{{7}}}</label>
  57 + <input class='form-control input-lg' type='text' id='WMS_diafim' value='nulo' />
  58 + </div>
  59 + <div style='width: 100%;' class='form-group label-fixed condensed'>
  60 + <label class='control-label' for=''>{{{8}}}</label>
  61 + <div style='width: 100%;' class='input-group'>
  62 + <div id='divumaImagemPor'></div>
  63 + </div>
  64 + </div>
  65 + <button onclick='i3GEOF.wmstime.iniciaImagens()' class='btn btn-primary btn-sm btn-raised'>{{{9}}}</button>
  66 +</div>
  67 +<div class='container-fluid ' id='i3GEOwmstimeguia2obj'>
  68 + <div id=i3GEOFwmstimeimagensLidas style="display: block;"></div>
  69 + <div id="i3GEOFwmstimeimagens"></div>
  70 +
  71 + <div id=i3GEOFwmstimemarcaTempo style="display: none; position: absolute; cursor: pointer"></div>
  72 + <div id=i3GEOFwmstimemarcaData style="display: block; position: absolute; text-align: center"></div>
  73 + <div class='form-group condensed' style="top: 40px;">
  74 + <button title='inicia' onclick='i3GEOF.wmstime.iniciarFilme()' class='btn btn-xs' style='margin: 2px; padding: 2px;'>
  75 + <i class="material-icons">play_circle_outline</i>
  76 + </button>
  77 + <button title='pausa' onclick='i3GEOF.wmstime.pausarFilme()' class='btn btn-xs' style='margin: 2px; padding: 2px;'>
  78 + <i class="material-icons">pause_circle_outline</i>
  79 + </button>
  80 + <button title='rebobina' onclick='i3GEOF.wmstime.rebobina()' class='btn btn-xs' style='margin: 2px; padding: 2px;'>
  81 + <i class="material-icons">replay</i>
  82 + </button>
  83 + <button title='mais rapido' onclick='i3GEOF.wmstime.maisrapido()' class='btn btn-xs' style='margin: 2px; padding: 2px;'>
  84 + <i class="material-icons">add_circle_outline</i>
  85 + </button>
  86 + <button title='mais lento' onclick='i3GEOF.wmstime.maislento()' class='btn btn-xs' style='margin: 2px; padding: 2px;'>
  87 + <i class="material-icons">remove_circle_outline</i>
  88 + </button>
  89 + </div>
  90 +</div>
3 91 \ No newline at end of file
... ...
ferramentas/wmstimeold/dicionario.js 0 → 100755
... ... @@ -0,0 +1,84 @@
  1 +//+$trad(1,i3GEOF.wmstime.dicionario)+
  2 +i3GEOF.wmstime = {};
  3 +i3GEOF.wmstime.dicionario = {
  4 + 1 : [ {
  5 + pt : "Escolha o servi&ccedil;o de fornecimento de dados (WMS-T)",
  6 + en : "",
  7 + es : ""
  8 + } ],
  9 + 2 : [ {
  10 + pt : "Ano inicial:",
  11 + en : "",
  12 + es : ""
  13 + } ],
  14 + 3 : [ {
  15 + pt : "Ano final:",
  16 + en : "",
  17 + es : ""
  18 + } ],
  19 + 4 : [ {
  20 + pt : "M&ecirc;s inicial:",
  21 + en : "",
  22 + es : ""
  23 + } ],
  24 + 5 : [ {
  25 + pt : "M&ecirc;s final:",
  26 + en : "",
  27 + es : ""
  28 + } ],
  29 + 6 : [ {
  30 + pt : "Dia inicial:",
  31 + en : "",
  32 + es : ""
  33 + } ],
  34 + 7 : [ {
  35 + pt : "Dia final:",
  36 + en : "",
  37 + es : ""
  38 + } ],
  39 + 8 : [ {
  40 + pt : "Obter uma imagem por:",
  41 + en : "",
  42 + es : ""
  43 + } ],
  44 + 9 : [ {
  45 + pt : "Continuar",
  46 + en : "",
  47 + es : ""
  48 + } ],
  49 + 10 : [ {
  50 + pt : "Ano",
  51 + en : "",
  52 + es : ""
  53 + } ],
  54 + 11 : [ {
  55 + pt : "M&ecirc;s",
  56 + en : "",
  57 + es : ""
  58 + } ],
  59 + 12 : [ {
  60 + pt : "Dia",
  61 + en : "",
  62 + es : ""
  63 + } ],
  64 + 13 : [ {
  65 + pt : "clique para adicionar ao mapa",
  66 + en : "",
  67 + es : ""
  68 + } ],
  69 + 14 : [ {
  70 + pt : "exclu&iacute;do",
  71 + en : "",
  72 + es : ""
  73 + } ],
  74 + 15 : [ {
  75 + pt : "Imagem exclu&iacute;da",
  76 + en : "",
  77 + es : ""
  78 + } ],
  79 + 16 : [ {
  80 + pt : "clique para adicionar ao mapa",
  81 + en : "",
  82 + es : ""
  83 + } ]
  84 +};
... ...
ferramentas/wmstimeold/index.htm 0 → 100755
... ... @@ -0,0 +1,31 @@
  1 +<html>
  2 +<head>
  3 +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
  4 +<script src="../../classesjs/i3geo.js"></script>
  5 +<link rel="stylesheet" type="text/css" href="../../css/black.css">
  6 +
  7 +</head>
  8 + <body class="yui-skin-sam" style="background-color: white;" id="i3geo" >
  9 + <div style="height:390px;top:10px;left:5px;display:block;width:95%;overflow:auto;" id="parametros" >
  10 +
  11 + </div>
  12 + <div id=quadroAnima style="display:none">
  13 + <div style="top:-10px;left:5px;display:block;width:95%;overflow:auto;position:absolute" id="imagens" >
  14 + </div>
  15 + <div id=imagensLidas style="width:210px;background-color:white;height:170px;overflow:auto;top:20px;"></div>
  16 + <div id=marcaTempo style="display:none;position:absolute;cursor:pointer" ></div>
  17 + <div id=marcaData style="display:block;position:absolute;text-align:center" ></div>
  18 + <div id=controle style="margin:auto;width:90%;margin-top:10px;text-align:center;display:none;position:absolute;cursor:pointer" >
  19 + <img title='inicia' src="../../imagens/player_inicia.png" onclick="iniciarFilme()" />&nbsp;
  20 + <img title='pausa' src="../../imagens/player_pausa.png" onclick="pausarFilme()" />&nbsp;
  21 + <img title='rebobina' src="../../imagens/player_para.png" onclick="rebobina()" />&nbsp;
  22 + <img title='mais rapido' src="../../imagens/player_avanca.png" onclick="maisrapido()" />&nbsp;
  23 + <img title='mais lento' src="../../imagens/player_volta.png" onclick="maislento()" />&nbsp;
  24 + <br>
  25 + <input id='voltar' type='button' value='Voltar' />
  26 + </div>
  27 + </div>
  28 +<script type="text/javascript" src="dicionario.js"></script>
  29 +<script type="text/javascript" src="index.js"></script>
  30 +</body>
  31 +</html>
... ...
ferramentas/wmstimeold/index.js 0 → 100755
... ... @@ -0,0 +1,528 @@
  1 +/*
  2 +Title: WMS Time
  3 +
  4 +Acessa um servi&ccedil;o WMS-T, baseado em uma lista pr&eacute;-definida, e monta as imagens em uma sequ&ecirc;ncia temporal.
  5 +As imagens podem ser apresentadas em sequ&ecirc;ncia, simulando uma anima&ccedil;&atilde;o.
  6 +
  7 +Veja:
  8 +
  9 +<i3GEO.arvoreDeTemas.conectarwmst>
  10 +
  11 +Arquivo:
  12 +
  13 +i3geo/ferramentas/wmstime/index.js.php
  14 +
  15 +Licenca:
  16 +
  17 +GPL2
  18 +
  19 +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
  20 +
  21 +Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
  22 +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
  23 +
  24 +Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
  25 +e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
  26 +GNU conforme publicada pela Free Software Foundation;
  27 +
  28 +Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
  29 +por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
  30 +de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
  31 +Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
  32 +Voc&ecirc; deve ter recebido uma c&oacute;pia da Licen&ccedil;a P&uacute;blica Geral do
  33 +GNU junto com este programa; se n&atilde;o, escreva para a
  34 +Free Software Foundation, Inc., no endere&ccedil;o
  35 +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  36 +*/
  37 +//parametrosURL();
  38 +//tipo = 1 anual, 2 mensal, 3 diario
  39 +wms_configura = {
  40 + "1": {
  41 + titulo: "Active Fires (1 month - Terra/MODIS)",
  42 + servico:"http://neowms.sci.gsfc.nasa.gov/wms/wms?",
  43 + layers:"MOD14A1_M_FIRE",
  44 + styles:"rgb",
  45 + srs:"EPSG:4326",
  46 + format:"image/jpeg",
  47 + descricao:"Dados acumulados de um m&ecirc;s mar&ccedil;o de 2000 a mar&ccedil;o de 2009. Fire is a recurring part of nature. Wildfires can be caused by lightning striking a forest canopy or, in a few isolated cases, by lava or hot rocks ejected from erupting volcanoes. Most fires worldwide are started by humans, sometimes accidentally and sometimes on purpose. Not all fires are bad. Fire clears away dead and dying underbrush, which can help restore forest ecosystems to good health. Humans use fire as a tool in slash-and-burn agriculture to speed up the process of breaking down unwanted vegetation into the soil. Humans also use fire to clear away old-growth forests to make room for living spaces, roads, and fields for raising crops and cattle. But not all fires are good. Wildfires can destroy natural resources and human structures. Globally, fire plays a major role in Earth&apos;s carbon cycle by releasing carbon into the air, and by consuming trees that would otherwise absorb carbon from the air during photosynthesis. These maps show the locations of actively burning fires around the world, detected by instruments aboard NASA satellites.",
  48 + anoInicio: 2006,
  49 + mesInicio: 1,
  50 + diaInicio: 1,
  51 + anoFim: 2006,
  52 + mesFim: 12,
  53 + diaFim: 1,
  54 + tipo: 2
  55 + }
  56 +};
  57 +ins = "<p class='paragrafo'>"+$trad(1,i3GEOF.wmstime.dicionario)+":</p>";
  58 +ins += "<div class='styled-select'><select onchange='escolheuServico(this.value)'>";
  59 +ins += "<option value='' >---</option>";
  60 +for(key in wms_configura){
  61 + ins += "<option value='"+key+"'>"+wms_configura[key].titulo+"</option>";
  62 +}
  63 +ins += "</select></div>";
  64 +ins += "<br><div class='i3geoForm i3geoFormIconeEdita'><input type=text id=iServico /></div>";
  65 +ins += "<br><p class='paragrafo' ><TEXTAREA id='WMS_descricao' rows='3' style='width:95%' >Metadados</TEXTAREA></p>";
  66 +
  67 +ins += "<table class='lista6'>";
  68 +ins += "<tr><td>"+$trad(2,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='0' id=WMS_anoinicio size=4 /></div></td>";
  69 +ins += "<td>"+$trad(3,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='0' id=WMS_anofim size=4 /></div></td></tr>";
  70 +
  71 +ins += "<tr><td>"+$trad(4,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_mesinicio size=4 /></div></td>";
  72 +ins += "<td>"+$trad(5,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_mesfim size=4 /></div></td></tr>";
  73 +
  74 +ins += "<tr><td>"+$trad(6,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_diainicio size=4 /></div></td>";
  75 +ins += "<td>"+$trad(7,i3GEOF.wmstime.dicionario)+" </td><td><div class='i3geoForm100'><input type=text value='nulo' id=WMS_diafim size=4 /></div></td></tr>";
  76 +
  77 +ins += "</table>";
  78 +//ins += "<div style='position:absolute;left:120px;top:180px'>"
  79 +ins += "<br><p class='paragrafo'>" + $trad(8,i3GEOF.wmstime.dicionario);
  80 +ins += "<div id='divumaImagemPor' class='styled-select' ></div>";
  81 +
  82 +ins += "<br><input id='botao1' size=18 type='button' value='"+$trad(9,i3GEOF.wmstime.dicionario)+"' />";
  83 +ins += "</div>";
  84 +
  85 +$i("parametros").innerHTML = ins;
  86 +idServicoEscolhido = "";
  87 +emPausa = true;
  88 +b = new YAHOO.widget.Button(
  89 + "botao1",
  90 + {onclick:{fn: iniciaImagens}}
  91 +);
  92 +b.addClass("rodar150");
  93 +
  94 +b = new YAHOO.widget.Button(
  95 + "voltar",
  96 + {
  97 + onclick: function(){
  98 + $i('quadroAnima').style.display='none';
  99 + $i('parametros').style.display='block';
  100 + }
  101 + }
  102 +);
  103 +b.addClass("rodar150");
  104 +
  105 +/*
  106 +Function: escolheuServico
  107 +
  108 +Monta a tela de parametros ap&oacute;s um servi&ccedil;o ter sido escolhido
  109 +
  110 +Parametro:
  111 +
  112 +idWMS {String} - id do servi&ccedil;o escolhido
  113 +*/
  114 +function escolheuServico(idWMS){
  115 + idServicoEscolhido = idWMS;
  116 + tipoServico = wms_configura[idWMS].tipo;
  117 + servico = wms_configura[idWMS].servico+"&VERSION=1.1.1&REQUEST=GetMap&layers="+wms_configura[idWMS].layers+"&styles="+wms_configura[idWMS].styles+"&srs="+wms_configura[idWMS].srs+"&format="+wms_configura[idWMS].format;
  118 + $i("iServico").value = servico;
  119 + $i("WMS_descricao").value = wms_configura[idWMS].descricao;
  120 +
  121 + $i("WMS_anoinicio").value = wms_configura[idWMS].anoInicio;
  122 + //if(tipoServico > 1)
  123 + $i("WMS_mesinicio").value = wms_configura[idWMS].mesInicio;
  124 + //if(tipoServico > 2)
  125 + $i("WMS_diainicio").value = wms_configura[idWMS].diaInicio;
  126 + $i("WMS_anofim").value = wms_configura[idWMS].anoFim;
  127 + //if(tipoServico > 1)
  128 + $i("WMS_mesfim").value = wms_configura[idWMS].mesFim;
  129 + //if(tipoServico > 2)
  130 + $i("WMS_diafim").value = wms_configura[idWMS].diaFim;
  131 +
  132 + var ins = "<select id='umaImagemPor' >";
  133 + if(tipoServico == 1){
  134 + ins += "<option value='ano' selected >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option></select>";
  135 + }
  136 + if(tipoServico == 2){
  137 + ins += "<option value='ano' >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
  138 + ins += "<option value='mes' selected >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option></select>";
  139 + }
  140 + if(tipoServico == 3){
  141 + ins += "<option value='ano' >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
  142 + ins += "<option value='mes' >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option>";
  143 + ins += "<option value='dia' selected >"+$trad(12,i3GEOF.wmstime.dicionario)+"</option></select>";
  144 + }
  145 + $i("divumaImagemPor").innerHTML = ins;
  146 +}
  147 +/*
  148 +Function: iniciaImagens
  149 +
  150 +Inicia a tela de apresenta&ccedil;&atilde;o das imagens
  151 +*/
  152 +function iniciaImagens(){
  153 + $i("imagens").innerHTML = "";
  154 + $i("imagensLidas").innerHTML = "";
  155 + $i("marcaTempo").innerHTML = "";
  156 + $i("parametros").style.display="none";
  157 + $i("quadroAnima").style.display="block";
  158 + if(window.parent.i3GEO.parametros.mapexten){
  159 + bbox = window.parent.i3GEO.parametros.mapexten.split(" ");
  160 + bbox = bbox.toString();
  161 + }
  162 + else
  163 + bbox = "-51.0347433181,-25.2688559441,-43.4155582517,-21.1417973665";
  164 + //var time = "2008-01-01"
  165 + w = window.parent.i3GEO.parametros.w; //985
  166 + h = window.parent.i3GEO.parametros.h;
  167 + dw = 540;
  168 + dh = 245;
  169 +
  170 + anoInicio = $i("WMS_anoinicio").value;
  171 + mesInicio = $i("WMS_mesinicio").value;
  172 + diaInicio = $i("WMS_diainicio").value;
  173 +
  174 + anoFim = $i("WMS_anofim").value;
  175 + mesFim = $i("WMS_mesfim").value;
  176 + diaFim = $i("WMS_diafim").value;
  177 +
  178 + intervalo = 1;
  179 + id = 1;
  180 +
  181 + ids = new Array();
  182 + quantasLidas = 0;
  183 + onde = $i("imagens");
  184 + ondeContador = $i("imagensLidas");
  185 + ondeContador.style.display="block";
  186 + ondeControle = $i("controle");
  187 + idsValidos = new Array();
  188 + idsTempo = new Array();
  189 + parouQuantas = 0;
  190 + ondeMarcaTempo = $i("marcaTempo");
  191 + ondeData = $i("marcaData");
  192 + tempoAnima = 500;
  193 +
  194 + if($i("umaImagemPor").value == "mes"){
  195 + dataFixa = diaInicio;
  196 + if(dataFixa < 10){dataFixa = "0"+dataFixa;}
  197 + var anoAtual = anoInicio;
  198 + var mesAtual = mesInicio;
  199 + while (anoAtual <= anoFim){
  200 + while (mesAtual < 13){
  201 + var mes = mesAtual;
  202 + if(mes < 10){mes = "0"+mes;}
  203 + criaImg(anoAtual+"-"+mes+"-"+dataFixa,id);
  204 + criaImgStatus(anoAtual+"-"+mes+"-"+dataFixa,id);
  205 + ids.push(id);
  206 + idsTempo.push(anoAtual+"-"+mes+"-"+dataFixa);
  207 + id++;
  208 + mesAtual++;
  209 + if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
  210 + }
  211 + mesAtual = 1;
  212 + anoAtual++;
  213 + }
  214 + }
  215 + if($i("umaImagemPor").value == "dia"){
  216 + var anoAtual = anoInicio;
  217 + var mesAtual = mesInicio;
  218 + var diaAtual = diaInicio;
  219 + while (anoAtual <= anoFim){
  220 + while (mesAtual < 13){
  221 + var mes = mesAtual;
  222 + if(mes < 10){mes = "0"+mes;}
  223 + while (diaAtual < 31){
  224 + var dia = diaAtual;
  225 + if(diaAtual < 10){dia = "0"+dia;}
  226 + criaImg(anoAtual+"-"+mes+"-"+dia,id);
  227 + criaImgStatus(anoAtual+"-"+mes+"-"+dia,id);
  228 + ids.push(id);
  229 + idsTempo.push(anoAtual+"-"+mes+"-"+dia);
  230 + id++;
  231 + diaAtual++;
  232 + if(mesAtual == mesFim && diaAtual > diaFim){diaAtual = 32;}
  233 + }
  234 + mesAtual++;
  235 + if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
  236 + }
  237 + mesAtual = 1;
  238 + anoAtual++;
  239 + }
  240 + }
  241 +}
  242 +/*
  243 +function: criaImg
  244 +
  245 +Cria um elemento do tipo IMG com base no servi&ccedil;o escolhido e nos parametros de tempo
  246 +
  247 +Parametros:
  248 +
  249 +tempo {string} - data da imagem que ser&aacute; requisitada
  250 +
  251 +id {string} - id que ser&aacute; definido para a imagem
  252 +*/
  253 +function criaImg(tempo,id){
  254 + var novoel = document.createElement("img");
  255 + var p = "absolute";
  256 + //if(id==1){var p = "relative"}
  257 + novoel.id = id;
  258 + novoel.style.position = p;
  259 + novoel.style.top = "0px";
  260 + novoel.style.left = "0px";
  261 + novoel.style.width = dw+"px";
  262 + novoel.style.height = dh+"px";
  263 + novoel.style.cursor = "pointer";
  264 + novoel.src = $i("iServico").value+"&width="+dw+"&height="+dh+"&bbox="+bbox+"&time="+tempo; //"../../imagens/atlas1.jpg";
  265 + novoel.title = $trad(13,i3GEOF.wmstime.dicionario);
  266 + novoel.onclick = function(){
  267 + adicionaMapa(idServicoEscolhido);
  268 + };
  269 + novoel.onload = function(){
  270 + $i("status"+this.id).innerHTML = " <span style=color:red >OK</span>";
  271 + idsValidos.push(this.id);
  272 + parouQuantas++;
  273 + if(idsValidos.length == ids.length)
  274 + {pararStatus();}
  275 + };
  276 + onde.appendChild(novoel);
  277 +}
  278 +/*
  279 +Function: criaImgStatus
  280 +
  281 +Cria um &iacute;cone que permite parar a apresenta&ccedil;&atilde;o da anima&ccedil;&atilde;o em uma determinada imagem
  282 +
  283 +Parametros:
  284 +
  285 +tempo {string} - data da imagem
  286 +
  287 +id {string} - id da imagem
  288 +*/
  289 +function criaImgStatus(tempo,id){
  290 + var novoel = document.createElement("div");
  291 + novoel.id = "lida"+id;
  292 + novoel.style.width="200px";
  293 + novoel.innerHTML = "Imagem: "+tempo+"...<span style=cursor:pointer;color:blue onclick='pararImagem(\""+id+"\")' id='status"+id+"' >parar</span>";
  294 + ondeContador.appendChild(novoel);
  295 +}
  296 +/*
  297 +Function: pararImagem
  298 +
  299 +Parar a apresenta&ccedil;&atilde;o da anima&ccedil;&atilde;o em uma determinada imagem
  300 +
  301 +Parametro:
  302 +
  303 +id {string} - id da imagem
  304 +*/
  305 +function pararImagem(id){
  306 + if($i(id)){
  307 + $i(id).src = "";
  308 + //onde.removeChild(document.getElementById(id))
  309 + idsValidos.push(id);
  310 + $i("status"+id).innerHTML = $trad(14,i3GEOF.wmstime.dicionario);
  311 + parouQuantas++;
  312 + if(parouQuantas == ids.length)
  313 + {pararStatus();}
  314 + }
  315 + else
  316 + {i3GEO.janela.tempoMsg($trad(15,i3GEOF.wmstime.dicionario));}
  317 +}
  318 +/*
  319 +Function: pararStatus
  320 +
  321 +Para o gr&aacute;fico que mostra o status das imagens
  322 +*/
  323 +function pararStatus(){
  324 + ondeContador.style.display = "none";
  325 + ondeControle.style.display="block";
  326 + ondeMarcaTempo.style.display="block";
  327 + ondeMarcaTempo.style.top = "10px";
  328 + ondeControle.style.top = dh + 50 + "px";
  329 + ondeData.style.top = dh + 30 + "px";
  330 + ondeData.style.width = dw+"px";
  331 + desativaQuadros();
  332 + criaMarcadorTempo();
  333 + //ajustaIds()
  334 + ativaQuadro(1);
  335 +}
  336 +function ajustaIds(){
  337 +
  338 +}
  339 +/*
  340 +Function: criaMarcadorTempo
  341 +
  342 +Cria o gr&aacute;fico que mostra as imagens dispon&iacute;veis. Serve de base para indicar qual imagem est&aacute; sendo mostrada
  343 +*/
  344 +function criaMarcadorTempo(){
  345 + var nmarcas = ids.length;
  346 + distanciaMarcas = parseInt(dw / nmarcas);
  347 + var ins = "";
  348 + var ini = parseInt((distanciaMarcas*i - (distanciaMarcas/2)));
  349 + for(var i=1;i<=nmarcas;i++){
  350 + ins += "<img title='"+$trad(16,i3GEOF.wmstime.dicionario)+"' onclick='adicionaMapa(\""+i+"\")' onmouseover='mostraI(\""+i+"\")' onmouseout='escondeI(\""+i+"\")' style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas*i - (distanciaMarcas/2)))+"px;' src='../../imagens/dot1.gif' id='marcaTempo"+i+"' />";
  351 + }
  352 + ins += "<img style='position:absolute;top:"+(dh - 5)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='../../imagens/dot1red.gif' id='marcaDeTempo' />";
  353 + ins += "<img style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='../../imagens/dot1cinza.gif' id='marcaGranulo' />";
  354 + ngranulo = nmarcas;
  355 + tgranulo = (parseInt((distanciaMarcas*i - (distanciaMarcas/2))) - ini) / 10;
  356 + tempoGranulo = tempoAnima / 10;
  357 + ondeMarcaTempo.innerHTML = ins;
  358 + marcaVermelha = $i("marcaDeTempo");
  359 + imgGranulo = $i("marcaGranulo");
  360 + pararFilme();
  361 + iniciarFilme();
  362 +}
  363 +/*
  364 +Function: mostraI
  365 +
  366 +Mostra uma imagem espec&iacute;fica
  367 +
  368 +Parametro:
  369 +
  370 +obj {dom} - objeto contendo a imagem
  371 +*/
  372 +function mostraI(obj){
  373 + $i(obj).style.display="block";
  374 + ondeData.innerHTML = "YYMMDD: "+idsTempo[obj-1];
  375 + if($i(quadroAtual))
  376 + $i(quadroAtual).style.display = "none";
  377 + else
  378 + $i("1").style.display = "none";
  379 +}
  380 +/*
  381 +Function: escondeI
  382 +
  383 +Esconde uma imagem
  384 +
  385 +Parametro:
  386 +
  387 +obj {dom} - objeto contendo a imagem
  388 +*/
  389 +function escondeI(obj){
  390 + $i(obj).style.display="none";
  391 + ondeData.innerHTML = "";
  392 + if($i(quadroAtual))
  393 + $i(quadroAtual).style.display = "block";
  394 + else
  395 + $i("1").style.display = "block";
  396 +}
  397 +/*
  398 +Function: adicionaMapa
  399 +
  400 +Adiciona uma camada ao mapa baseado na imagem vista na tela
  401 +
  402 +*/
  403 +function adicionaMapa(idMarca){
  404 + //aguarde("block");
  405 + idMarca = parseInt(idMarca,10);
  406 + var serv = wms_configura[idServicoEscolhido];
  407 + var fim = function(retorno){
  408 + //aguarde("none");
  409 + if (retorno.data.erro)
  410 + {i3GEO.janela.tempoMsg(retorno.data.erro);}
  411 + else
  412 + {window.parent.i3GEO.atualiza("");}
  413 + };
  414 + var p = window.parent.i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+window.parent.i3GEO.configura.sid+"&funcao=adicionatemawms";
  415 + p += "&servico="+serv.servico;
  416 + if(serv.styles == "")
  417 + p += "&nome=";
  418 + else
  419 + p += "&nome="+serv.styles;
  420 + p += "&tema="+serv.layers;
  421 + p += "&proj="+serv.srs;
  422 + p += "&formato="+serv.format;
  423 + p += "&tipo=estilo";
  424 + p += "&versao=1.1.1";
  425 + p += "&nomecamada="+serv.titulo+" "+idsTempo[idMarca-1];
  426 + p += "&tiporep=&suportasld=nao";
  427 + p += "&formatosinfo=text/plain,application/vnd.ogc.gml";
  428 + p += "&time="+idsTempo[idMarca-1];
  429 + var cp = new cpaint();
  430 + cp.set_response_type("JSON");
  431 + cp.call(p,"wmstime",fim);
  432 +
  433 +}
  434 +function desativaQuadros(){
  435 + var n = idsValidos.length;
  436 + for(var i=0;i<n;i++){
  437 + $i(idsValidos[i]).style.display = "none";
  438 + }
  439 +}
  440 +function ativaQuadro(i){
  441 + var q = $i(i);
  442 + if(q){
  443 + q.style.position = "relative";
  444 + q.style.display = "block";
  445 + }
  446 + if($i("marcaTempo"+i)){
  447 + $i("marcaTempo"+i).style.display = "block";
  448 + }
  449 + if($i("marcaTempo"+(i))){
  450 + marcaVermelha.style.left = $i("marcaTempo"+(i)).style.left;
  451 + }
  452 +}
  453 +function pausarFilme(){
  454 + emPausa = !emPausa;
  455 + if(emPausa == false){
  456 + anima();
  457 + }
  458 + else{
  459 + imgGranulo.style.display="none";
  460 + pulaGranulo = 11;
  461 + try{
  462 + clearTimeout(ganima);
  463 + }catch(e){}
  464 + }
  465 +}
  466 +function esconderMarcasTempo(){
  467 + var n = idsValidos.length;
  468 + for(var i=0;i<n;i++){
  469 + if($i("marcaTempo"+i)){
  470 + $i("marcaTempo"+i).style.display = "none";
  471 + }
  472 + }
  473 +}
  474 +function pararFilme(){
  475 + emPausa = false;
  476 + imgGranulo.style.left = parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px";
  477 + quadroAtual = 0;
  478 + desativaQuadros();
  479 + ativaQuadro(ids[0]);
  480 + imgGranulo.style.display="none";
  481 + ondeData.innerHTML = "";
  482 + try{
  483 + //clearTimeout(tanima)
  484 + clearTimeout(ganima);
  485 + }catch(e){}
  486 +}
  487 +function iniciarFilme(){
  488 + emPausa = false;
  489 + esconderMarcasTempo();
  490 + imgGranulo.style.display="block";
  491 + //tanima = setTimeout("anima()",tempoAnima)
  492 + //ganima = setTimeout("animacaoGranulo()",tempoGranulo)
  493 + anima();
  494 +}
  495 +function rebobina(){
  496 + esconderMarcasTempo();
  497 + pararFilme();
  498 +}
  499 +function anima(){
  500 + desativaQuadros();
  501 + ativaQuadro(ids[quadroAtual]);
  502 + ondeData.innerHTML = idsTempo[quadroAtual];
  503 + quadroAtual++;
  504 + if(quadroAtual < idsValidos.length){
  505 + //tanima = setTimeout("anima()",tempoAnima)
  506 + pulaGranulo = 0;
  507 + imgGranulo.style.left = $i("marcaTempo"+quadroAtual).style.left;
  508 + ganima = setTimeout("animacaoGranulo()",tempoGranulo);
  509 + }
  510 + else{
  511 + imgGranulo.style.display="none";
  512 + }
  513 +}
  514 +function animacaoGranulo(){
  515 + imgGranulo.style.left = parseInt(imgGranulo.style.left) + tgranulo + "px";
  516 + pulaGranulo++;
  517 + //if(quadroAtual < idsValidos.length)
  518 + if(pulaGranulo <= 10)
  519 + ganima = setTimeout("animacaoGranulo()",tempoGranulo);
  520 + else
  521 + anima();
  522 +}
  523 +function maisrapido(){
  524 + tempoGranulo = tempoGranulo - 10;
  525 +}
  526 +function maislento(){
  527 + tempoGranulo = tempoGranulo + 10;
  528 +}
... ...
ferramentas/wmstimeold/template_mst.html 0 → 100755
... ... @@ -0,0 +1 @@
  1 +<div id='i3GEOwikiLista' style='display: block; background-color: white; text-align: left; padding: 5px;'></div>
0 2 \ No newline at end of file
... ...