Commit 3122380f3653d1eb398564842f0d2520fbb49b3d
1 parent
b7292fed
Exists in
master
and in
7 other branches
Validação dos programas JS de classesjs com o JSLINT
Showing
27 changed files
with
1170 additions
and
1142 deletions
Show diff stats
classesjs/atlas.js
... | ... | @@ -176,7 +176,7 @@ function pegaListaDeAtlas() |
176 | 176 | { |
177 | 177 | texto += "<img src='"+listaAtlas[i].ICONE+"' />"; |
178 | 178 | } |
179 | - texto += "</td>"; | |
179 | + texto += "</td>"; | |
180 | 180 | texto += "<td><div class='titulo' style='cursor:pointer' onclick='abreatlas(\""+listaAtlas[i].ID+"\")' >"; |
181 | 181 | texto += "<input style='cursor:pointer' type='radio' name='atlas' value='"+listaAtlas[i].ID+"'/> "; |
182 | 182 | if(listaAtlas[i].PUBLICADO) | ... | ... |
classesjs/classe_ajuda.js
... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se não, escreva para a |
29 | 29 | Free Software Foundation, Inc., no endereço |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | -if(typeof(i3GEO) == 'undefined'){ | |
32 | +if(typeof(i3GEO) === 'undefined'){ | |
33 | 33 | i3GEO = []; |
34 | 34 | } |
35 | 35 | /* |
... | ... | @@ -150,7 +150,7 @@ i3GEO.ajuda = { |
150 | 150 | abreJanela: function(){ |
151 | 151 | if(typeof(console) !== 'undefined'){console.info("i3GEO.ajuda.abreJanela()");} |
152 | 152 | try { |
153 | - var nx,ny,pos,corpo,texto,janela,largura=262; | |
153 | + var nx,ny,pos,corpo,texto,janela,largura=262; | |
154 | 154 | if(i3GEO.ajuda.ATIVAJANELA === false){return;} |
155 | 155 | |
156 | 156 | if($i("contemFerramentas")){ |
... | ... | @@ -213,18 +213,18 @@ i3GEO.ajuda = { |
213 | 213 | {clearTimeout(i3GEO.ajuda.tempoLetreiro);} |
214 | 214 | catch(e){i3GEO.ajuda.tempoLetreiro = "";} |
215 | 215 | l = $i(i3GEO.ajuda.DIVLETREIRO); |
216 | - if(l.style.display=="none"){return;} | |
216 | + if(l.style.display==="none"){return;} | |
217 | 217 | l.style.cursor="pointer"; |
218 | 218 | if(mensagem === ""){ |
219 | 219 | l.value = ""; |
220 | 220 | return; |
221 | 221 | } |
222 | - if (l.size == 1) | |
222 | + if (l.size === 1) | |
223 | 223 | {l.size = i3GEO.parametros.w / 8;} |
224 | 224 | BMessage = mensagem + " ---Clique para parar--- "; |
225 | 225 | l.onclick = function() |
226 | 226 | {l.style.display = "none";}; |
227 | - if (BMessage != " ---Clique para parar--- "){ | |
227 | + if (BMessage !== " ---Clique para parar--- "){ | |
228 | 228 | BQuantas = 0; |
229 | 229 | BSize = l.size; |
230 | 230 | BPos=BSize; |
... | ... | @@ -255,7 +255,7 @@ i3GEO.ajuda = { |
255 | 255 | fechaJanela: function(){ |
256 | 256 | if(typeof(console) !== 'undefined'){console.info("i3GEO.ajuda.fechaJanela()");} |
257 | 257 | i3GEO.ajuda.desativaCookie(); |
258 | - i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body) | |
258 | + i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body); | |
259 | 259 | }, |
260 | 260 | /* |
261 | 261 | Function: mostraJanela |
... | ... | @@ -271,7 +271,8 @@ i3GEO.ajuda = { |
271 | 271 | var j = $i(i3GEO.ajuda.DIVAJUDA), |
272 | 272 | k = $i("janelaMenTexto"), |
273 | 273 | jm = $i("i3geo_janelaMensagens"), |
274 | - h = parseInt(YAHOO.util.Dom.getStyle(jm,"height"),10); | |
274 | + h = parseInt(YAHOO.util.Dom.getStyle(jm,"height"),10), | |
275 | + temp; | |
275 | 276 | if(j){ |
276 | 277 | j.innerHTML = texto === "" ? "-" : texto; |
277 | 278 | } |
... | ... | @@ -279,7 +280,7 @@ i3GEO.ajuda = { |
279 | 280 | YAHOO.util.Dom.setY("i3geo_janelaMensagens",YAHOO.util.Dom.getY(jm) + h); |
280 | 281 | if(k){k.innerHTML = texto;} |
281 | 282 | if(i3GEO.ajuda.TRANSICAOSUAVE){ |
282 | - texto !== "" ? YAHOO.util.Dom.setStyle(jm,"opacity","1") : YAHOO.util.Dom.setStyle(jm,"opacity",i3GEO.ajuda.OPACIDADE / 100); | |
283 | + temp = texto !== "" ? YAHOO.util.Dom.setStyle(jm,"opacity","1") : YAHOO.util.Dom.setStyle(jm,"opacity",(i3GEO.ajuda.OPACIDADE / 100)); | |
283 | 284 | } |
284 | 285 | h = parseInt(YAHOO.util.Dom.getStyle(jm,"height"),10); |
285 | 286 | YAHOO.util.Dom.setY(jm,YAHOO.util.Dom.getY(jm) - h); |
... | ... | @@ -295,7 +296,7 @@ i3GEO.ajuda = { |
295 | 296 | */ |
296 | 297 | mostraLetreiro: function(){ |
297 | 298 | if(typeof(console) !== 'undefined'){console.info("i3GEO.ajuda.mostraLetreiro()");} |
298 | - for (count=0; count<BPos; count++) | |
299 | + for (count=0; count<BPos; count += 1) | |
299 | 300 | {BSpaces+= " ";} |
300 | 301 | if (BPos < 1){ |
301 | 302 | $i(i3GEO.ajuda.DIVLETREIRO).value = BMessage.substring(Math.abs(BPos), BMessage.length); | ... | ... |
classesjs/classe_analise.js
... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se não, escreva para a |
29 | 29 | Free Software Foundation, Inc., no endereço |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | -if(typeof(i3GEO) == 'undefined'){ | |
32 | +if(typeof(i3GEO) === 'undefined'){ | |
33 | 33 | i3GEO = []; |
34 | 34 | } |
35 | 35 | /* |
... | ... | @@ -69,7 +69,7 @@ i3GEO.analise = { |
69 | 69 | if(typeof(console) !== 'undefined'){console.info("i3GEO.analise.dialogo.linhaDoTempo()");} |
70 | 70 | i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' > </a>"); |
71 | 71 | atualizaLinhaDoTempo = function(){ |
72 | - var doc; | |
72 | + var doc,temp; | |
73 | 73 | try{ |
74 | 74 | if (navn){ |
75 | 75 | if ($i("wdocai")) |
... | ... | @@ -79,13 +79,13 @@ i3GEO.analise = { |
79 | 79 | if(document.frames("wdocai")) |
80 | 80 | {doc = document.frames("wdocai").document;} |
81 | 81 | } |
82 | - doc.getElementById("tl") ? window.parent.wdocai.carregaDados() : i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()"); | |
82 | + temp = doc.getElementById("tl") ? window.parent.wdocai.carregaDados() : i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()"); | |
83 | 83 | } |
84 | 84 | catch(e){ |
85 | 85 | i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()"); |
86 | 86 | if(typeof(console) !== 'undefined'){console.error(e);} |
87 | 87 | } |
88 | - }; | |
88 | + }; | |
89 | 89 | if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()") < 0) |
90 | 90 | {i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()");} |
91 | 91 | }, |
... | ... | @@ -135,7 +135,7 @@ i3GEO.analise = { |
135 | 135 | Abre a janela de diálogo da ferramenta pontosdistri |
136 | 136 | */ |
137 | 137 | pontosdistri: function(){ |
138 | - i3GEO.parametros.r == "nao" ? alert("Opção não disponível") : i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri"); | |
138 | + var temp = i3GEO.parametros.r === "nao" ? alert("Opção não disponível") : i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri"); | |
139 | 139 | }, |
140 | 140 | /* |
141 | 141 | Function: pontoempoligono |
... | ... | @@ -235,7 +235,7 @@ i3GEO.analise = { |
235 | 235 | linhas: [] |
236 | 236 | }; |
237 | 237 | i3GEO.analise.medeDistancia.criaJanela(); |
238 | - if (g_tipoacao != "mede"){ | |
238 | + if (g_tipoacao !== "mede"){ | |
239 | 239 | if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()") < 0) |
240 | 240 | {i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()");} |
241 | 241 | if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()") < 0) |
... | ... | @@ -243,7 +243,7 @@ i3GEO.analise = { |
243 | 243 | if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()") < 0) |
244 | 244 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()");} |
245 | 245 | $i("mostradistancia").style.display="block"; |
246 | - if(i3GEO.Interface.ATUAL != "googleearth"){ | |
246 | + if(i3GEO.Interface.ATUAL !== "googleearth"){ | |
247 | 247 | i3GEO.desenho.criaContainerRichdraw(); |
248 | 248 | i3GEO.desenho.richdraw.lineColor = "black"; |
249 | 249 | i3GEO.desenho.richdraw.lineWidth = "1px"; |
... | ... | @@ -251,7 +251,7 @@ i3GEO.analise = { |
251 | 251 | g_tipoacao = "mede"; |
252 | 252 | } |
253 | 253 | else{ |
254 | - if(i3GEO.Interface.ATUAL != "googleearth") | |
254 | + if(i3GEO.Interface.ATUAL !== "googleearth") | |
255 | 255 | {i3GEO.desenho.richdraw.fecha();} |
256 | 256 | YAHOO.util.Dom.setStyle("mostradistancia","display","none"); |
257 | 257 | YAHOO.util.Dom.setStyle("pontosins","display","none"); |
... | ... | @@ -263,7 +263,7 @@ i3GEO.analise = { |
263 | 263 | Cria a janela para mostrar os resultados da medição |
264 | 264 | */ |
265 | 265 | criaJanela: function(){ |
266 | - var novoel,ins,imagemxy; | |
266 | + var novoel,ins,imagemxy,temp; | |
267 | 267 | if (!$i("mostradistancia")){ |
268 | 268 | novoel = document.createElement("div"); |
269 | 269 | novoel.id = "mostradistancia"; |
... | ... | @@ -297,7 +297,7 @@ i3GEO.analise = { |
297 | 297 | //botao que abre a ferramenta de cálculo de perfis. |
298 | 298 | //pontosdistobj contém as coordenadas dos pontos |
299 | 299 | // |
300 | - new YAHOO.widget.Button( | |
300 | + temp = new YAHOO.widget.Button( | |
301 | 301 | "i3GEObotaoPerfil", |
302 | 302 | {onclick:{fn: function(){ |
303 | 303 | var js = i3GEO.configura.locaplic+"/ferramentas/perfil/index.js.php"; |
... | ... | @@ -311,7 +311,7 @@ i3GEO.analise = { |
311 | 311 | Fecha a janela e os elementos gráficos criados para a ferramenta de medição |
312 | 312 | */ |
313 | 313 | fechaJanela: function(){ |
314 | - i3GEO.Interface.ATUAL !== "googleearth" ? i3GEO.desenho.richdraw.fecha() : i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp"); | |
314 | + var temp = i3GEO.Interface.ATUAL !== "googleearth" ? i3GEO.desenho.richdraw.fecha() : i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp"); | |
315 | 315 | i3GEO.util.removeChild("pontosins"); |
316 | 316 | i3GEO.util.removeChild("mostradistancia_c"); |
317 | 317 | if($i("divGeometriasTemp")) |
... | ... | @@ -329,7 +329,7 @@ i3GEO.analise = { |
329 | 329 | */ |
330 | 330 | clique: function(){ |
331 | 331 | var n,d,decimal,dd,dV; |
332 | - if (g_tipoacao == "mede"){ | |
332 | + if (g_tipoacao === "mede"){ | |
333 | 333 | n = pontosdistobj.xpt.length; |
334 | 334 | pontosdistobj.xpt[n] = objposicaocursor.ddx; |
335 | 335 | pontosdistobj.ypt[n] = objposicaocursor.ddy; |
... | ... | @@ -391,9 +391,9 @@ i3GEO.analise = { |
391 | 391 | Para o cálculo de distâncias e ativa o botão "pan" |
392 | 392 | */ |
393 | 393 | paraCalculo: function(){ |
394 | - g_tipoacao == ""; | |
395 | - var botaoPan = $i("pan"); | |
396 | - botaoPan ? botaoPan.onclick.call() : i3GEO.barraDeBotoes.ativaBotoes(); | |
394 | + var temp,botaoPan = $i("pan"); | |
395 | + g_tipoacao = ""; | |
396 | + temp = botaoPan ? botaoPan.onclick.call() : i3GEO.barraDeBotoes.ativaBotoes(); | |
397 | 397 | }, |
398 | 398 | /* |
399 | 399 | Function: movimento |
... | ... | @@ -402,7 +402,7 @@ i3GEO.analise = { |
402 | 402 | */ |
403 | 403 | movimento: function(){ |
404 | 404 | var n,d,r,decimal,da,mostra,texto; |
405 | - if (g_tipoacao == "mede"){ | |
405 | + if (g_tipoacao === "mede"){ | |
406 | 406 | YAHOO.util.Dom.setStyle("mostradistancia","display","block"); |
407 | 407 | n = pontosdistobj.xpt.length; |
408 | 408 | try{ |
... | ... | @@ -430,7 +430,7 @@ i3GEO.analise = { |
430 | 430 | texto += "<br>Método cálculo de distâncias: "+i3GEO.calculo.metododistancia; |
431 | 431 | mostra.innerHTML = texto; |
432 | 432 | } |
433 | - if(i3GEO.Interface.ATUAL != "googleearth") | |
433 | + if(i3GEO.Interface.ATUAL !== "googleearth") | |
434 | 434 | {i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n);} |
435 | 435 | } |
436 | 436 | } |
... | ... | @@ -466,7 +466,7 @@ i3GEO.analise = { |
466 | 466 | g_tipoacao = "area"; |
467 | 467 | i3GEO.desenho.criaContainerRichdraw(); |
468 | 468 | i3GEO.desenho.richdraw.lineColor = "green"; |
469 | - i3GEO.desenho.richdraw.lineWidth = "2px"; | |
469 | + i3GEO.desenho.richdraw.lineWidth = "2px"; | |
470 | 470 | }; |
471 | 471 | pontosdistobj = { |
472 | 472 | xpt: [], |
... | ... | @@ -479,7 +479,7 @@ i3GEO.analise = { |
479 | 479 | linhas: [] |
480 | 480 | }; |
481 | 481 | i3GEO.analise.medeArea.criaJanela(); |
482 | - if (g_tipoacao != "area"){ | |
482 | + if (g_tipoacao !== "area"){ | |
483 | 483 | $i("mostraarea_calculo").innerHTML = ""; |
484 | 484 | if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()") < 0) |
485 | 485 | {i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()");} |
... | ... | @@ -492,10 +492,10 @@ i3GEO.analise = { |
492 | 492 | //é necessário pegar a resolução de cada pixel do servidor |
493 | 493 | //via mapscript |
494 | 494 | // |
495 | - if(i3GEO.Interface.ATUAL == "padrao"){ | |
495 | + if(i3GEO.Interface.ATUAL === "padrao"){ | |
496 | 496 | temp = function(retorno){ |
497 | 497 | i3GEO.janela.fechaAguarde("i3GEO.atualiza"); |
498 | - retorno.data < 0 ? alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema.") : montacontainer(); | |
498 | + var temp = retorno.data < 0 ? alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema.") : montacontainer(); | |
499 | 499 | }; |
500 | 500 | i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1")); |
501 | 501 | i3GEO.php.areaPixel(temp,i3GEO.parametros.pixelsize); |
... | ... | @@ -504,7 +504,7 @@ i3GEO.analise = { |
504 | 504 | //a API do Openlayers e GoogleMaps tem uma função própria de obtenção da resolução de cada pixel |
505 | 505 | //essa função é embutida em i3GEO.calculo.tela2dd |
506 | 506 | // |
507 | - if(i3GEO.Interface.ATUAL == "googlemaps" || i3GEO.Interface.ATUAL == "openlayers"){ | |
507 | + if(i3GEO.Interface.ATUAL === "googlemaps" || i3GEO.Interface.ATUAL === "openlayers"){ | |
508 | 508 | x = parseInt(i3GEO.parametros.w / 2,10); |
509 | 509 | y = parseInt(i3GEO.parametros.h / 2,10); |
510 | 510 | ll1 = i3GEO.calculo.tela2dd(x,y,"",""); |
... | ... | @@ -512,7 +512,7 @@ i3GEO.analise = { |
512 | 512 | d = i3GEO.calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]); |
513 | 513 | d = d * 1000; |
514 | 514 | g_areapixel = d * d; |
515 | - g_areapixel < 0 ? alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema.") : montacontainer(); | |
515 | + temp = g_areapixel < 0 ? alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema.") : montacontainer(); | |
516 | 516 | } |
517 | 517 | } |
518 | 518 | else{i3GEO.desenho.richdraw.fecha();} |
... | ... | @@ -564,7 +564,7 @@ i3GEO.analise = { |
564 | 564 | */ |
565 | 565 | clique: function(){ |
566 | 566 | var n,m; |
567 | - if (g_tipoacao == "area"){ | |
567 | + if (g_tipoacao === "area"){ | |
568 | 568 | n = pontosdistobj.xpt.length; |
569 | 569 | pontosdistobj.xpt[n] = objposicaocursor.ddx; |
570 | 570 | pontosdistobj.ypt[n] = objposicaocursor.ddy; |
... | ... | @@ -591,8 +591,8 @@ i3GEO.analise = { |
591 | 591 | if (navn) |
592 | 592 | {pontosdistobj.linhas[n] = i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode, i3GEO.desenho.richdraw.fillColor, i3GEO.desenho.richdraw.lineColor, i3GEO.desenho.richdraw.lineWidth, pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1);} |
593 | 593 | } |
594 | - catch(e){ | |
595 | - if(typeof(console) !== 'undefined'){console.error(e);} | |
594 | + catch(men){ | |
595 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
596 | 596 | } |
597 | 597 | |
598 | 598 | m = i3GEO.calculo.area(pontosdistobj,g_areapixel); |
... | ... | @@ -609,9 +609,10 @@ i3GEO.analise = { |
609 | 609 | Para o cálculo de área e ativa o botão "pan" |
610 | 610 | */ |
611 | 611 | paraCalculo: function(){ |
612 | - g_tipoacao == ""; | |
613 | - var botaoPan = $i("pan"); | |
614 | - botaoPan ? botaoPan.onclick.call() : i3GEO.barraDeBotoes.ativaBotoes(); | |
612 | + var botaoPan = $i("pan"), | |
613 | + temp; | |
614 | + g_tipoacao = ""; | |
615 | + temp = botaoPan ? botaoPan.onclick.call() : i3GEO.barraDeBotoes.ativaBotoes(); | |
615 | 616 | }, |
616 | 617 | /* |
617 | 618 | Function: movimento |
... | ... | @@ -620,7 +621,7 @@ i3GEO.analise = { |
620 | 621 | */ |
621 | 622 | movimento: function(){ |
622 | 623 | var n,d,decimal,da,m; |
623 | - if (g_tipoacao == "area"){ | |
624 | + if (g_tipoacao === "area"){ | |
624 | 625 | n = pontosdistobj.xpt.length; |
625 | 626 | if (n > 0){ |
626 | 627 | i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1); | ... | ... |
classesjs/classe_arvoredecamadas.js
... | ... | @@ -354,7 +354,7 @@ i3GEO.arvoreDeCamadas = { |
354 | 354 | if(YAHOO.lang.isUndefined(temas)) |
355 | 355 | {return;} |
356 | 356 | this.atualiza(temas); |
357 | - if(this.finaliza != ""){ | |
357 | + if(this.finaliza !== ""){ | |
358 | 358 | eval(this.finaliza); |
359 | 359 | } |
360 | 360 | }, |
... | ... | @@ -401,13 +401,14 @@ i3GEO.arvoreDeCamadas = { |
401 | 401 | {currentIconMode = newVal;} |
402 | 402 | buildTree(); |
403 | 403 | } |
404 | - function buildTree(){ | |
404 | + function buildTree(){ | |
405 | 405 | i3GEO.arvoreDeCamadas.ARVORE = new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML); |
406 | 406 | root = i3GEO.arvoreDeCamadas.ARVORE.getRoot(); |
407 | 407 | //tempNode = new YAHOO.widget.TextNode({isLeaf:false,enableHighlight:false}, root, false); |
408 | - } | |
409 | - buildTree(); | |
410 | - }(); | |
408 | + } | |
409 | + buildTree(); | |
410 | + }; | |
411 | + YAHOO.example.treeExample(); | |
411 | 412 | root = i3GEO.arvoreDeCamadas.ARVORE.getRoot(); |
412 | 413 | titulo = "<table><tr><td><b>"+$trad("a7")+"</b></td><td>"; |
413 | 414 | if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) |
... | ... | @@ -429,7 +430,7 @@ i3GEO.arvoreDeCamadas = { |
429 | 430 | // |
430 | 431 | if (i3GEO.configura.grupoLayers === ""){ |
431 | 432 | c = temas.length; |
432 | - for (i=0, j=c; i<j; i++){ | |
433 | + for (i=0, j=c; i<j; i += 1){ | |
433 | 434 | ltema = temas[i]; |
434 | 435 | try{ |
435 | 436 | if(ltema.escondido !== "sim"){ |
... | ... | @@ -454,30 +455,30 @@ i3GEO.arvoreDeCamadas = { |
454 | 455 | nk = temas.length; |
455 | 456 | c = i3GEO.configura.grupoLayers.length; |
456 | 457 | //grupos |
457 | - for(i=0;i<c; i++){ | |
458 | + for(i=0;i<c; i += 1){ | |
458 | 459 | temp = ""; |
459 | - if(i3GEO.configura.grupoLayers[i].icone && i3GEO.configura.grupoLayers[i].icone==true){ | |
460 | + if(i3GEO.configura.grupoLayers[i].icone && i3GEO.configura.grupoLayers[i].icone === true){ | |
460 | 461 | temp += "<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "; |
461 | 462 | } |
462 | 463 | temp += "<span style="+estilo+";vertical-align:top ><b>"+i3GEO.configura.grupoLayers[i].nome+"</b></span></p>"; |
463 | 464 | d = i3GEO.arvoreDeCamadas.EXPANDIDA; |
464 | - if(i3GEO.configura.grupoLayers[i].expandido && i3GEO.configura.grupoLayers[i].expandido==true) | |
465 | + if(i3GEO.configura.grupoLayers[i].expandido && i3GEO.configura.grupoLayers[i].expandido === true) | |
465 | 466 | {d = true;} |
466 | 467 | grupoNode = new YAHOO.widget.HTMLNode({enableHighlight:false,html:temp,expanded:d}, tempNode); |
467 | 468 | n = i3GEO.configura.grupoLayers[i].layers.length; |
468 | 469 | //layers de um grupo |
469 | - for(j=0;j<n; j++){ | |
470 | + for(j=0;j<n; j += 1){ | |
470 | 471 | //busca na lista de temas |
471 | - for(k=0;k<nk; k++){ | |
472 | + for(k=0;k<nk; k += 1){ | |
472 | 473 | ltema = temas[k]; |
473 | - if(ltema.name === i3GEO.configura.grupoLayers[i].layers[j] && ltema.escondido == "nao"){ | |
474 | + if(ltema.name === i3GEO.configura.grupoLayers[i].layers[j] && ltema.escondido === "nao"){ | |
474 | 475 | d = {enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"}; |
475 | - if(i3GEO.configura.grupoLayers[i].dinamico && i3GEO.configura.grupoLayers[i].dinamico==true) | |
476 | + if(i3GEO.configura.grupoLayers[i].dinamico && i3GEO.configura.grupoLayers[i].dinamico === true) | |
476 | 477 | {temaNode = new YAHOO.widget.HTMLNode(d, grupoNode);} |
477 | 478 | else |
478 | 479 | {temaNode = new YAHOO.widget.HTMLNode(d, tempNode);} |
479 | - temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes, currentIconMode); | |
480 | - incluidos.push(ltema.name); | |
480 | + temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes, currentIconMode); | |
481 | + incluidos.push(ltema.name); | |
481 | 482 | } |
482 | 483 | } |
483 | 484 | } |
... | ... | @@ -485,11 +486,11 @@ i3GEO.arvoreDeCamadas = { |
485 | 486 | //inclui os temas não agrupados |
486 | 487 | grupoNode = new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"}, tempNode); |
487 | 488 | c = incluidos.length; |
488 | - for(k=0;k<nk; k++){ | |
489 | + for(k=0;k<nk; k += 1){ | |
489 | 490 | ltema = temas[k]; |
490 | 491 | n = false; |
491 | - for(j=0;j<c; j++){ | |
492 | - if(incluidos[j] === ltema.name || ltema.escondido == "sim") | |
492 | + for(j=0;j<c; j += 1){ | |
493 | + if(incluidos[j] === ltema.name || ltema.escondido === "sim") | |
493 | 494 | {n = true;} |
494 | 495 | } |
495 | 496 | if (n === false){ |
... | ... | @@ -499,9 +500,9 @@ i3GEO.arvoreDeCamadas = { |
499 | 500 | } |
500 | 501 | } |
501 | 502 | document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left"; |
502 | - i3GEO.arvoreDeCamadas.ARVORE.draw(); | |
503 | - if(i3GEO.arvoreDeCamadas.ARRASTARORDEM === true || i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) | |
504 | - {this.ativaDragDrop();} | |
503 | + i3GEO.arvoreDeCamadas.ARVORE.draw(); | |
504 | + if(i3GEO.arvoreDeCamadas.ARRASTARORDEM === true || i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) | |
505 | + {this.ativaDragDrop();} | |
505 | 506 | // |
506 | 507 | //verifica se a ferramenta identifica está ativa para atualizar a lista de temas |
507 | 508 | // |
... | ... | @@ -516,7 +517,7 @@ i3GEO.arvoreDeCamadas = { |
516 | 517 | } |
517 | 518 | i3GEO.mapa.ativaTema(i3GEO.temaAtivo); |
518 | 519 | i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas(); |
519 | - if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS == true && i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()") < 0) | |
520 | + if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS === true && i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()") < 0) | |
520 | 521 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()");} |
521 | 522 | }, |
522 | 523 | /* |
... | ... | @@ -534,15 +535,15 @@ i3GEO.arvoreDeCamadas = { |
534 | 535 | var c,n,i,aplica = false; |
535 | 536 | lista = lista.split(","); |
536 | 537 | n = lista.length; |
537 | - for(i=0;i<n;i++){ | |
538 | + for(i=0;i<n;i+=1){ | |
538 | 539 | c = i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]); |
539 | - if(c.checked != status) | |
540 | + if(c.checked !== status) | |
540 | 541 | {aplica = true;} |
541 | 542 | c.checked = status; |
542 | - if(aplica == true && i3GEO.Interface.ATUAL !== "padrao") | |
543 | + if(aplica === true && i3GEO.Interface.ATUAL !== "padrao") | |
543 | 544 | {c.onclick.call();} |
544 | 545 | } |
545 | - if(aplica == true && i3GEO.Interface.ATUAL == "padrao") | |
546 | + if(aplica === true && i3GEO.Interface.ATUAL === "padrao") | |
546 | 547 | {i3GEO.arvoreDeCamadas.aplicaTemas();} |
547 | 548 | }, |
548 | 549 | /* |
... | ... | @@ -558,87 +559,87 @@ i3GEO.arvoreDeCamadas = { |
558 | 559 | DDM = YAHOO.util.DragDropMgr; |
559 | 560 | YAHOO.example.DDList = ""; |
560 | 561 | YAHOO.example.DDApp = { |
561 | - init: function() | |
562 | - { | |
563 | - var ddtarget,i,ltema,ddlist; | |
564 | - if($i("i3geo_lixeira") && i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) | |
565 | - {ddtarget = new YAHOO.util.DDTarget("i3geo_lixeira");} | |
566 | - i = i3GEO.arvoreDeCamadas.CAMADAS.length-1; | |
567 | - if (i3GEO.arvoreDeCamadas.CAMADAS.length-1 >= 0){ | |
568 | - do{ | |
569 | - ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; | |
570 | - if($i("arrastar_"+ltema.name)) | |
571 | - {ddlist = new YAHOO.example.DDList("arrastar_"+ltema.name);} | |
572 | - } | |
573 | - while(i--); | |
574 | - } | |
575 | - } | |
562 | + init: function() | |
563 | + { | |
564 | + var ddtarget,i,ltema,ddlist; | |
565 | + if($i("i3geo_lixeira") && i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true) | |
566 | + {ddtarget = new YAHOO.util.DDTarget("i3geo_lixeira");} | |
567 | + i = i3GEO.arvoreDeCamadas.CAMADAS.length-1; | |
568 | + if (i3GEO.arvoreDeCamadas.CAMADAS.length-1 >= 0){ | |
569 | + do{ | |
570 | + ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; | |
571 | + if($i("arrastar_"+ltema.name)) | |
572 | + {ddlist = new YAHOO.example.DDList("arrastar_"+ltema.name);} | |
573 | + } | |
574 | + while(i--); | |
575 | + } | |
576 | + } | |
576 | 577 | }; |
577 | 578 | YAHOO.example.DDList = function(id, sGroup, config) { |
578 | - YAHOO.example.DDList.superclass.constructor.call(this, id, sGroup, config); | |
579 | - this.logger = this.logger || YAHOO; | |
580 | - Dom.setStyle(this.getDragEl(), "opacity", 0.67); // The proxy is slightly transparent | |
581 | - this.goingUp = false; | |
582 | - this.lastY = 0; | |
579 | + YAHOO.example.DDList.superclass.constructor.call(this, id, sGroup, config); | |
580 | + this.logger = this.logger || YAHOO; | |
581 | + Dom.setStyle(this.getDragEl(), "opacity", 0.67); // The proxy is slightly transparent | |
582 | + this.goingUp = false; | |
583 | + this.lastY = 0; | |
583 | 584 | }; |
584 | 585 | YAHOO.extend( |
585 | 586 | YAHOO.example.DDList, YAHOO.util.DDProxy, { |
586 | - startDrag: function(x, y){ | |
587 | - var dragEl,clickEl; | |
588 | - this.logger.log(this.id + " startDrag"); | |
589 | - // make the proxy look like the source element | |
590 | - dragEl = this.getDragEl(); | |
591 | - clickEl = this.getEl(); | |
592 | - Dom.setStyle(clickEl, "visibility", "hidden"); | |
593 | - dragEl.innerHTML = clickEl.innerHTML; | |
594 | - Dom.setStyle(dragEl, "color", Dom.getStyle(clickEl, "color")); | |
595 | - Dom.setStyle(dragEl, "backgroundColor", Dom.getStyle(clickEl, "backgroundColor")); | |
596 | - Dom.setStyle(dragEl, "border", "4px solid gray"); | |
597 | - Dom.setStyle(dragEl, "z-index", "5000"); | |
598 | - }, | |
599 | - endDrag: function(e){ | |
600 | - var srcEl,proxy,a,thisid,proxyid; | |
601 | - srcEl = this.getEl(); | |
602 | - proxy = this.getDragEl(); | |
603 | - // Show the proxy element and animate it to the src element's location | |
604 | - Dom.setStyle(proxy, "visibility", ""); | |
605 | - a = new YAHOO.util.Motion( | |
606 | - proxy,{ | |
607 | - points: | |
608 | - {to: Dom.getXY(srcEl)} | |
609 | - }, | |
610 | - 0.2, | |
611 | - YAHOO.util.Easing.easeOut | |
612 | - ); | |
613 | - proxyid = proxy.id; | |
614 | - thisid = this.id; | |
615 | - // Hide the proxy and show the source element when finished with the animation | |
616 | - a.onComplete.subscribe( | |
617 | - function(){ | |
618 | - Dom.setStyle(proxyid, "visibility", "hidden"); | |
619 | - Dom.setStyle(thisid, "visibility", ""); | |
620 | - } | |
621 | - ); | |
622 | - a.animate(); | |
587 | + startDrag: function(x, y){ | |
588 | + var dragEl,clickEl; | |
589 | + this.logger.log(this.id + " startDrag"); | |
590 | + // make the proxy look like the source element | |
591 | + dragEl = this.getDragEl(); | |
592 | + clickEl = this.getEl(); | |
593 | + Dom.setStyle(clickEl, "visibility", "hidden"); | |
594 | + dragEl.innerHTML = clickEl.innerHTML; | |
595 | + Dom.setStyle(dragEl, "color", Dom.getStyle(clickEl, "color")); | |
596 | + Dom.setStyle(dragEl, "backgroundColor", Dom.getStyle(clickEl, "backgroundColor")); | |
597 | + Dom.setStyle(dragEl, "border", "4px solid gray"); | |
598 | + Dom.setStyle(dragEl, "z-index", "5000"); | |
599 | + }, | |
600 | + endDrag: function(e){ | |
601 | + var srcEl,proxy,a,thisid,proxyid; | |
602 | + srcEl = this.getEl(); | |
603 | + proxy = this.getDragEl(); | |
604 | + // Show the proxy element and animate it to the src element's location | |
605 | + Dom.setStyle(proxy, "visibility", ""); | |
606 | + a = new YAHOO.util.Motion( | |
607 | + proxy,{ | |
608 | + points: | |
609 | + {to: Dom.getXY(srcEl)} | |
610 | + }, | |
611 | + 0.2, | |
612 | + YAHOO.util.Easing.easeOut | |
613 | + ); | |
614 | + proxyid = proxy.id; | |
615 | + thisid = this.id; | |
616 | + // Hide the proxy and show the source element when finished with the animation | |
617 | + a.onComplete.subscribe( | |
618 | + function(){ | |
619 | + Dom.setStyle(proxyid, "visibility", "hidden"); | |
620 | + Dom.setStyle(thisid, "visibility", ""); | |
621 | + } | |
622 | + ); | |
623 | + a.animate(); | |
623 | 624 | YAHOO.util.Dom.setStyle('i3geo_lixeira', 'border', '0px solid blue'); |
624 | - }, | |
625 | - onDragDrop: function(e, id){ | |
626 | - var pt,region,tema,destEl,els,lista,noid,temp; | |
627 | - if (DDM.interactionInfo.drop.length === 1){ | |
628 | - pt = DDM.interactionInfo.point; | |
629 | - region = DDM.interactionInfo.sourceRegion; | |
630 | - if (!region.intersect(pt)){ | |
631 | - DDM.refreshCache(); | |
632 | - //exclui tema | |
633 | - if(DDM.getDDById(id).id === "i3geo_lixeira"){ | |
634 | - if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true){ | |
635 | - tema = (this.getEl()).id.split("arrastar_")[1]; | |
625 | + }, | |
626 | + onDragDrop: function(e, id){ | |
627 | + var pt,region,tema,destEl,els,lista,noid,temp; | |
628 | + if (DDM.interactionInfo.drop.length === 1){ | |
629 | + pt = DDM.interactionInfo.point; | |
630 | + region = DDM.interactionInfo.sourceRegion; | |
631 | + if (!region.intersect(pt)){ | |
632 | + DDM.refreshCache(); | |
633 | + //exclui tema | |
634 | + if(DDM.getDDById(id).id === "i3geo_lixeira"){ | |
635 | + if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true){ | |
636 | + tema = (this.getEl()).id.split("arrastar_")[1]; | |
636 | 637 | i3GEO.tema.exclui(tema); |
637 | 638 | /* |
638 | 639 | i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")); |
639 | - tema = (this.getEl()).id.split("arrastar_")[1]; | |
640 | + tema = (this.getEl()).id.split("arrastar_")[1]; | |
640 | 641 | i3GEO.contadorAtualiza++; |
641 | - i3GEO.php.excluitema(i3GEO.atualiza,tema); | |
642 | + i3GEO.php.excluitema(i3GEO.atualiza,tema); | |
642 | 643 | i3GEO.mapa.ativaTema(""); |
643 | 644 | */ |
644 | 645 | } |
... | ... | @@ -646,47 +647,47 @@ i3GEO.arvoreDeCamadas = { |
646 | 647 | //muda ordem de desenho do tema |
647 | 648 | else{ |
648 | 649 | if(i3GEO.arvoreDeCamadas.ARRASTARORDEM === true){ |
649 | - i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1")); | |
650 | - destEl = Dom.get(id); | |
651 | - noid = id.split("arrastar_")[1]; | |
652 | - destEl.appendChild(this.getEl()); | |
653 | - els = i3GEO.arvoreDeCamadas.listaLigadosDesligados(); | |
654 | - lista = els[2].join(","); | |
655 | - //i3GEO.contadorAtualiza++; | |
650 | + i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1")); | |
651 | + destEl = Dom.get(id); | |
652 | + noid = id.split("arrastar_")[1]; | |
653 | + destEl.appendChild(this.getEl()); | |
654 | + els = i3GEO.arvoreDeCamadas.listaLigadosDesligados(); | |
655 | + lista = els[2].join(","); | |
656 | + //i3GEO.contadorAtualiza++; | |
656 | 657 | temp = function(retorno){ |
657 | 658 | i3GEO.atualiza(retorno); |
658 | 659 | if(i3GEO.Interface.ATUAL === "openlayers") |
659 | 660 | {i3GEO.Interface.openlayers.ordenaLayers();} |
660 | 661 | }; |
661 | - i3GEO.php.reordenatemas(temp,lista); | |
662 | - } | |
662 | + i3GEO.php.reordenatemas(temp,lista); | |
663 | + } | |
663 | 664 | } |
664 | - } | |
665 | - } | |
666 | - }, | |
667 | - onDrag: function(e){ | |
668 | - // Keep track of the direction of the drag for use during onDragOver | |
669 | - var y; | |
670 | - y = Event.getPageY(e); | |
671 | - if (y < this.lastY) | |
672 | - {this.goingUp = true;} | |
673 | - else | |
674 | - if (y > this.lastY) | |
675 | - {this.goingUp = false;} | |
676 | - this.lastY = y; | |
677 | - }, | |
678 | - onDragOver: function(e, id){ | |
679 | - var srcEl,destEl; | |
680 | - srcEl = this.getEl(); | |
681 | - destEl = Dom.get(id); | |
682 | - // We are only concerned with list items, we ignore the dragover | |
683 | - // notifications for the list. | |
684 | - if ($i("i3geo_lixeira") && id === "i3geo_lixeira") | |
685 | - {$i("i3geo_lixeira").style.border = "1px solid red";} | |
686 | - else{destEl.style.textDecoration="underline";} | |
687 | - }, | |
688 | - onDragOut: function(e, id) | |
689 | - {$i(id).style.textDecoration="none";} | |
665 | + } | |
666 | + } | |
667 | + }, | |
668 | + onDrag: function(e){ | |
669 | + // Keep track of the direction of the drag for use during onDragOver | |
670 | + var y; | |
671 | + y = Event.getPageY(e); | |
672 | + if (y < this.lastY) | |
673 | + {this.goingUp = true;} | |
674 | + else | |
675 | + if (y > this.lastY) | |
676 | + {this.goingUp = false;} | |
677 | + this.lastY = y; | |
678 | + }, | |
679 | + onDragOver: function(e, id){ | |
680 | + var srcEl,destEl; | |
681 | + srcEl = this.getEl(); | |
682 | + destEl = Dom.get(id); | |
683 | + // We are only concerned with list items, we ignore the dragover | |
684 | + // notifications for the list. | |
685 | + if ($i("i3geo_lixeira") && id === "i3geo_lixeira") | |
686 | + {$i("i3geo_lixeira").style.border = "1px solid red";} | |
687 | + else{destEl.style.textDecoration="underline";} | |
688 | + }, | |
689 | + onDragOut: function(e, id) | |
690 | + {$i(id).style.textDecoration="none";} | |
690 | 691 | } |
691 | 692 | ); |
692 | 693 | Event.onDOMReady(YAHOO.example.DDApp.init, YAHOO.example.DDApp, true); |
... | ... | @@ -715,15 +716,15 @@ i3GEO.arvoreDeCamadas = { |
715 | 716 | farol = "maisamarelo.png"; |
716 | 717 | mfarol = ""; |
717 | 718 | if (ltema.escala*1 < i3GEO.parametros.mapscale*1){ |
718 | - farol = "maisverde.png"; | |
719 | - mfarol = $trad("t9"); | |
719 | + farol = "maisverde.png"; | |
720 | + mfarol = $trad("t9"); | |
720 | 721 | } |
721 | 722 | if (ltema.escala*1 > i3GEO.parametros.mapscale*1){ |
722 | - farol = "maisvermelho.png"; | |
723 | + farol = "maisvermelho.png"; | |
723 | 724 | mfarol = $trad("t10"); |
724 | 725 | } |
725 | 726 | if (ltema.escala === 0){ |
726 | - farol = "maisamarelo.png"; | |
727 | + farol = "maisamarelo.png"; | |
727 | 728 | mfarol = $trad("t11"); |
728 | 729 | } |
729 | 730 | tnome = " <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />" + |
... | ... | @@ -735,10 +736,10 @@ i3GEO.arvoreDeCamadas = { |
735 | 736 | if( (ltema.zoomtema === "sim") && (i3GEO.Interface.ATUAL !== "flamingo")) |
736 | 737 | {tnome += " <img class='extent' src='"+i3GEO.util.$im("branco.gif") +"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";} |
737 | 738 | iconesNode = new YAHOO.widget.HTMLNode({html:tnome,enableHighlight: false,isLeaf:true,expanded:false}, node); |
738 | - if(ltema.permitecomentario.toLowerCase() !== "nao" && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios == true) | |
739 | + if(ltema.permitecomentario.toLowerCase() !== "nao" && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios === true) | |
739 | 740 | { |
740 | 741 | temp = i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name; |
741 | - tnome = i3GEO.social.compartilhar("",temp,temp,"semtotal"); | |
742 | + tnome = i3GEO.social.compartilhar("",temp,temp,"semtotal"); | |
742 | 743 | iconesNode = new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node); |
743 | 744 | } |
744 | 745 | } |
... | ... | @@ -782,7 +783,7 @@ i3GEO.arvoreDeCamadas = { |
782 | 783 | if(i3GEO.Interface.ATUAL !== "flamingo") |
783 | 784 | {i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node);} |
784 | 785 | i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node); |
785 | - if(ltema.identifica == "sim" || ltema.identifica == "SIM" || ltema.identifica == "") | |
786 | + if(ltema.identifica === "sim" || ltema.identifica === "SIM" || ltema.identifica === "") | |
786 | 787 | {i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node);} |
787 | 788 | i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node); |
788 | 789 | i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node); |
... | ... | @@ -802,11 +803,11 @@ i3GEO.arvoreDeCamadas = { |
802 | 803 | //as opções SLD foram migradas para a ferramenta de edição de legenda |
803 | 804 | //i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t38"),$trad("t39"),'i3GEO.tema.dialogo.sld(\"'+ltema.name+'\")',node); |
804 | 805 | //i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t43"),$trad("t43"),'i3GEO.tema.dialogo.aplicarsld(\"'+ltema.name+'\")',node); |
805 | - if(ltema.editorsql == "sim" || ltema.editorsql == "SIM") | |
806 | + if(ltema.editorsql === "sim" || ltema.editorsql === "SIM") | |
806 | 807 | {i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node);} |
807 | - if(ltema.permitecomentario.toLowerCase() !== "nao" && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios == true) | |
808 | + if(ltema.permitecomentario.toLowerCase() !== "nao" && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios === true) | |
808 | 809 | {i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node);} |
809 | - if(i3GEO.parametros.editor == "sim") | |
810 | + if(i3GEO.parametros.editor === "sim") | |
810 | 811 | {i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node);} |
811 | 812 | node.loadComplete(); |
812 | 813 | }, |
... | ... | @@ -826,8 +827,8 @@ i3GEO.arvoreDeCamadas = { |
826 | 827 | node {String} - objeto node da árvore (YUI) que receberá o novo nó |
827 | 828 | */ |
828 | 829 | adicionaOpcaoTema:function(dica,titulo,onclick,node){ |
829 | - var tnome = "<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>"; | |
830 | - new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false}, node); | |
830 | + var tnome = "<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>", | |
831 | + temp = new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false}, node); | |
831 | 832 | }, |
832 | 833 | /* |
833 | 834 | Function: mostraLegenda |
... | ... | @@ -1037,7 +1038,7 @@ i3GEO.arvoreDeCamadas = { |
1037 | 1038 | } |
1038 | 1039 | if ((tema.download === "sim") || (tema.download === "SIM")) |
1039 | 1040 | {html += " <img style='"+estilo+"' src="+i3GEO.util.$im("down1.gif") +" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";} |
1040 | - estilo = navm ? "cursor:move;vertical-align:35%;padding-top:0px;" : "cursor:move;vertical-align:top;"; | |
1041 | + estilo = navm ? "cursor:move;vertical-align:35%;padding-top:0px;" : "cursor:move;vertical-align:top;"; | |
1041 | 1042 | if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA) |
1042 | 1043 | {html += " <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>";} |
1043 | 1044 | else |
... | ... | @@ -1088,7 +1089,7 @@ i3GEO.arvoreDeCamadas = { |
1088 | 1089 | tipo {String} - tipo de operação normal|ligartodos|desligartodos a opção 'normal' irá desligar/ligar o que estiver marcado |
1089 | 1090 | */ |
1090 | 1091 | aplicaTemas: function(tipo){ |
1091 | - if(arguments.length == 0) | |
1092 | + if(arguments.length === 0) | |
1092 | 1093 | {tipo = "normal";} |
1093 | 1094 | if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.aplicaTemas()");} |
1094 | 1095 | var t,temp,ligar,desligar; |
... | ... | @@ -1152,7 +1153,7 @@ i3GEO.arvoreDeCamadas = { |
1152 | 1153 | if(arguments.length === 0) |
1153 | 1154 | {tipo = "manter";} |
1154 | 1155 | if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.listaLigadosDesligados()");} |
1155 | - var nos,ligados,desligados,todos,n,i,no,cs,csn,j,c; | |
1156 | + var nos,ligados,desligados,todos,n,i,no,cs,csn,j,c,temp; | |
1156 | 1157 | nos = i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"); |
1157 | 1158 | ligados = []; |
1158 | 1159 | desligados = []; |
... | ... | @@ -1164,10 +1165,10 @@ i3GEO.arvoreDeCamadas = { |
1164 | 1165 | no = nos[i].getEl(); |
1165 | 1166 | cs = no.getElementsByTagName("input"); |
1166 | 1167 | csn = cs.length; |
1167 | - for(j=0;j<csn;j++){ | |
1168 | + for(j=0;j<csn;j += 1){ | |
1168 | 1169 | c = cs[j]; |
1169 | 1170 | if(c.name==="layer"){ |
1170 | - c.checked === true ? ligados.push(c.value) : desligados.push(c.value); | |
1171 | + temp = c.checked === true ? ligados.push(c.value) : desligados.push(c.value); | |
1171 | 1172 | todos.push(c.value); |
1172 | 1173 | if(tipo === "marca"){ |
1173 | 1174 | c.checked = true; |
... | ... | @@ -1193,7 +1194,7 @@ i3GEO.arvoreDeCamadas = { |
1193 | 1194 | } |
1194 | 1195 | } |
1195 | 1196 | i++; |
1196 | - } catch(e){i++;} | |
1197 | + } catch(e){i += 1;} | |
1197 | 1198 | } |
1198 | 1199 | while(i<n); |
1199 | 1200 | return ([ligados,desligados,todos]); |
... | ... | @@ -1223,15 +1224,15 @@ i3GEO.arvoreDeCamadas = { |
1223 | 1224 | no = nos[i].getEl(); |
1224 | 1225 | cs = no.getElementsByTagName("input"); |
1225 | 1226 | csn = cs.length; |
1226 | - for(j=0;j<csn;j++){ | |
1227 | + for(j=0;j<csn;j += 1){ | |
1227 | 1228 | c = cs[j]; |
1228 | 1229 | if(c.name==="layer"){ |
1229 | 1230 | if(c.value === tema) |
1230 | 1231 | {return c;} |
1231 | 1232 | } |
1232 | 1233 | } |
1233 | - i++; | |
1234 | - } catch(e){i++;} | |
1234 | + i += 1; | |
1235 | + } catch(e){i += 1;} | |
1235 | 1236 | } |
1236 | 1237 | while(i<n); |
1237 | 1238 | return (null); |
... | ... | @@ -1257,7 +1258,7 @@ i3GEO.arvoreDeCamadas = { |
1257 | 1258 | var novon = novo.length,i; |
1258 | 1259 | if(novon !== atual.length) |
1259 | 1260 | {return (false);} |
1260 | - for (i=0;i<novon;i++){ | |
1261 | + for (i=0;i<novon;i += 1){ | |
1261 | 1262 | if(novo[i].name !== atual[i].name) |
1262 | 1263 | {return (false);} |
1263 | 1264 | if(novo[i].tema !== atual[i].tema) |
... | ... | @@ -1288,12 +1289,12 @@ i3GEO.arvoreDeCamadas = { |
1288 | 1289 | if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.pegaTema()");} |
1289 | 1290 | var i,v = "", |
1290 | 1291 | c = i3GEO.arvoreDeCamadas.CAMADAS.length; |
1291 | - for (i=0; i<c; i++){ | |
1292 | + for (i=0; i<c; i += 1){ | |
1292 | 1293 | if(i3GEO.arvoreDeCamadas.CAMADAS[i].name === idtema){ |
1293 | 1294 | v = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
1294 | 1295 | } |
1295 | 1296 | } |
1296 | - return v; | |
1297 | + return v; | |
1297 | 1298 | }, |
1298 | 1299 | /* |
1299 | 1300 | Function: filtraCamadas |
... | ... | @@ -1314,19 +1315,19 @@ i3GEO.arvoreDeCamadas = { |
1314 | 1315 | {Array} |
1315 | 1316 | */ |
1316 | 1317 | filtraCamadas: function(propriedade,valor,operador,camadas){ |
1317 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.filtraCamadas()");} | |
1318 | - var resultado = [], | |
1319 | - i = 0, | |
1320 | - temp, | |
1321 | - nelementos = camadas.length, | |
1322 | - ltema; | |
1323 | - if (nelementos > 0){ | |
1324 | - do{ | |
1325 | - ltema = camadas[i]; | |
1318 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.filtraCamadas()");} | |
1319 | + var resultado = [], | |
1320 | + i = 0, | |
1321 | + temp, | |
1322 | + nelementos = camadas.length, | |
1323 | + ltema; | |
1324 | + if (nelementos > 0){ | |
1325 | + do{ | |
1326 | + ltema = camadas[i]; | |
1326 | 1327 | if(ltema.escondido !== "sim"){ |
1327 | 1328 | temp = eval("ltema."+propriedade); |
1328 | 1329 | if(operador === "igual"){ |
1329 | - if(temp == valor) | |
1330 | + if(temp === valor) | |
1330 | 1331 | {resultado.push(ltema);} |
1331 | 1332 | } |
1332 | 1333 | if(operador === "diferente"){ |
... | ... | @@ -1334,11 +1335,11 @@ i3GEO.arvoreDeCamadas = { |
1334 | 1335 | {resultado.push(ltema);} |
1335 | 1336 | } |
1336 | 1337 | } |
1337 | - i++; | |
1338 | - } | |
1339 | - while(i < nelementos); | |
1340 | - } | |
1341 | - return resultado; | |
1338 | + i += 1; | |
1339 | + } | |
1340 | + while(i < nelementos); | |
1341 | + } | |
1342 | + return resultado; | |
1342 | 1343 | }, |
1343 | 1344 | /* |
1344 | 1345 | Function: alteraPropCamadas |
... | ... | @@ -1354,22 +1355,22 @@ i3GEO.arvoreDeCamadas = { |
1354 | 1355 | camada {string} - código da camada |
1355 | 1356 | */ |
1356 | 1357 | alteraPropCamadas: function(propriedade,valor,camada){ |
1357 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.alteraPropCamadas()");} | |
1358 | - var resultado = [], | |
1359 | - i = 0, | |
1360 | - temp, | |
1361 | - nelementos = i3GEO.arvoreDeCamadas.CAMADAS.length, | |
1362 | - ltema; | |
1363 | - if (nelementos > 0){ | |
1364 | - do{ | |
1365 | - ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; | |
1366 | - if(ltema.name == camada){ | |
1358 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.alteraPropCamadas()");} | |
1359 | + var resultado = [], | |
1360 | + i = 0, | |
1361 | + temp, | |
1362 | + nelementos = i3GEO.arvoreDeCamadas.CAMADAS.length, | |
1363 | + ltema; | |
1364 | + if (nelementos > 0){ | |
1365 | + do{ | |
1366 | + ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; | |
1367 | + if(ltema.name === camada){ | |
1367 | 1368 | eval("ltema."+propriedade+"='"+valor+"';"); |
1368 | 1369 | } |
1369 | - i++; | |
1370 | - } | |
1371 | - while(i < nelementos); | |
1372 | - } | |
1370 | + i += 1; | |
1371 | + } | |
1372 | + while(i < nelementos); | |
1373 | + } | |
1373 | 1374 | }, |
1374 | 1375 | /* |
1375 | 1376 | Function: verificaAbrangenciaTemas |
... | ... | @@ -1377,9 +1378,9 @@ i3GEO.arvoreDeCamadas = { |
1377 | 1378 | Verifica se um tema está ou não na abrangência espacial do mapa atual modificando a cor com que o nome é mostrado na árvore |
1378 | 1379 | */ |
1379 | 1380 | verificaAbrangenciaTemas: function(){ |
1380 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()");} | |
1381 | - if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS == false) | |
1382 | - {return} | |
1381 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()");} | |
1382 | + if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS === false) | |
1383 | + {return;} | |
1383 | 1384 | try{ |
1384 | 1385 | var resultado = [], |
1385 | 1386 | i = 0, |
... | ... | @@ -1392,15 +1393,15 @@ i3GEO.arvoreDeCamadas = { |
1392 | 1393 | do{ |
1393 | 1394 | ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
1394 | 1395 | temp = ltema.exttema; |
1395 | - if(temp != ""){ | |
1396 | - if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten) == false){ | |
1396 | + if(temp !== ""){ | |
1397 | + if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten) === false){ | |
1397 | 1398 | $i("ArvoreTituloTema"+ltema.name).style.color = "gray"; |
1398 | 1399 | } |
1399 | 1400 | else{ |
1400 | 1401 | $i("ArvoreTituloTema"+ltema.name).style.color = "black"; |
1401 | 1402 | } |
1402 | 1403 | } |
1403 | - i++; | |
1404 | + i += 1; | |
1404 | 1405 | } |
1405 | 1406 | while(i < nelementos); |
1406 | 1407 | } |
... | ... | @@ -1417,19 +1418,19 @@ i3GEO.arvoreDeCamadas = { |
1417 | 1418 | {string} código do tema ou "" |
1418 | 1419 | */ |
1419 | 1420 | verificaAplicaExtensao: function(){ |
1420 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.verificaAplicaExtensao()");} | |
1421 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.verificaAplicaExtensao()");} | |
1422 | + var i = 0, | |
1423 | + temp = "", | |
1424 | + nelementos = i3GEO.arvoreDeCamadas.CAMADAS.length, | |
1425 | + ltema; | |
1421 | 1426 | try{ |
1422 | - var i = 0, | |
1423 | - temp = "", | |
1424 | - nelementos = i3GEO.arvoreDeCamadas.CAMADAS.length, | |
1425 | - ltema; | |
1426 | 1427 | if (nelementos > 0){ |
1427 | 1428 | do{ |
1428 | 1429 | ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
1429 | - if(ltema.aplicaextensao == "sim"){ | |
1430 | + if(ltema.aplicaextensao === "sim"){ | |
1430 | 1431 | temp = ltema.name; |
1431 | 1432 | } |
1432 | - i++; | |
1433 | + i += 1; | |
1433 | 1434 | } |
1434 | 1435 | while(i < nelementos); |
1435 | 1436 | } | ... | ... |
classesjs/classe_arvoredetemas.js
... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se não, escreva para a |
29 | 29 | Free Software Foundation, Inc., no endereço |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | -if(typeof(i3GEO) == 'undefined'){ | |
32 | +if(typeof(i3GEO) === 'undefined'){ | |
33 | 33 | i3GEO = []; |
34 | 34 | } |
35 | 35 | /* |
... | ... | @@ -334,7 +334,7 @@ i3GEO.arvoreDeTemas = { |
334 | 334 | node = i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz"); |
335 | 335 | raiz = retorno.data.canais; |
336 | 336 | nraiz = raiz.length; |
337 | - for (i=0;i<nraiz; i++){ | |
337 | + for (i=0;i<nraiz; i += 1){ | |
338 | 338 | html = "<span title='"+raiz[i].description+"'> "+raiz[i].title; |
339 | 339 | if(raiz[i].nacessos > 0){ |
340 | 340 | html += " ("+((raiz[i].nacessosok * 100) / (raiz[i].nacessos*1))+"%)</span>"; |
... | ... | @@ -367,9 +367,9 @@ i3GEO.arvoreDeTemas = { |
367 | 367 | catch(m){node.loadComplete();return;} |
368 | 368 | cor = "rgb(51, 102, 102)"; |
369 | 369 | html = ""; |
370 | - for(i=0;i<n; i++){ | |
370 | + for(i=0;i<n; i += 1){ | |
371 | 371 | cabeca = retorno.data[i].nome+" - "+retorno.data[i].titulo; |
372 | - if (cabeca != "undefined - undefined"){ | |
372 | + if (cabeca !== "undefined - undefined"){ | |
373 | 373 | tempNode = new YAHOO.widget.HTMLNode( |
374 | 374 | { |
375 | 375 | html:"<span style='color:"+cor+"' >"+cabeca, |
... | ... | @@ -386,7 +386,7 @@ i3GEO.arvoreDeTemas = { |
386 | 386 | {tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS, 1);} |
387 | 387 | if(retorno.data[i].estilos){ |
388 | 388 | ns = retorno.data[i].estilos.length; |
389 | - for (j=0;j<ns; j++){ | |
389 | + for (j=0;j<ns; j += 1){ | |
390 | 390 | tempNodeS = new YAHOO.widget.HTMLNode( |
391 | 391 | { |
392 | 392 | html:i3GEO.arvoreDeTemas.montaTextoTemaWMS( |
... | ... | @@ -408,7 +408,7 @@ i3GEO.arvoreDeTemas = { |
408 | 408 | tempNode.isleaf = true; |
409 | 409 | } |
410 | 410 | } |
411 | - cor = (cor == "rgb(51, 102, 102)") ? "rgb(47, 70, 50)" : "rgb(51, 102, 102)"; | |
411 | + cor = (cor === "rgb(51, 102, 102)") ? "rgb(47, 70, 50)" : "rgb(51, 102, 102)"; | |
412 | 412 | } |
413 | 413 | } |
414 | 414 | node.loadComplete(); |
... | ... | @@ -427,7 +427,7 @@ i3GEO.arvoreDeTemas = { |
427 | 427 | i3GEO.janela.fechaAguarde("ajaxredesenha"); |
428 | 428 | i3GEO.atualiza(); |
429 | 429 | }; |
430 | - adiciona = "javascript:i3GEO.janela.abreAguarde(\"ajaxredesenha\",\""+$trad("o1")+"\");this.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","; | |
430 | + adiciona = "i3GEO.janela.abreAguarde(\"ajaxredesenha\",\""+$trad("o1")+"\");this.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","; | |
431 | 431 | adiciona += "\""+servico+"\","; |
432 | 432 | adiciona += "\""+layer+"\","; |
433 | 433 | adiciona += "\""+estilo+"\","; |
... | ... | @@ -438,7 +438,7 @@ i3GEO.arvoreDeTemas = { |
438 | 438 | adiciona += "\"\","; |
439 | 439 | adiciona += "\"nao\","; |
440 | 440 | adiciona += "\""+formatoinfo+"\")"; |
441 | - html += "onclick='"+adiciona+"' "; | |
441 | + html += "onclick='javascript:"+adiciona+"' "; | |
442 | 442 | html += " type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"; |
443 | 443 | html += layer+" - "+titulo; |
444 | 444 | html += "</td></span>"; |
... | ... | @@ -473,9 +473,9 @@ i3GEO.arvoreDeTemas = { |
473 | 473 | i3GEO.arvoreDeTemas.MENUS = []; |
474 | 474 | c = retorno.data.length; |
475 | 475 | m = i3GEO.arvoreDeTemas.IDSMENUS.length; |
476 | - for (i=0, j=c; i<j; i++){ | |
477 | - for (k=0, jj=m; k<jj; k++){ | |
478 | - if(retorno.data[i].idmenu == i3GEO.arvoreDeTemas.IDSMENUS[k]) | |
476 | + for (i=0, j=c; i<j; i += 1){ | |
477 | + for (k=0, jj=m; k<jj; k +=1 ){ | |
478 | + if(retorno.data[i].idmenu === i3GEO.arvoreDeTemas.IDSMENUS[k]) | |
479 | 479 | {i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i]);} |
480 | 480 | } |
481 | 481 | } |
... | ... | @@ -638,21 +638,21 @@ i3GEO.arvoreDeTemas = { |
638 | 638 | montaTexto = function(ngSgrupo){ |
639 | 639 | var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg; |
640 | 640 | tempn = ngSgrupo.length; |
641 | - for(sg=0;sg<tempn;sg++){ | |
641 | + for(sg=0;sg<tempn;sg+=1){ | |
642 | 642 | ngTema = ngSgrupo[sg].temas; |
643 | 643 | tempng = ngTema.length; |
644 | - for (st=0;st<tempng;st++){ | |
644 | + for (st=0;st<tempng;st+=1){ | |
645 | 645 | mostra = true; |
646 | 646 | try{ |
647 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && ngTema[st].download == "nao") | |
647 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && ngTema[st].download === "nao") | |
648 | 648 | {mostra = false;} |
649 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && ngTema[st].ogc == "nao") | |
649 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && ngTema[st].ogc === "nao") | |
650 | 650 | {mostra = false;} |
651 | 651 | } |
652 | 652 | catch(e){} |
653 | 653 | if(mostra){ |
654 | 654 | d = i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]); |
655 | - if ( ngTema[st].link != " ") | |
655 | + if ( ngTema[st].link !== " ") | |
656 | 656 | {lk = "<a href='"+ngTema[st].link+"' target='blank'> fonte</a>";} |
657 | 657 | if(ngSgrupo[sg].subgrupo) |
658 | 658 | {d += "<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";} |
... | ... | @@ -660,7 +660,7 @@ i3GEO.arvoreDeTemas = { |
660 | 660 | {d += "<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>";} |
661 | 661 | tempNode = new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false}, node); |
662 | 662 | } |
663 | - conta++; | |
663 | + conta += 1; | |
664 | 664 | } |
665 | 665 | } |
666 | 666 | }; |
... | ... | @@ -669,7 +669,7 @@ i3GEO.arvoreDeTemas = { |
669 | 669 | else{ |
670 | 670 | retorno = retorno.data; |
671 | 671 | conta = 0; |
672 | - if ((retorno != "erro") && (retorno !== undefined)){ | |
672 | + if ((retorno !== "erro") && (typeof(retorno) !== 'undefined')){ | |
673 | 673 | ig = retorno.length-1; |
674 | 674 | if(ig >= 0){ |
675 | 675 | do{ |
... | ... | @@ -684,8 +684,8 @@ i3GEO.arvoreDeTemas = { |
684 | 684 | } |
685 | 685 | } |
686 | 686 | node.loadComplete(); |
687 | - }; | |
688 | - i3GEO.php.procurartemasestrela(temp,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1); | |
687 | + }; | |
688 | + i3GEO.php.procurartemasestrela(temp,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1); | |
689 | 689 | }, |
690 | 690 | /* |
691 | 691 | Function: cria |
... | ... | @@ -715,19 +715,19 @@ i3GEO.arvoreDeTemas = { |
715 | 715 | if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeTemas.cria()");} |
716 | 716 | if(this.ARVORE){return;} |
717 | 717 | if(!idhtml) |
718 | - {var idhtml = "";} | |
718 | + {idhtml = "";} | |
719 | 719 | if(idhtml !== "") |
720 | 720 | {i3GEO.arvoreDeTemas.IDHTML = idhtml;} |
721 | 721 | if(!funcaoTema) |
722 | - {var funcaoTema = "";} | |
722 | + {funcaoTema = "";} | |
723 | 723 | if(funcaoTema !== "") |
724 | 724 | {i3GEO.arvoreDeTemas.ATIVATEMA = funcaoTema;} |
725 | 725 | if(!objOpcoes) |
726 | - {var objOpcoes = "";} | |
726 | + {objOpcoes = "";} | |
727 | 727 | if(objOpcoes !== "") |
728 | 728 | {i3GEO.arvoreDeTemas.OPCOESADICIONAIS = objOpcoes;} |
729 | 729 | if(!tipoBotao) |
730 | - {var tipoBotao = "";} | |
730 | + {tipoBotao = "";} | |
731 | 731 | if(tipoBotao !== "") |
732 | 732 | {i3GEO.arvoreDeTemas.TIPOBOTAO = tipoBotao;} |
733 | 733 | |
... | ... | @@ -759,16 +759,17 @@ i3GEO.arvoreDeTemas = { |
759 | 759 | YAHOO.example.treeExample = function(){ |
760 | 760 | function changeIconMode(){ |
761 | 761 | newVal = parseInt(this.value,10); |
762 | - if (newVal != currentIconMode) | |
762 | + if (newVal !== currentIconMode) | |
763 | 763 | {currentIconMode = newVal;} |
764 | 764 | buildTree(); |
765 | 765 | } |
766 | - function buildTree(){ | |
766 | + function buildTree(){ | |
767 | 767 | i3GEO.arvoreDeTemas.ARVORE = new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML); |
768 | 768 | tempNode = new YAHOO.widget.TextNode({html:'',expanded:false,isLeaf:false,enableHighlight:false},root); |
769 | - } | |
770 | - buildTree(); | |
771 | - }(); | |
769 | + } | |
770 | + buildTree(); | |
771 | + }; | |
772 | + YAHOO.example.treeExample(); | |
772 | 773 | //opção de busca de temas |
773 | 774 | root = i3GEO.arvoreDeTemas.ARVORE.getRoot(); |
774 | 775 | if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca === true){ |
... | ... | @@ -815,7 +816,7 @@ i3GEO.arvoreDeTemas = { |
815 | 816 | tempNode |
816 | 817 | ); |
817 | 818 | drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir, 1); |
818 | - ig++; | |
819 | + ig+=1; | |
819 | 820 | } |
820 | 821 | while(ig<iglt); |
821 | 822 | }; |
... | ... | @@ -852,7 +853,7 @@ i3GEO.arvoreDeTemas = { |
852 | 853 | //wms |
853 | 854 | // |
854 | 855 | if(i3GEO.arvoreDeTemas.INCLUIWMS === true){ |
855 | - if(i3GEO.parametros.editor == "sim") | |
856 | + if(i3GEO.parametros.editor === "sim") | |
856 | 857 | {editor = "<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />";} |
857 | 858 | else |
858 | 859 | {editor = "";} |
... | ... | @@ -878,9 +879,9 @@ i3GEO.arvoreDeTemas = { |
878 | 879 | tempNode1 = new YAHOO.widget.HTMLNode( |
879 | 880 | {expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight: false,nivel:ig}, |
880 | 881 | tempNode |
881 | - ); | |
882 | - tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1); | |
883 | - ig--; | |
882 | + ); | |
883 | + tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1); | |
884 | + ig -= 1; | |
884 | 885 | } |
885 | 886 | while(ig > 0); |
886 | 887 | } |
... | ... | @@ -889,16 +890,16 @@ i3GEO.arvoreDeTemas = { |
889 | 890 | // |
890 | 891 | dados = i3GEO.arvoreDeTemas.MENUS; |
891 | 892 | c = dados.length; |
892 | - for (i=0, j=c; i<j; i++) | |
893 | + for (i=0, j=c; i<j; i+=1) | |
893 | 894 | { |
894 | 895 | if(!dados[i].nomemenu) |
895 | 896 | {dados[i].nomemenu = dados[i].idmenu;} |
896 | - if(i3GEO.parametros.editor == "sim") | |
897 | + if(i3GEO.parametros.editor === "sim") | |
897 | 898 | {editor = "<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />";} |
898 | 899 | else |
899 | 900 | {editor = "";} |
900 | 901 | if(!dados[i].publicado){dados[i].publicado = "sim";} |
901 | - if(dados[i].publicado.toLowerCase() != "nao") | |
902 | + if(dados[i].publicado.toLowerCase() !== "nao") | |
902 | 903 | {conteudo = "<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor;} |
903 | 904 | else |
904 | 905 | {conteudo = "<b> <span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+editor;} |
... | ... | @@ -907,7 +908,7 @@ i3GEO.arvoreDeTemas = { |
907 | 908 | root |
908 | 909 | ); |
909 | 910 | tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos, currentIconMode); |
910 | - if(dados[i].status == "aberto") | |
911 | + if(dados[i].status === "aberto") | |
911 | 912 | {tempNode.expand();} |
912 | 913 | } |
913 | 914 | if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){ |
... | ... | @@ -928,7 +929,7 @@ i3GEO.arvoreDeTemas = { |
928 | 929 | do{ |
929 | 930 | nomeSis = sis[ig].NOME; |
930 | 931 | if(sis[ig].PUBLICADO){ |
931 | - if(sis[ig].PUBLICADO == "NAO" || sis[ig].PUBLICADO == "nao") | |
932 | + if(sis[ig].PUBLICADO === "NAO" || sis[ig].PUBLICADO === "nao") | |
932 | 933 | {nomeSis = "<s>"+sis[ig].NOME+"</s>";} |
933 | 934 | } |
934 | 935 | sisNode = new YAHOO.widget.HTMLNode( |
... | ... | @@ -937,7 +938,7 @@ i3GEO.arvoreDeTemas = { |
937 | 938 | ); |
938 | 939 | funcoes = sis[ig].FUNCOES; |
939 | 940 | tempf = funcoes.length; |
940 | - for (ig2=0;ig2<tempf;ig2++){ | |
941 | + for (ig2=0;ig2<tempf;ig2+=1){ | |
941 | 942 | abre = "i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')"; |
942 | 943 | nomeFunc = "<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>"; |
943 | 944 | funcNode = new YAHOO.widget.HTMLNode( |
... | ... | @@ -945,7 +946,7 @@ i3GEO.arvoreDeTemas = { |
945 | 946 | sisNode |
946 | 947 | ); |
947 | 948 | } |
948 | - ig++; | |
949 | + ig+=1; | |
949 | 950 | } |
950 | 951 | while(ig<iglt); |
951 | 952 | i3GEO.arvoreDeTemas.ARVORE.draw(); |
... | ... | @@ -953,8 +954,8 @@ i3GEO.arvoreDeTemas = { |
953 | 954 | i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno); |
954 | 955 | } |
955 | 956 | document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left"; |
956 | - if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS) | |
957 | - {i3GEO.arvoreDeTemas.ARVORE.draw();} | |
957 | + if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS) | |
958 | + {i3GEO.arvoreDeTemas.ARVORE.draw();} | |
958 | 959 | }, |
959 | 960 | /* |
960 | 961 | Function: montaGrupos |
... | ... | @@ -971,11 +972,11 @@ i3GEO.arvoreDeTemas = { |
971 | 972 | c = grupos.length - 3; |
972 | 973 | raiz = grupos[c].temasraiz; |
973 | 974 | nraiz = raiz.length; |
974 | - for (i=0;i<nraiz; i++){ | |
975 | + for (i=0;i<nraiz; i+=1){ | |
975 | 976 | mostra = true; |
976 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && raiz[i].download == "nao") | |
977 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && raiz[i].download === "nao") | |
977 | 978 | {mostra = false;} |
978 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && raiz[i].ogc == "nao") | |
979 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && raiz[i].ogc === "nao") | |
979 | 980 | {mostra = false;} |
980 | 981 | if(mostra){ |
981 | 982 | tempNode = new YAHOO.widget.HTMLNode( |
... | ... | @@ -984,13 +985,13 @@ i3GEO.arvoreDeTemas = { |
984 | 985 | ); |
985 | 986 | } |
986 | 987 | } |
987 | - for (i=0;i<c; i++){ | |
988 | + for (i=0;i<c; i+=1){ | |
988 | 989 | mostra = true; |
989 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && grupos[i].download == "nao") | |
990 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && grupos[i].download === "nao") | |
990 | 991 | {mostra = false;} |
991 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && grupos[i].ogc == "nao") | |
992 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && grupos[i].ogc === "nao") | |
992 | 993 | {mostra = false;} |
993 | - if(i3GEO.parametros.editor == "sim") | |
994 | + if(i3GEO.parametros.editor === "sim") | |
994 | 995 | {editor = "<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />";} |
995 | 996 | else |
996 | 997 | {editor = "";} |
... | ... | @@ -1000,7 +1001,7 @@ i3GEO.arvoreDeTemas = { |
1000 | 1001 | //no caso do uso de menu de temas com base em arquivos xml, o id não existe |
1001 | 1002 | //sendo necessário o uso da ordem dos grupos como identificador |
1002 | 1003 | if(grupos[i].publicado){ |
1003 | - if(grupos[i].publicado == "NAO"){ | |
1004 | + if(grupos[i].publicado === "NAO"){ | |
1004 | 1005 | grupos[i].nome = "<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"; |
1005 | 1006 | } |
1006 | 1007 | } |
... | ... | @@ -1032,11 +1033,11 @@ i3GEO.arvoreDeTemas = { |
1032 | 1033 | c = subgrupos.length; |
1033 | 1034 | raiz = i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo; |
1034 | 1035 | nraiz = raiz.length; |
1035 | - for (i=0;i<nraiz; i++){ | |
1036 | + for (i=0;i<nraiz; i+=1){ | |
1036 | 1037 | mostra = true; |
1037 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && raiz[i].download == "nao") | |
1038 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && raiz[i].download === "nao") | |
1038 | 1039 | {mostra = false;} |
1039 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && raiz[i].ogc == "nao") | |
1040 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && raiz[i].ogc === "nao") | |
1040 | 1041 | {mostra = false;} |
1041 | 1042 | if(mostra){ |
1042 | 1043 | tempNode = new YAHOO.widget.HTMLNode( |
... | ... | @@ -1057,13 +1058,13 @@ i3GEO.arvoreDeTemas = { |
1057 | 1058 | tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas, 1); |
1058 | 1059 | } |
1059 | 1060 | } |
1060 | - for (i=0;i<c; i++){ | |
1061 | + for (i=0;i<c; i+=1){ | |
1061 | 1062 | mostra = true; |
1062 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && subgrupos[i].download == "nao") | |
1063 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && subgrupos[i].download === "nao") | |
1063 | 1064 | {mostra = false;} |
1064 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && subgrupos[i].ogc == "nao") | |
1065 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && subgrupos[i].ogc === "nao") | |
1065 | 1066 | {mostra = false;} |
1066 | - if(i3GEO.parametros.editor == "sim") | |
1067 | + if(i3GEO.parametros.editor === "sim") | |
1067 | 1068 | {editor = "<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />";} |
1068 | 1069 | else |
1069 | 1070 | {editor = "";} |
... | ... | @@ -1073,7 +1074,7 @@ i3GEO.arvoreDeTemas = { |
1073 | 1074 | //no caso do uso de menu de temas com base em arquivos xml, o id não existe |
1074 | 1075 | //sendo necessário o uso da ordem dos grupos como identificador |
1075 | 1076 | if(subgrupos[i].publicado){ |
1076 | - if(subgrupos[i].publicado == "NAO"){ | |
1077 | + if(subgrupos[i].publicado === "NAO"){ | |
1077 | 1078 | subgrupos[i].nome = "<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"; |
1078 | 1079 | } |
1079 | 1080 | } |
... | ... | @@ -1102,15 +1103,15 @@ i3GEO.arvoreDeTemas = { |
1102 | 1103 | temas = i3GEO.arvoreDeTemas.TEMAS.temas; |
1103 | 1104 | c = temas.length; |
1104 | 1105 | cor = "rgb(51, 102, 102)"; |
1105 | - for (i=0;i<c; i++){ | |
1106 | + for (i=0;i<c; i+=1){ | |
1106 | 1107 | mostra = true; |
1107 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && temas[i].download == "nao") | |
1108 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && temas[i].download === "nao") | |
1108 | 1109 | {mostra = false;} |
1109 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && temas[i].ogc == "nao") | |
1110 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && temas[i].ogc === "nao") | |
1110 | 1111 | {mostra = false;} |
1111 | 1112 | if(mostra){ |
1112 | 1113 | if(temas[i].publicado){ |
1113 | - if(temas[i].publicado == "NAO"){ | |
1114 | + if(temas[i].publicado === "NAO"){ | |
1114 | 1115 | temas[i].nome = "<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"; |
1115 | 1116 | } |
1116 | 1117 | } |
... | ... | @@ -1130,7 +1131,7 @@ i3GEO.arvoreDeTemas = { |
1130 | 1131 | node |
1131 | 1132 | ); |
1132 | 1133 | tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas, 1); |
1133 | - cor = (cor == "rgb(51, 102, 102)") ? "rgb(47, 70, 50)" : "rgb(51, 102, 102)"; | |
1134 | + cor = (cor === "rgb(51, 102, 102)") ? "rgb(47, 70, 50)" : "rgb(51, 102, 102)"; | |
1134 | 1135 | } |
1135 | 1136 | } |
1136 | 1137 | node.loadComplete(); |
... | ... | @@ -1152,7 +1153,7 @@ i3GEO.arvoreDeTemas = { |
1152 | 1153 | { |
1153 | 1154 | var ig,d,conteudo,dirs,tempNode,arquivos,nodeSHP; |
1154 | 1155 | dirs = retorno.data.diretorios; |
1155 | - for (ig=0;ig<dirs.length;ig++) | |
1156 | + for (ig=0;ig<dirs.length;ig+=1) | |
1156 | 1157 | { |
1157 | 1158 | tempNode = new YAHOO.widget.HTMLNode( |
1158 | 1159 | { |
... | ... | @@ -1166,7 +1167,7 @@ i3GEO.arvoreDeTemas = { |
1166 | 1167 | tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir, 1); |
1167 | 1168 | } |
1168 | 1169 | arquivos = retorno.data.arquivos; |
1169 | - for (ig=0;ig<arquivos.length;ig++) | |
1170 | + for (ig=0;ig<arquivos.length;ig+=1) | |
1170 | 1171 | { |
1171 | 1172 | conteudo = arquivos[ig]; |
1172 | 1173 | if(conteudo.search(".img") > 1 || conteudo.search(".tif") > 1 || conteudo.search(".TIF") > 1 || conteudo.search(".shp") > 1 || conteudo.search(".SHP") > 1) |
... | ... | @@ -1229,7 +1230,7 @@ i3GEO.arvoreDeTemas = { |
1229 | 1230 | propTemas: function(node){ |
1230 | 1231 | if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeTemas.propTemas()");} |
1231 | 1232 | var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc; |
1232 | - if(node.data.fonte !== "" && node.data.fonte != " "){ | |
1233 | + if(node.data.fonte !== "" && node.data.fonte !== " "){ | |
1233 | 1234 | tempNode = new YAHOO.widget.HTMLNode( |
1234 | 1235 | {isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"}, |
1235 | 1236 | node |
... | ... | @@ -1243,24 +1244,24 @@ i3GEO.arvoreDeTemas = { |
1243 | 1244 | node |
1244 | 1245 | ); |
1245 | 1246 | } |
1246 | - if (node.data.ogc != "nao"){ | |
1247 | + if (node.data.ogc !== "nao"){ | |
1247 | 1248 | if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml === true){ |
1248 | - html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>"; | |
1249 | - if (node.data.kmz == "sim") | |
1249 | + html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>"; | |
1250 | + if (node.data.kmz === "sim") | |
1250 | 1251 | {html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>";} |
1251 | 1252 | tempNode = new YAHOO.widget.HTMLNode( |
1252 | 1253 | {isLeaf:true,enableHighlight:false,expanded:false,html:html}, |
1253 | 1254 | node |
1254 | 1255 | ); |
1255 | 1256 | } |
1256 | - ogc = i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities"; | |
1257 | + ogc = i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities"; | |
1257 | 1258 | tempNode = new YAHOO.widget.HTMLNode( |
1258 | 1259 | {isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+ogc+"' target='blank' >WMS - OGC</a>"}, |
1259 | 1260 | node |
1260 | 1261 | ); |
1261 | 1262 | } |
1262 | - if (node.data.permitecomentario != "nao" && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios === true){ | |
1263 | - html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >Comentário</a>"; | |
1263 | + if (node.data.permitecomentario !== "nao" && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios === true){ | |
1264 | + html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >Comentário</a>"; | |
1264 | 1265 | tempNode = new YAHOO.widget.HTMLNode( |
1265 | 1266 | {isLeaf:true,enableHighlight:false,expanded:false,html:html}, |
1266 | 1267 | node |
... | ... | @@ -1275,7 +1276,7 @@ i3GEO.arvoreDeTemas = { |
1275 | 1276 | ); |
1276 | 1277 | } |
1277 | 1278 | if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas === true){ |
1278 | - n = parseInt(node.data.nacessos / (i3GEO.arvoreDeTemas.FATORESTRELA*1),10); | |
1279 | + n = parseInt(node.data.nacessos / (i3GEO.arvoreDeTemas.FATORESTRELA*1),10); | |
1279 | 1280 | if(n >= 5){n = 5;} |
1280 | 1281 | html = (n > 0) ? "<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>" : "<img src='"+i3GEO.util.$im("e0.png")+"'/>"; |
1281 | 1282 | tempNode = new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html}, node); |
... | ... | @@ -1358,7 +1359,7 @@ i3GEO.arvoreDeTemas = { |
1358 | 1359 | i=0; |
1359 | 1360 | do{ |
1360 | 1361 | inputs[i].checked = false; |
1361 | - i++; | |
1362 | + i+=1; | |
1362 | 1363 | } |
1363 | 1364 | while(i<n); |
1364 | 1365 | }, |
... | ... | @@ -1381,7 +1382,7 @@ i3GEO.arvoreDeTemas = { |
1381 | 1382 | do{ |
1382 | 1383 | if(inputs[i].checked === true) |
1383 | 1384 | {lista.push(inputs[i].value);} |
1384 | - i++; | |
1385 | + i+=1; | |
1385 | 1386 | } |
1386 | 1387 | while(i<n); |
1387 | 1388 | return (lista); |
... | ... | @@ -1407,31 +1408,31 @@ i3GEO.arvoreDeTemas = { |
1407 | 1408 | else{ |
1408 | 1409 | retorno = retorno.data; |
1409 | 1410 | conta = 0; |
1410 | - if ((retorno != "erro") && (retorno !== undefined)){ | |
1411 | + if ((retorno !== "erro") && (typeof(retorno) !== 'undefined')){ | |
1411 | 1412 | ig = retorno.length-1; |
1412 | 1413 | if(ig >= 0){ |
1413 | 1414 | do{ |
1414 | 1415 | ngSgrupo = retorno[ig].subgrupos; |
1415 | 1416 | tempn = ngSgrupo.length; |
1416 | - for (sg=0;sg<tempn;sg++){ | |
1417 | + for (sg=0;sg<tempn;sg+=1){ | |
1417 | 1418 | ngTema = ngSgrupo[sg].temas; |
1418 | 1419 | tempng = ngTema.length; |
1419 | - for (st=0;st<tempng;st++){ | |
1420 | + for (st=0;st<tempng;st+=1){ | |
1420 | 1421 | mostra = true; |
1421 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && ngTema[st].download == "nao") | |
1422 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && ngTema[st].download === "nao") | |
1422 | 1423 | {mostra = false;} |
1423 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && ngTema[st].ogc == "nao") | |
1424 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && ngTema[st].ogc === "nao") | |
1424 | 1425 | {mostra = false;} |
1425 | 1426 | if(mostra){ |
1426 | 1427 | d = i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]); |
1427 | - if ( ngTema[st].link != " ") | |
1428 | + if ( ngTema[st].link !== " ") | |
1428 | 1429 | {lk = "<a href='"+ngTema[st].link+"' target='blank'> fonte</a>";} |
1429 | 1430 | d += "<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"; |
1430 | 1431 | tempNode = new YAHOO.widget.HTMLNode(d, nodePalavra, false,true); |
1431 | 1432 | tempNode.isLeaf = true; |
1432 | 1433 | tempNode.enableHighlight = false; |
1433 | 1434 | } |
1434 | - conta++; | |
1435 | + conta+=1; | |
1435 | 1436 | } |
1436 | 1437 | } |
1437 | 1438 | } |
... | ... | @@ -1495,21 +1496,21 @@ i3GEO.arvoreDeTemas = { |
1495 | 1496 | montaTexto = function(ngSgrupo){ |
1496 | 1497 | var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg; |
1497 | 1498 | tempn = ngSgrupo.length; |
1498 | - for(sg=0;sg<tempn;sg++){ | |
1499 | + for(sg=0;sg<tempn;sg+=1){ | |
1499 | 1500 | ngTema = ngSgrupo[sg].temas; |
1500 | 1501 | tempng = ngTema.length; |
1501 | - for (st=0;st<tempng;st++){ | |
1502 | + for (st=0;st<tempng;st+=1){ | |
1502 | 1503 | mostra = true; |
1503 | 1504 | try{ |
1504 | - if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && ngTema[st].download == "nao") | |
1505 | + if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && ngTema[st].download === "nao") | |
1505 | 1506 | {mostra = false;} |
1506 | - if(i3GEO.arvoreDeTemas.FILTRAOGC && ngTema[st].ogc == "nao") | |
1507 | + if(i3GEO.arvoreDeTemas.FILTRAOGC && ngTema[st].ogc === "nao") | |
1507 | 1508 | {mostra = false;} |
1508 | 1509 | } |
1509 | 1510 | catch(e){} |
1510 | 1511 | if(mostra){ |
1511 | 1512 | d = i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]); |
1512 | - if ( ngTema[st].link != " ") | |
1513 | + if ( ngTema[st].link !== " ") | |
1513 | 1514 | {lk = "<a href='"+ngTema[st].link+"' target='blank'> fonte</a>";} |
1514 | 1515 | if(ngSgrupo[sg].subgrupo) |
1515 | 1516 | {d += "<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";} |
... | ... | @@ -1517,7 +1518,7 @@ i3GEO.arvoreDeTemas = { |
1517 | 1518 | {d += "<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>";} |
1518 | 1519 | tempNode = new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false}, nodePalavra); |
1519 | 1520 | } |
1520 | - conta++; | |
1521 | + conta+=1; | |
1521 | 1522 | } |
1522 | 1523 | } |
1523 | 1524 | }; |
... | ... | @@ -1526,7 +1527,7 @@ i3GEO.arvoreDeTemas = { |
1526 | 1527 | else{ |
1527 | 1528 | retorno = retorno.data; |
1528 | 1529 | conta = 0; |
1529 | - if ((retorno != "erro") && (retorno !== undefined)){ | |
1530 | + if ((retorno !== "erro") && (typeof(retorno) !== 'undefined')){ | |
1530 | 1531 | ig = retorno.length-1; |
1531 | 1532 | if(ig >= 0){ |
1532 | 1533 | do{ |
... | ... | @@ -1610,7 +1611,7 @@ i3GEO.arvoreDeTemas = { |
1610 | 1611 | //verifica se deve ser ativada uma outra guia que não a atual |
1611 | 1612 | // |
1612 | 1613 | if(i3GEO.arvoreDeTemas.RETORNAGUIA !== ""){ |
1613 | - if(i3GEO.arvoreDeTemas.RETORNAGUIA != i3GEO.guias.ATUAL){ | |
1614 | + if(i3GEO.arvoreDeTemas.RETORNAGUIA !== i3GEO.guias.ATUAL){ | |
1614 | 1615 | i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA); |
1615 | 1616 | } |
1616 | 1617 | } |
... | ... | @@ -1658,8 +1659,8 @@ i3GEO.arvoreDeTemas = { |
1658 | 1659 | var ob,ins,ig; |
1659 | 1660 | ob = retorno.data; |
1660 | 1661 | ins = "<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>"; |
1661 | - for (ig=0;ig<ob.length; ig++){ | |
1662 | - if(ob[ig].publicado != "nao" && ob[ig].publicado != "NAO"){ | |
1662 | + for (ig=0;ig<ob.length; ig+=1){ | |
1663 | + if(ob[ig].publicado !== "nao" && ob[ig].publicado !== "NAO"){ | |
1663 | 1664 | if(ob[ig].nomemenu) |
1664 | 1665 | {ins += "<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>";} |
1665 | 1666 | } |
... | ... | @@ -1696,10 +1697,10 @@ i3GEO.arvoreDeTemas = { |
1696 | 1697 | i3GEO.configura.locaplic = locaplic; |
1697 | 1698 | i3GEO.arvoreDeTemas.temasRaizGrupos = []; |
1698 | 1699 | var combo = function (retorno){ |
1699 | - var ins,ig; | |
1700 | - var obGrupos = retorno.data; | |
1700 | + var ins,ig, | |
1701 | + obGrupos = retorno.data; | |
1701 | 1702 | ins = "<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>"; |
1702 | - for (ig=0;ig<obGrupos.grupos.length; ig++){ | |
1703 | + for (ig=0;ig<obGrupos.grupos.length; ig+=1){ | |
1703 | 1704 | if(obGrupos.grupos[ig].nome) |
1704 | 1705 | {ins += "<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>";} |
1705 | 1706 | i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1] = obGrupos.grupos[ig].temasgrupo; |
... | ... | @@ -1739,7 +1740,7 @@ i3GEO.arvoreDeTemas = { |
1739 | 1740 | ins = "<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",this.value)' ><option value='' >Escolha um sub-grupo:</option>"; |
1740 | 1741 | if (retorno.data.subgrupo){ |
1741 | 1742 | sg = retorno.data.subgrupo; |
1742 | - for (ig=0;ig<sg.length; ig++){ | |
1743 | + for (ig=0;ig<sg.length; ig+=1){ | |
1743 | 1744 | ins += "<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"; |
1744 | 1745 | } |
1745 | 1746 | } |
... | ... | @@ -1780,15 +1781,15 @@ i3GEO.arvoreDeTemas = { |
1780 | 1781 | var combo = function(retorno){ |
1781 | 1782 | var ins,sg,ig,temas; |
1782 | 1783 | ins = "<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"; |
1783 | - if(retorno.data != undefined) | |
1784 | + if(typeof(retorno.data) !== 'undefined') | |
1784 | 1785 | {retorno = retorno.data.temas;} |
1785 | 1786 | sg = retorno.length; |
1786 | - for (ig=0;ig<sg; ig++){ | |
1787 | + for (ig=0;ig<sg; ig+=1){ | |
1787 | 1788 | ins += "<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"; |
1788 | 1789 | } |
1789 | 1790 | $i(idDestino).innerHTML = ins+"</select>"; |
1790 | 1791 | }; |
1791 | - if(temas == undefined) | |
1792 | + if(typeof(temas) === 'undefined') | |
1792 | 1793 | {i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo);} |
1793 | 1794 | else |
1794 | 1795 | {combo(temas);} |
... | ... | @@ -1895,8 +1896,7 @@ i3GEO.arvoreDeTemas = { |
1895 | 1896 | Abre o aplicativo datadownload |
1896 | 1897 | */ |
1897 | 1898 | downloadbase: function() |
1898 | - {window.open(i3GEO.configura.locaplic+"/datadownload.htm");} | |
1899 | - , | |
1899 | + {window.open(i3GEO.configura.locaplic+"/datadownload.htm");}, | |
1900 | 1900 | /* |
1901 | 1901 | Function: uploadgpx |
1902 | 1902 | ... | ... |
classesjs/classe_barradebotoes.js
... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se não, escreva para a |
29 | 29 | Free Software Foundation, Inc., no endereço |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | -if(typeof(i3GEO) == 'undefined'){ | |
32 | +if(typeof(i3GEO) === 'undefined'){ | |
33 | 33 | i3GEO = []; |
34 | 34 | } |
35 | 35 | /* |
... | ... | @@ -273,7 +273,7 @@ i3GEO.barraDeBotoes = { |
273 | 273 | Tipo: |
274 | 274 | {string} |
275 | 275 | */ |
276 | - TEMPLATEBOTAO: "", | |
276 | + TEMPLATEBOTAO: "", | |
277 | 277 | /* |
278 | 278 | Propriedade: BOTAOPADRAO |
279 | 279 | |
... | ... | @@ -353,11 +353,11 @@ i3GEO.barraDeBotoes = { |
353 | 353 | var estilo,temp,ist,cor,ko; |
354 | 354 | i3GEO.barraDeBotoes.BOTAOCLICADO = icone; |
355 | 355 | ko = i3GEO.barraDeBotoes.LISTABOTOES.length-1; |
356 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "padrao"){ | |
356 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO === "padrao"){ | |
357 | 357 | if(ko >= 0){ |
358 | 358 | do{ |
359 | 359 | temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); |
360 | - if (i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico" && temp){ | |
360 | + if (i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico" && temp){ | |
361 | 361 | ist = temp.style; |
362 | 362 | ist.borderWidth="1px"; |
363 | 363 | ist.borderColor='white'; |
... | ... | @@ -378,7 +378,7 @@ i3GEO.barraDeBotoes = { |
378 | 378 | } |
379 | 379 | } |
380 | 380 | } |
381 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "destacado"){ | |
381 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO === "destacado"){ | |
382 | 382 | if(ko >= 0){ |
383 | 383 | do{ |
384 | 384 | temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); |
... | ... | @@ -399,7 +399,7 @@ i3GEO.barraDeBotoes = { |
399 | 399 | } |
400 | 400 | } |
401 | 401 | } |
402 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "laranja" || i3GEO.barraDeBotoes.COMPORTAMENTO == "vermelho" || i3GEO.barraDeBotoes.COMPORTAMENTO == "cinza"){ | |
402 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO === "laranja" || i3GEO.barraDeBotoes.COMPORTAMENTO === "vermelho" || i3GEO.barraDeBotoes.COMPORTAMENTO === "cinza"){ | |
403 | 403 | if(ko >= 0){ |
404 | 404 | do{ |
405 | 405 | temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); |
... | ... | @@ -416,9 +416,9 @@ i3GEO.barraDeBotoes = { |
416 | 416 | } |
417 | 417 | while(ko--); |
418 | 418 | } |
419 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "laranja"){cor = "orange";} | |
420 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "vermelho"){cor = "red";} | |
421 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "cinza"){cor = "gray";} | |
419 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO === "laranja"){cor = "orange";} | |
420 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO === "vermelho"){cor = "red";} | |
421 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO === "cinza"){cor = "gray";} | |
422 | 422 | //ativa o icone |
423 | 423 | if($i(icone)){ |
424 | 424 | estilo = $i(icone).style; |
... | ... | @@ -464,7 +464,7 @@ i3GEO.barraDeBotoes = { |
464 | 464 | } |
465 | 465 | if(l[b].funcaoonclick){ |
466 | 466 | $i(l[b].iddiv).onclick = l[b].funcaoonclick; |
467 | - if(l[b].iddiv == padrao) | |
467 | + if(l[b].iddiv === padrao) | |
468 | 468 | {l[b].funcaoonclick();} |
469 | 469 | } |
470 | 470 | if(l[b].constroiconteudo) |
... | ... | @@ -473,7 +473,7 @@ i3GEO.barraDeBotoes = { |
473 | 473 | } |
474 | 474 | while (b--); |
475 | 475 | } |
476 | - if(padrao == "") | |
476 | + if(padrao === "") | |
477 | 477 | {i3GEO.barraDeBotoes.ativaIcone("");} |
478 | 478 | }, |
479 | 479 | /* |
... | ... | @@ -538,12 +538,12 @@ i3GEO.barraDeBotoes = { |
538 | 538 | temp = ""; |
539 | 539 | chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO); |
540 | 540 | n = chaves.length; |
541 | - for(i=0;i<n;i++){ | |
542 | - if(eval("i3GEO.barraDeBotoes.INCLUIBOTAO."+chaves[i]) == true){ | |
541 | + for(i=0;i<n;i+=1){ | |
542 | + if(eval("i3GEO.barraDeBotoes.INCLUIBOTAO."+chaves[i]) === true){ | |
543 | 543 | temp += i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i]); |
544 | 544 | } |
545 | 545 | } |
546 | - if(onde == undefined){ | |
546 | + if(typeof(onde) === 'undefined'){ | |
547 | 547 | novoel = document.createElement("div"); |
548 | 548 | novoel.id = "barraDeBotoes2"; |
549 | 549 | estilo = "font-size:2px;"; |
... | ... | @@ -562,7 +562,7 @@ i3GEO.barraDeBotoes = { |
562 | 562 | } |
563 | 563 | } |
564 | 564 | else{ |
565 | - if(idconteudo === "barraDeBotoes2" && onde != undefined){ | |
565 | + if(idconteudo === "barraDeBotoes2" && onde !== undefined){ | |
566 | 566 | $i(onde).innerHTML = $i(idconteudo); |
567 | 567 | } |
568 | 568 | } |
... | ... | @@ -612,7 +612,7 @@ i3GEO.barraDeBotoes = { |
612 | 612 | nelementos = elementos.length; |
613 | 613 | //faz o cálculo do número de botões que devem ficar visíveis em função do tamanho da barra |
614 | 614 | if(i3GEO.barraDeBotoes.AUTOALTURA === true ||(numerobotoes < nelementos)){ |
615 | - if(elementos[0].id == "sobeferramentas"){ | |
615 | + if(elementos[0].id === "sobeferramentas"){ | |
616 | 616 | try{ |
617 | 617 | elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
618 | 618 | nelementos = elementos.length; |
... | ... | @@ -628,8 +628,8 @@ i3GEO.barraDeBotoes = { |
628 | 628 | i = i + 1; |
629 | 629 | } |
630 | 630 | while(i < numerobotoes-1); |
631 | - }catch(e){ | |
632 | - if(typeof(console) !== 'undefined'){console.error(e);} | |
631 | + }catch(men){ | |
632 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
633 | 633 | } |
634 | 634 | } |
635 | 635 | } |
... | ... | @@ -646,18 +646,15 @@ i3GEO.barraDeBotoes = { |
646 | 646 | if(i3GEO.barraDeBotoes.SOICONES === true){ |
647 | 647 | YAHOO.util.Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0"); |
648 | 648 | } |
649 | - if((barraZoom === true) && i3GEO.Interface.ATUAL == "padrao") | |
649 | + if((barraZoom === true) && i3GEO.Interface.ATUAL === "padrao") | |
650 | 650 | {i3GEO.navega.barraDeZoom.ativa();} |
651 | 651 | YAHOO.janelaBotoes.xp.panel.render(); |
652 | - if(i3GEO.barraDeBotoes.AUTOALTURA === true){ | |
653 | - //YAHOO.util.Dom.setStyle("i3geo_barra2","height",i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - 1 + "px"); | |
654 | - } | |
655 | 652 | YAHOO.janelaBotoes.xp.panel.moveTo(x,y); |
656 | 653 | if($i("sobeferramentas")){ |
657 | 654 | $i("sobeferramentas").onclick = function(){ |
658 | 655 | elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
659 | 656 | nelementos = elementos.length; |
660 | - if(elementos[0].style.display == "inline" && elementos[0].id === "") | |
657 | + if(elementos[0].style.display === "inline" && elementos[0].id === "") | |
661 | 658 | {return;} |
662 | 659 | if(nelementos > 0){ |
663 | 660 | mostra = elementos[0]; |
... | ... | @@ -695,7 +692,7 @@ i3GEO.barraDeBotoes = { |
695 | 692 | tipo = "inline"; |
696 | 693 | if($i(idconteudonovo+"_")){ |
697 | 694 | elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
698 | - if(elementos[elementos.length - 1].style.display == tipo) | |
695 | + if(elementos[elementos.length - 1].style.display === tipo) | |
699 | 696 | {return;} |
700 | 697 | nelementos = elementos.length; |
701 | 698 | if(nelementos > 0){ |
... | ... | @@ -704,7 +701,7 @@ i3GEO.barraDeBotoes = { |
704 | 701 | do{ |
705 | 702 | e = elementos[i]; |
706 | 703 | if(e.style){ |
707 | - if((e.style.display == "block") || (e.style.display == "inline") || (e.style.display === "")){ | |
704 | + if((e.style.display === "block") || (e.style.display === "inline") || (e.style.display === "")){ | |
708 | 705 | if(e.id === "") |
709 | 706 | {e.style.display="none";break;} |
710 | 707 | } |
... | ... | @@ -718,9 +715,9 @@ i3GEO.barraDeBotoes = { |
718 | 715 | do{ |
719 | 716 | e = elementos[i]; |
720 | 717 | if(e.style){ |
721 | - if(e.style.display == tipo) | |
718 | + if(e.style.display === tipo) | |
722 | 719 | {break;} |
723 | - if(e.style.display == "none") | |
720 | + if(e.style.display === "none") | |
724 | 721 | {mostra = e;} |
725 | 722 | } |
726 | 723 | i = i - 1; |
... | ... | @@ -795,11 +792,11 @@ i3GEO.barraDeBotoes = { |
795 | 792 | var abre = function(){ |
796 | 793 | var i, |
797 | 794 | n = i3GEO.barraDeBotoes.BARRAS.length; |
798 | - for(i=0;i<n;i++) | |
795 | + for(i=0;i<n;i+=1) | |
799 | 796 | {i3GEO.barraDeBotoes.BARRAS[i].show();} |
800 | 797 | }; |
801 | 798 | try{ |
802 | - if(arguments.length == 1) | |
799 | + if(arguments.length === 1) | |
803 | 800 | {i3GEO.barraDeBotoes.BARRAS[indice].show();} |
804 | 801 | else{ |
805 | 802 | abre.call(); |
... | ... | @@ -820,8 +817,8 @@ i3GEO.barraDeBotoes = { |
820 | 817 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.recria()");} |
821 | 818 | var n,temp,novoel,barraZoom,x,y; |
822 | 819 | n = i3GEO.barraDeBotoes.BARRAS.length; |
823 | - for(i=0;i<n;i++){ | |
824 | - if(i3GEO.barraDeBotoes.BARRAS[i].id == id){ | |
820 | + for(i=0;i<n;i+=1){ | |
821 | + if(i3GEO.barraDeBotoes.BARRAS[i].id === id){ | |
825 | 822 | //remove o menu de contexto |
826 | 823 | i3GEO.util.removeChild("contexto_"+id); |
827 | 824 | novoel = document.createElement("div"); |
... | ... | @@ -833,7 +830,7 @@ i3GEO.barraDeBotoes = { |
833 | 830 | temp = $i("vertMaisZoom"); |
834 | 831 | if(temp){ |
835 | 832 | temp = navm ? temp.parentNode : temp.parentNode.parentNode; |
836 | - if(temp.id == id) | |
833 | + if(temp.id === id) | |
837 | 834 | {barraZoom = true;} |
838 | 835 | } |
839 | 836 | x = parseInt($i(i3GEO.barraDeBotoes.BARRAS[i].id+"_c").style.left,10); |
... | ... | @@ -856,8 +853,8 @@ i3GEO.barraDeBotoes = { |
856 | 853 | fecha: function(id){ |
857 | 854 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.fecha()");} |
858 | 855 | var n = i3GEO.barraDeBotoes.BARRAS.length; |
859 | - for(i=0;i<n;i++){ | |
860 | - if(i3GEO.barraDeBotoes.BARRAS[i].id == id){ | |
856 | + for(i=0;i<n;i+=1){ | |
857 | + if(i3GEO.barraDeBotoes.BARRAS[i].id === id){ | |
861 | 858 | $i(id+"_c").style.visibility = "hidden"; |
862 | 859 | } |
863 | 860 | } |
... | ... | @@ -865,12 +862,12 @@ i3GEO.barraDeBotoes = { |
865 | 862 | mostraJanela: function(objeto,mensagem){ |
866 | 863 | var divmensagem = $i("divMensagemBarraDeBotoes"), |
867 | 864 | pos = YAHOO.util.Dom.getXY(objeto); |
868 | - if(i3GEO.barraDeBotoes.AJUDA == false || $i("janelaMenTexto")){ | |
865 | + if(i3GEO.barraDeBotoes.AJUDA === false || $i("janelaMenTexto")){ | |
869 | 866 | i3GEO.ajuda.mostraJanela(mensagem); |
870 | 867 | i3GEO.barraDeBotoes.escondeJanelaAjuda(); |
871 | 868 | return; |
872 | 869 | } |
873 | - if(i3GEO.Interface.ATUAL == "googleearth"){ | |
870 | + if(i3GEO.Interface.ATUAL === "googleearth"){ | |
874 | 871 | objeto.title = mensagem; |
875 | 872 | return; |
876 | 873 | } |
... | ... | @@ -884,17 +881,17 @@ i3GEO.barraDeBotoes = { |
884 | 881 | {$i("i3geo").appendChild(divmensagem);} |
885 | 882 | else |
886 | 883 | {document.body.appendChild(divmensagem);} |
887 | - if(i3GEO.barraDeBotoes.TIPOAJUDA == "horizontal") | |
884 | + if(i3GEO.barraDeBotoes.TIPOAJUDA === "horizontal") | |
888 | 885 | {divmensagem.innerHTML = "<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>";} |
889 | - if(i3GEO.barraDeBotoes.TIPOAJUDA == "vertical") | |
886 | + if(i3GEO.barraDeBotoes.TIPOAJUDA === "vertical") | |
890 | 887 | {divmensagem.innerHTML = "<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>";} |
891 | 888 | } |
892 | - if(mensagem != ""){ | |
893 | - if(i3GEO.barraDeBotoes.TIPOAJUDA == "horizontal"){ | |
889 | + if(mensagem !== ""){ | |
890 | + if(i3GEO.barraDeBotoes.TIPOAJUDA === "horizontal"){ | |
894 | 891 | divmensagem.style.left = parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px"; |
895 | 892 | divmensagem.style.top = pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10) / 2)+"px"; |
896 | 893 | } |
897 | - if(i3GEO.barraDeBotoes.TIPOAJUDA == "vertical"){ | |
894 | + if(i3GEO.barraDeBotoes.TIPOAJUDA === "vertical"){ | |
898 | 895 | divmensagem.style.left = (parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px"; |
899 | 896 | divmensagem.style.top = pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"; |
900 | 897 | } | ... | ... |
classesjs/classe_calculo.js
... | ... | @@ -29,7 +29,7 @@ GNU junto com este programa; se não, escreva para a |
29 | 29 | Free Software Foundation, Inc., no endereço |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | -if(typeof(i3GEO) == 'undefined'){ | |
32 | +if(typeof(i3GEO) === 'undefined'){ | |
33 | 33 | i3GEO = []; |
34 | 34 | } |
35 | 35 | /* |
... | ... | @@ -82,7 +82,7 @@ i3GEO.calculo = { |
82 | 82 | spm = cs / 3600; |
83 | 83 | mpg = cm / 60; |
84 | 84 | dd = (cd * 1) + (mpg * 1) + (spm * 1); |
85 | - if (sinal == 'negativo') | |
85 | + if (sinal === 'negativo') | |
86 | 86 | {dd = dd * -1;} |
87 | 87 | return (dd); |
88 | 88 | } |
... | ... | @@ -112,27 +112,27 @@ i3GEO.calculo = { |
112 | 112 | dd2tela: function (vx,vy,docmapa,ext,cellsize){ |
113 | 113 | try{ |
114 | 114 | var pos,latlng,xyn,dc,imgext,c,xy; |
115 | - if(i3GEO.Interface.ATUAL == "googlemaps" && docmapa.id != "mapaReferencia"){ | |
115 | + if(i3GEO.Interface.ATUAL === "googlemaps" && docmapa.id !== "mapaReferencia"){ | |
116 | 116 | pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); |
117 | 117 | xyn = i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx)); |
118 | 118 | xy = []; |
119 | 119 | return [(xyn.x)+pos[0],(xyn.y)+pos[1]]; |
120 | 120 | } |
121 | - if(i3GEO.Interface.ATUAL == "openlayers" && docmapa.id != "mapaReferencia"){ | |
121 | + if(i3GEO.Interface.ATUAL === "openlayers" && docmapa.id !== "mapaReferencia"){ | |
122 | 122 | pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); |
123 | 123 | xy = i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy)); |
124 | 124 | return [(xy.x)+pos[0],(xy.y)+pos[1]]; |
125 | 125 | } |
126 | - if(arguments.length == 3){ | |
126 | + if(arguments.length === 3){ | |
127 | 127 | ext = i3GEO.parametros.mapexten; |
128 | 128 | cellsize = i3GEO.parametros.pixelsize; |
129 | 129 | } |
130 | - if(arguments.length == 4){ | |
130 | + if(arguments.length === 4){ | |
131 | 131 | cellsize = i3GEO.parametros.pixelsize; |
132 | 132 | } |
133 | 133 | if(!docmapa) |
134 | 134 | {docmapa = window.document;} |
135 | - dc = docmapa; | |
135 | + dc = docmapa; | |
136 | 136 | pos = i3GEO.util.pegaPosicaoObjeto(dc); |
137 | 137 | imgext = ext.split(" "); |
138 | 138 | vx = (vx * 1) - (imgext[0] * 1); |
... | ... | @@ -225,11 +225,11 @@ i3GEO.calculo = { |
225 | 225 | try |
226 | 226 | { |
227 | 227 | var amext,longdd,latdd; |
228 | - if(i3GEO.Interface.ATUAL == "googlemaps" && arguments.length == 4){ | |
228 | + if(i3GEO.Interface.ATUAL === "googlemaps" && arguments.length === 4){ | |
229 | 229 | amext = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign)); |
230 | 230 | return [amext.lng(),amext.lat()]; |
231 | 231 | } |
232 | - if(i3GEO.Interface.ATUAL == "openlayers" && arguments.length == 4){ | |
232 | + if(i3GEO.Interface.ATUAL === "openlayers" && arguments.length === 4){ | |
233 | 233 | amext = i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign)); |
234 | 234 | return [amext.lon,amext.lat]; |
235 | 235 | } |
... | ... | @@ -279,7 +279,7 @@ i3GEO.calculo = { |
279 | 279 | pontos.xtela.push(pontos.xtela[0]); |
280 | 280 | pontos.ytela.push(pontos.ytela[0]); |
281 | 281 | $polygon_area = 0; |
282 | - for ($i=0;$i < $array_length;$i++) | |
282 | + for ($i=0;$i < $array_length;$i+=1) | |
283 | 283 | {$polygon_area += ((pontos.xtela[$i] * pontos.ytela[$i+1])-(pontos.ytela[$i] * pontos.xtela[$i+1]));} |
284 | 284 | $polygon_area = Math.abs($polygon_area) / 2; |
285 | 285 | } |
... | ... | @@ -347,8 +347,8 @@ i3GEO.calculo = { |
347 | 347 | dLat = ((lat2-lat1))* Math.PI / 180; |
348 | 348 | dLon = ((lon2-lon1)) * Math.PI / 180; |
349 | 349 | a = Math.sin(dLat/2) * Math.sin(dLat/2) + |
350 | - Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * | |
351 | - Math.sin(dLon/2) * Math.sin(dLon/2); | |
350 | + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * | |
351 | + Math.sin(dLon/2) * Math.sin(dLon/2); | |
352 | 352 | c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); |
353 | 353 | d = 6378.137 * c; |
354 | 354 | return d; |
... | ... | @@ -379,55 +379,71 @@ i3GEO.calculo = { |
379 | 379 | coordinates (decimal degrees) and the return distance is in kilometers. |
380 | 380 | */ |
381 | 381 | distVincenty: function(lon1,lat1,lon2,lat2) { |
382 | - var rad = function(x) {return x*Math.PI/180;}; | |
383 | - var ct = { | |
384 | - a: 6378137, | |
385 | - b: 6356752.3142, | |
386 | - f: 1/298.257223563 | |
387 | - }; | |
388 | - var p1 = { | |
389 | - lat: lat1, | |
390 | - lon: lon1 | |
391 | - }; | |
392 | - var p2 = { | |
393 | - lat: lat2, | |
394 | - lon: lon2 | |
395 | - }; | |
396 | - var a = ct.a, b = ct.b, f = ct.f; | |
397 | - var L = rad(p2.lon - p1.lon); | |
398 | - var U1 = Math.atan((1-f) * Math.tan(rad(p1.lat))); | |
399 | - var U2 = Math.atan((1-f) * Math.tan(rad(p2.lat))); | |
400 | - var sinU1 = Math.sin(U1), cosU1 = Math.cos(U1); | |
401 | - var sinU2 = Math.sin(U2), cosU2 = Math.cos(U2); | |
402 | - var lambda = L, lambdaP = 2*Math.PI; | |
403 | - var iterLimit = 20; | |
382 | + var rad = function(x) {return x*Math.PI/180;}, | |
383 | + ct = { | |
384 | + a: 6378137, | |
385 | + b: 6356752.3142, | |
386 | + f: 1/298.257223563 | |
387 | + }, | |
388 | + p1 = { | |
389 | + lat: lat1, | |
390 | + lon: lon1 | |
391 | + }, | |
392 | + p2 = { | |
393 | + lat: lat2, | |
394 | + lon: lon2 | |
395 | + }, | |
396 | + a = ct.a, b = ct.b, f = ct.f, | |
397 | + L = rad(p2.lon - p1.lon), | |
398 | + U1 = Math.atan((1-f) * Math.tan(rad(p1.lat))), | |
399 | + U2 = Math.atan((1-f) * Math.tan(rad(p2.lat))), | |
400 | + sinU1 = Math.sin(U1), cosU1 = Math.cos(U1), | |
401 | + sinU2 = Math.sin(U2), cosU2 = Math.cos(U2), | |
402 | + lambda = L, lambdaP = 2*Math.PI, | |
403 | + iterLimit = 20, | |
404 | + sinLambda, | |
405 | + cosLambda, | |
406 | + sinSigma, | |
407 | + cosSigma, | |
408 | + sigma, | |
409 | + alpha, | |
410 | + cosSqAlpha, | |
411 | + cos2SigmaM, | |
412 | + C, | |
413 | + uSq, | |
414 | + A, | |
415 | + B, | |
416 | + s, | |
417 | + d, | |
418 | + deltaSigma; | |
404 | 419 | while (Math.abs(lambda-lambdaP) > 1e-12 && --iterLimit>0) { |
405 | - var sinLambda = Math.sin(lambda), cosLambda = Math.cos(lambda); | |
406 | - var sinSigma = Math.sqrt((cosU2*sinLambda) * (cosU2*sinLambda) + | |
420 | + sinLambda = Math.sin(lambda); | |
421 | + cosLambda = Math.cos(lambda); | |
422 | + sinSigma = Math.sqrt((cosU2*sinLambda) * (cosU2*sinLambda) + | |
407 | 423 | (cosU1*sinU2-sinU1*cosU2*cosLambda) * (cosU1*sinU2-sinU1*cosU2*cosLambda)); |
408 | - if (sinSigma==0) { | |
424 | + if (sinSigma===0) { | |
409 | 425 | return 0; // co-incident points |
410 | 426 | } |
411 | - var cosSigma = sinU1*sinU2 + cosU1*cosU2*cosLambda; | |
412 | - var sigma = Math.atan2(sinSigma, cosSigma); | |
413 | - var alpha = Math.asin(cosU1 * cosU2 * sinLambda / sinSigma); | |
414 | - var cosSqAlpha = Math.cos(alpha) * Math.cos(alpha); | |
415 | - var cos2SigmaM = cosSigma - 2*sinU1*sinU2/cosSqAlpha; | |
416 | - var C = f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha)); | |
427 | + cosSigma = sinU1*sinU2 + cosU1*cosU2*cosLambda; | |
428 | + sigma = Math.atan2(sinSigma, cosSigma); | |
429 | + alpha = Math.asin(cosU1 * cosU2 * sinLambda / sinSigma); | |
430 | + cosSqAlpha = Math.cos(alpha) * Math.cos(alpha); | |
431 | + cos2SigmaM = cosSigma - 2*sinU1*sinU2/cosSqAlpha; | |
432 | + C = f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha)); | |
417 | 433 | lambdaP = lambda; |
418 | 434 | lambda = L + (1-C) * f * Math.sin(alpha) * |
419 | 435 | (sigma + C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM))); |
420 | 436 | } |
421 | - if (iterLimit==0) { | |
437 | + if (iterLimit===0) { | |
422 | 438 | return NaN; // formula failed to converge |
423 | 439 | } |
424 | - var uSq = cosSqAlpha * (a*a - b*b) / (b*b); | |
425 | - var A = 1 + uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq))); | |
426 | - var B = uSq/1024 * (256+uSq*(-128+uSq*(74-47*uSq))); | |
427 | - var deltaSigma = B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- | |
440 | + uSq = cosSqAlpha * (a*a - b*b) / (b*b); | |
441 | + A = 1 + uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq))); | |
442 | + B = uSq/1024 * (256+uSq*(-128+uSq*(74-47*uSq))); | |
443 | + deltaSigma = B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- | |
428 | 444 | B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM))); |
429 | - var s = b*A*(sigma-deltaSigma); | |
430 | - var d = s.toFixed(3)/1000; // round to 1mm precision | |
445 | + s = b*A*(sigma-deltaSigma); | |
446 | + d = s.toFixed(3)/1000; // round to 1mm precision | |
431 | 447 | return d; |
432 | 448 | }, |
433 | 449 | /* |
... | ... | @@ -498,9 +514,9 @@ i3GEO.calculo = { |
498 | 514 | if(typeof(console) !== 'undefined'){console.info("i3GEO.calculo.destinoDD()");} |
499 | 515 | var R,lat1,lon1,brng,lat2,lon2; |
500 | 516 | R = 6371; // earth's mean radius in km |
501 | - lat1 = lat * (Math.PI / 180); | |
502 | - lon1 = lon * (Math.PI / 180); | |
503 | - brng = direcao * (Math.PI / 180); | |
517 | + lat1 = lat * (Math.PI / 180); | |
518 | + lon1 = lon * (Math.PI / 180); | |
519 | + brng = direcao * (Math.PI / 180); | |
504 | 520 | lat2 = Math.asin( Math.sin(lat1)*Math.cos(d/R) + Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng) ); |
505 | 521 | lon2 = lon1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2)); |
506 | 522 | lon2 = (lon2+Math.PI)%(2*Math.PI) - Math.PI; // normalise to -180...+180 |
... | ... | @@ -528,8 +544,8 @@ i3GEO.calculo = { |
528 | 544 | rect2ext: function(idrect,mapext,pixel){ |
529 | 545 | if(typeof(console) !== 'undefined'){console.info("i3GEO.calculo.rect2ext()");} |
530 | 546 | var bx,bxs,xfig,yfig,nx,ny,pix,piy,pos,amext,dx,dy,x1,y1,x2,y2; |
531 | - eval ('pix = parseInt(document.getElementById("'+idrect+'").style.' + g_tipoleft + ")"); | |
532 | - eval ('piy = parseInt(document.getElementById("'+idrect+'").style.' + g_tipotop + ")"); | |
547 | + eval('pix = parseInt(document.getElementById("'+idrect+'").style.' + g_tipoleft + ',10);'); | |
548 | + eval('piy = parseInt(document.getElementById("'+idrect+'").style.' + g_tipotop + ',10);'); | |
533 | 549 | if($i(idrect)){ |
534 | 550 | bx = $i(idrect); |
535 | 551 | bxs = bx.style; |
... | ... | @@ -580,15 +596,15 @@ i3GEO.calculo = { |
580 | 596 | {Array} - width,heigth,top,left |
581 | 597 | */ |
582 | 598 | ext2rect: function(idrect,mapext,boxext,pixel,documento){ |
583 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.calculo.ext2rect()");} | |
584 | - var rectbox,rectmap,xyMin,xyMax,w,h,tl,pos,t,l,d,box; | |
585 | - rectbox = boxext.split(" "); | |
586 | - rectmap = mapext.split(" "); | |
587 | - xyMin = i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel); | |
588 | - xyMax = i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel); | |
599 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.calculo.ext2rect()");} | |
600 | + var rectbox,rectmap,xyMin,xyMax,w,h,tl,pos,t,l,d,box; | |
601 | + rectbox = boxext.split(" "); | |
602 | + rectmap = mapext.split(" "); | |
603 | + xyMin = i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel); | |
604 | + xyMax = i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel); | |
589 | 605 | w = xyMax[0]-xyMin[0]; |
590 | 606 | h = xyMin[1]-xyMax[1]; |
591 | - tl = i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel); | |
607 | + tl = i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel); | |
592 | 608 | |
593 | 609 | pos = i3GEO.util.pegaPosicaoObjeto(documento); |
594 | 610 | t = tl[1] - pos[1]; |
... | ... | @@ -600,8 +616,8 @@ i3GEO.calculo = { |
600 | 616 | box.style.height = h; |
601 | 617 | box.style.top = t + "px"; |
602 | 618 | box.style.left = l + "px"; |
603 | - box.style.display=d; | |
604 | - } | |
619 | + box.style.display=d; | |
620 | + } | |
605 | 621 | return [w,h,xyMax[1],xyMin[0]]; |
606 | 622 | } |
607 | 623 | }; | ... | ... |
classesjs/classe_configura.js
... | ... | @@ -92,7 +92,7 @@ i3GEO.configura = { |
92 | 92 | |
93 | 93 | {nome:$trad("s1"),id:"ajudas"} |
94 | 94 | |
95 | - ], | |
95 | + ], | |
96 | 96 | |
97 | 97 | submenus:{ |
98 | 98 | |
... | ... | @@ -115,10 +115,10 @@ i3GEO.configura = { |
115 | 115 | menu:[ |
116 | 116 | {nome:$trad("s1"),id:"ajudaMenu"}, |
117 | 117 | {nome:$trad("s2"),id:"analise"}, |
118 | - {nome:$trad("s3"),id:"janelas"}, | |
119 | - {nome:$trad("s4"),id:"arquivos"}, | |
120 | - {nome:$trad("d32"),id:"interface"} | |
121 | - ], | |
118 | + {nome:$trad("s3"),id:"janelas"}, | |
119 | + {nome:$trad("s4"),id:"arquivos"}, | |
120 | + {nome:$trad("d32"),id:"interface"} | |
121 | + ], | |
122 | 122 | submenus:{ |
123 | 123 | "ajudaMenu": [ |
124 | 124 | { id:"omenudataAjudamenu1",text: $trad("u1"), url: "http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332", target:"_blank" }, |
... | ... | @@ -130,19 +130,19 @@ i3GEO.configura = { |
130 | 130 | { id:"omenudataAjudamenu8",text: $trad("u5c"), url: "javascript:i3GEO.ajuda.redesSociais()" } |
131 | 131 | ], |
132 | 132 | "analise": [ |
133 | - { id:"omenudataAnalise1",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url: "#"}, | |
133 | + { id:"omenudataAnalise1",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url: "#"}, | |
134 | 134 | { id:"omenudataAnalise2",text: $trad("u7"), url: "javascript:i3GEO.analise.dialogo.gradePol()"}, |
135 | 135 | { id:"omenudataAnalise3",text: $trad("u8"), url: "javascript:i3GEO.analise.dialogo.gradePontos()" }, |
136 | 136 | { id:"omenudataAnalise4",text: $trad("u9"), url: "javascript:i3GEO.analise.dialogo.gradeHex()" }, |
137 | - { id:"omenudataAnalise5",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url: "#"}, | |
137 | + { id:"omenudataAnalise5",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url: "#"}, | |
138 | 138 | { id:"omenudataAnalise6",text: $trad("u11a"), url: "javascript:i3GEO.analise.dialogo.distanciaptpt()" }, |
139 | 139 | { id:"omenudataAnalise7",text: $trad("u12"), url: "javascript:i3GEO.analise.dialogo.nptPol()" }, |
140 | 140 | { id:"omenudataAnalise8",text: $trad("u13"), url: "javascript:i3GEO.analise.dialogo.pontoempoligono()" }, |
141 | 141 | { id:"omenudataAnalise9",text: $trad("u14"), url: "javascript:i3GEO.analise.dialogo.pontosdistri()" }, |
142 | 142 | { id:"omenudataAnalise9a",text: $trad("u28"), url: "javascript:i3GEO.analise.dialogo.centromassa()" }, |
143 | - { id:"omenudataAnalise10",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url: "#"}, | |
143 | + { id:"omenudataAnalise10",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url: "#"}, | |
144 | 144 | { id:"omenudataAnalise11",text: $trad("u25"), url: "javascript:i3GEO.analise.dialogo.dissolve()" }, |
145 | - { id:"omenudataAnalise12",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url: "#"}, | |
145 | + { id:"omenudataAnalise12",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url: "#"}, | |
146 | 146 | { id:"omenudataAnalise13",text: $trad("u6"), url: "javascript:i3GEO.analise.dialogo.analisaGeometrias()" }, |
147 | 147 | { id:"omenudataAnalise14",text: $trad("u10"), url: "javascript:i3GEO.analise.dialogo.buffer()" }, |
148 | 148 | { id:"omenudataAnalise15",text: $trad("u26"), url: "javascript:i3GEO.analise.dialogo.agrupaElementos()" }, |
... | ... | @@ -152,7 +152,7 @@ i3GEO.configura = { |
152 | 152 | ], |
153 | 153 | "janelas": [ |
154 | 154 | { id:"omenudataJanelas1",text: $trad("u15"), url: "javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)" }, |
155 | - { id:"omenudataJanelas2",text: $trad("u16"), url: "javascript:i3GEO.ajuda.abreJanela()" } | |
155 | + { id:"omenudataJanelas2",text: $trad("u16"), url: "javascript:i3GEO.ajuda.abreJanela()" } | |
156 | 156 | ], |
157 | 157 | "arquivos": [ |
158 | 158 | { id:"omenudataArquivos1",text: $trad("u17"), url: "javascript:i3GEO.mapa.dialogo.salvaMapa()" }, |
... | ... | @@ -638,7 +638,7 @@ i3GEO.configura = { |
638 | 638 | {alert("Pressione a tecla CTRL junto com o botão esquerdo do mouse");return;} |
639 | 639 | var temp; |
640 | 640 | temp = "zoom"; |
641 | - if(i3GEO.Interface.ATIVAMENUCONTEXTO && i3GEO.Interface.ATUAL == "padrao") | |
641 | + if(i3GEO.Interface.ATIVAMENUCONTEXTO && i3GEO.Interface.ATUAL === "padrao") | |
642 | 642 | {temp = "zoom_contexto";} |
643 | 643 | i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); |
644 | 644 | g_operacao='navega'; |
... | ... | @@ -831,10 +831,11 @@ i3GEO.configura = { |
831 | 831 | } |
832 | 832 | var temp = function(){ |
833 | 833 | $i("i3GEOmarcaIdentifica").style.display = "none"; |
834 | - }; | |
834 | + }, | |
835 | + i; | |
835 | 836 | i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp); |
836 | 837 | i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica"); |
837 | - var i = $i("i3GEOmarcaIdentifica"); | |
838 | + i = $i("i3GEOmarcaIdentifica"); | |
838 | 839 | if(i){ |
839 | 840 | i.style.display = "block"; |
840 | 841 | } |
... | ... | @@ -854,7 +855,7 @@ i3GEO.configura = { |
854 | 855 | dica:$trad("d7a"), |
855 | 856 | funcaoonclick:function() |
856 | 857 | { |
857 | - if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS) == "") | |
858 | + if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS) === "") | |
858 | 859 | {alert($trad("d31"));return;} |
859 | 860 | var temp; |
860 | 861 | if($i(i3GEO.Interface.IDMAPA)){ |
... | ... | @@ -989,8 +990,8 @@ i3GEO.configura = { |
989 | 990 | if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()") < 0){ |
990 | 991 | i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()"); |
991 | 992 | if(i3GEO.Interface.ATUAL === "googlemaps"){ |
992 | - scieloDragend = GEvent.addListener(i3GeoMap, "dragend", function() {atualizascielo();}); | |
993 | - scieloZoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {atualizascielo();}); | |
993 | + scieloDragend = GEvent.addListener(i3GeoMap, "dragend", function() {atualizascielo();}); | |
994 | + scieloZoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {atualizascielo();}); | |
994 | 995 | } |
995 | 996 | } |
996 | 997 | } |
... | ... | @@ -1120,33 +1121,33 @@ i3GEO.configura = { |
1120 | 1121 | funcaoonclick:function(){ |
1121 | 1122 | if(i3GEO.Interface.ATUAL !== "googlemaps") |
1122 | 1123 | {alert("Operacao disponivel apenas na interface Google Maps");return;} |
1123 | - counterClick = 1; | |
1124 | - var parametrosRota = function(overlay,latlng){ | |
1125 | - var temp,janela; | |
1126 | - if(counterClick === 1){ | |
1127 | - counterClick++; | |
1128 | - alert("Clique o ponto de destino da rota"); | |
1129 | - pontoRota1 = latlng; | |
1130 | - return; | |
1131 | - } | |
1132 | - if(counterClick === 2){ | |
1133 | - pontoRota2 = latlng; | |
1134 | - counterClick = 0; | |
1135 | - GEvent.removeListener(rotaEvento); | |
1136 | - janela = i3GEO.janela.cria("300px","300px","","center","","Rota"); | |
1137 | - janela[2].style.overflow = "auto"; | |
1138 | - janela[2].style.height = "300px"; | |
1124 | + counterClick = 1; | |
1125 | + var parametrosRota = function(overlay,latlng){ | |
1126 | + var temp,janela; | |
1127 | + if(counterClick === 1){ | |
1128 | + counterClick++; | |
1129 | + alert("Clique o ponto de destino da rota"); | |
1130 | + pontoRota1 = latlng; | |
1131 | + return; | |
1132 | + } | |
1133 | + if(counterClick === 2){ | |
1134 | + pontoRota2 = latlng; | |
1135 | + counterClick = 0; | |
1136 | + GEvent.removeListener(rotaEvento); | |
1137 | + janela = i3GEO.janela.cria("300px","300px","","center","","Rota"); | |
1138 | + janela[2].style.overflow = "auto"; | |
1139 | + janela[2].style.height = "300px"; | |
1139 | 1140 | directions = new GDirections(i3GeoMap,janela[2]); |
1140 | 1141 | temp = function(){ |
1141 | 1142 | $i("wdoca_corpo").innerHTML = "Não foi possível criar a rota"; |
1142 | 1143 | }; |
1143 | 1144 | GEvent.addListener(directions, "error", temp); |
1144 | 1145 | directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng()); |
1145 | - //i3GeoMap.removeOverlay(directions) | |
1146 | - } | |
1147 | - }; | |
1148 | - rotaEvento = GEvent.addListener(i3GeoMap, "click", parametrosRota); | |
1149 | - alert("Clique o ponto de origem da rota"); | |
1146 | + //i3GeoMap.removeOverlay(directions) | |
1147 | + } | |
1148 | + }; | |
1149 | + rotaEvento = GEvent.addListener(i3GeoMap, "click", parametrosRota); | |
1150 | + alert("Clique o ponto de origem da rota"); | |
1150 | 1151 | } |
1151 | 1152 | } |
1152 | 1153 | ]} | ... | ... |
classesjs/classe_coordenadas.js
... | ... | @@ -225,18 +225,18 @@ i3GEO.coordenadas = { |
225 | 225 | mostraCoordenadasUTM: function(id){ |
226 | 226 | if(typeof(console) !== 'undefined'){console.info("i3GEO.coordenadas.mostraCoordenadasUTM()");} |
227 | 227 | try{ |
228 | - if(arguments.length === 0 || id === "" || id == undefined) | |
228 | + if(arguments.length === 0 || id === "" || typeof(id) === 'undefined') | |
229 | 229 | {id = i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml;} |
230 | 230 | else |
231 | 231 | {i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = id;} |
232 | - if (!$i(id) || i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml == ""){ | |
232 | + if (!$i(id) || i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml === ""){ | |
233 | 233 | if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()") >= 0) |
234 | 234 | {i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()");} |
235 | 235 | return; |
236 | 236 | } |
237 | 237 | atualizaCoordenadasUTM = function() |
238 | 238 | { |
239 | - if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml == ""){ | |
239 | + if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml === ""){ | |
240 | 240 | if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()") >= 0) |
241 | 241 | {i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()");} |
242 | 242 | return; |
... | ... | @@ -291,7 +291,7 @@ i3GEO.coordenadas = { |
291 | 291 | if(typeof(console) !== 'undefined'){console.info("i3GEO.coordenadas.mostraCoordenadasGEO()");} |
292 | 292 | try{ |
293 | 293 | var ins,temp; |
294 | - if(arguments.length === 0 || id === "" || id == undefined) | |
294 | + if(arguments.length === 0 || id === "" || typeof(id) === 'undefined') | |
295 | 295 | {id = i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml;} |
296 | 296 | else |
297 | 297 | {i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml = id;} |
... | ... | @@ -354,7 +354,7 @@ i3GEO.coordenadas = { |
354 | 354 | "<td>"+$inputText("","",prefixo+"ys","segundo","5","00.00")+"</td>"; |
355 | 355 | temp = 'var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i("'+prefixo+'xg").value,$i("'+prefixo+'xm").value,$i("'+prefixo+'xs").value);' + |
356 | 356 | 'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i("'+prefixo+'yg").value,$i("'+prefixo+'ym").value,$i("'+prefixo+'ys").value);' + |
357 | - 'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);'; | |
357 | + 'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);'; | |
358 | 358 | ins += '<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>' + |
359 | 359 | "<td>"+caixa+"<td>" + |
360 | 360 | "</tr></table>"; |
... | ... | @@ -424,6 +424,7 @@ i3GEO.coordenadas = { |
424 | 424 | |
425 | 425 | */ |
426 | 426 | atualizaProj4: function(onde,configProj,x,y){ |
427 | + var destino,zona,temp,p; | |
427 | 428 | try{ |
428 | 429 | if(!$i(onde+configProj+"ZN")) |
429 | 430 | {return;} |
... | ... | @@ -431,31 +432,31 @@ i3GEO.coordenadas = { |
431 | 432 | catch(e){return;} |
432 | 433 | eval("temp = i3GEO.coordenadas.config."+configProj+";"); |
433 | 434 | try{ |
434 | - if($i(onde+configProj).style.display == "none") | |
435 | + if($i(onde+configProj).style.display === "none") | |
435 | 436 | {return;} |
436 | 437 | } |
437 | - catch(e){} | |
438 | + catch(men){} | |
438 | 439 | if(temp.tipo === "metrica"){ |
439 | - var destino = temp.defepsg; | |
440 | + destino = temp.defepsg; | |
440 | 441 | } |
441 | - if(x == undefined) | |
442 | + if(typeof(x) === 'undefined') | |
442 | 443 | {x = objposicaocursor.ddx;} |
443 | - if(y == undefined) | |
444 | + if(typeof(y) === 'undefined') | |
444 | 445 | {y = objposicaocursor.ddy;} |
445 | 446 | if(temp.tipo === "utm"){ |
446 | - var zona = i3GEO.coordenadas.geo2zonaUtm(x); | |
447 | - $i(onde+configProj+"ZN").value = zona | |
447 | + zona = i3GEO.coordenadas.geo2zonaUtm(x); | |
448 | + $i(onde+configProj+"ZN").value = zona; | |
448 | 449 | if(objposicaocursor.ddy*1 > 0) |
449 | - {var destino = temp.zona[zona+"N"];} | |
450 | + {destino = temp.zona[zona+"N"];} | |
450 | 451 | else |
451 | - {var destino = temp.zona[zona+"S"];} | |
452 | - if(destino == undefined){ | |
452 | + {destino = temp.zona[zona+"S"];} | |
453 | + if(typeof(destino) === 'undefined'){ | |
453 | 454 | i3GEO.util.defineValor(onde+configProj+"X","value","?"); |
454 | 455 | i3GEO.util.defineValor(onde+configProj+"Y","value","?"); |
455 | 456 | return; |
456 | 457 | } |
457 | 458 | } |
458 | - var p = i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y); | |
459 | + p = i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y); | |
459 | 460 | i3GEO.util.defineValor(onde+configProj+"X","value",p.x); |
460 | 461 | i3GEO.util.defineValor(onde+configProj+"Y","value",p.y); |
461 | 462 | }, |
... | ... | @@ -507,7 +508,7 @@ i3GEO.coordenadas = { |
507 | 508 | for(i=0;i<n;i++){ |
508 | 509 | eval("temp = i3GEO.coordenadas.config."+tipos[i]+";"); |
509 | 510 | if(temp.ativo === true){ |
510 | - if(tipos[i] == i3GEO.coordenadas.padrao) | |
511 | + if(tipos[i] === i3GEO.coordenadas.padrao) | |
511 | 512 | {$i(prefixo+tipos[i]).style.display = "block";} |
512 | 513 | else |
513 | 514 | {$i(prefixo+tipos[i]).style.display = "none";} |
... | ... | @@ -550,10 +551,12 @@ i3GEO.coordenadas = { |
550 | 551 | n = tipos.length, |
551 | 552 | temp, |
552 | 553 | ins = "", |
553 | - i = 0; | |
554 | + i = 0, | |
555 | + caixa, | |
556 | + janela; | |
554 | 557 | if(arguments.length === 0){ |
555 | - var ativaMovimento = true; | |
556 | - var onde = ""; | |
558 | + ativaMovimento = true; | |
559 | + onde = ""; | |
557 | 560 | } |
558 | 561 | |
559 | 562 | // |
... | ... | @@ -561,7 +564,7 @@ i3GEO.coordenadas = { |
561 | 564 | // |
562 | 565 | if(onde === "") |
563 | 566 | {eval("onde = i3GEO.coordenadas.config."+tipos[0]+".idhtml;");} |
564 | - var caixa = "<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='font-size:10px;height:15px;width:50px;' ><option>---</option><option value='janela' >janela</option>"; | |
567 | + caixa = "<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='font-size:10px;height:15px;width:50px;' ><option>---</option><option value='janela' >janela</option>"; | |
565 | 568 | // |
566 | 569 | //cria a caixa de seleção |
567 | 570 | // |
... | ... | @@ -591,7 +594,7 @@ i3GEO.coordenadas = { |
591 | 594 | } |
592 | 595 | } |
593 | 596 | if(i3GEO.coordenadas.formato === "janela"){ |
594 | - var janela = i3GEO.janela.cria( | |
597 | + janela = i3GEO.janela.cria( | |
595 | 598 | "450px", |
596 | 599 | "90px", |
597 | 600 | "", |
... | ... | @@ -614,29 +617,29 @@ i3GEO.coordenadas = { |
614 | 617 | {$i(onde).innerHTML = "";} |
615 | 618 | onde = "i3GEOJanelaCoordenadas_corpo"; |
616 | 619 | } |
617 | - if(onde != "" && $i(onde)) | |
620 | + if(onde !== "" && $i(onde)) | |
618 | 621 | {$i(onde).innerHTML = ins;} |
619 | 622 | // |
620 | 623 | //aplica as funções de movimentação do mouse |
621 | 624 | // |
625 | + atualizaLocalizarGeo = function(id,x,y){ | |
626 | + if(typeof(x) === 'undefined') | |
627 | + {x = objposicaocursor.dmsx;} | |
628 | + if(typeof(y) === 'undefined') | |
629 | + {y = objposicaocursor.dmsy;} | |
630 | + temp = $i(id); | |
631 | + if(temp && temp.style.display === "block") | |
632 | + {i3GEO.coordenadas.atualizaGeo(x,y,id);} | |
633 | + }; | |
622 | 634 | for(i=0;i<n;i++){ |
623 | 635 | eval("temp = i3GEO.coordenadas.config."+tipos[i]+";"); |
624 | 636 | if(temp.ativo === true){ |
625 | 637 | if(temp.tipo === "geo"){ |
626 | - atualizaLocalizarGeo = function(id,x,y){ | |
627 | - if(x == undefined) | |
628 | - {x = objposicaocursor.dmsx;} | |
629 | - if(y == undefined) | |
630 | - {y = objposicaocursor.dmsy;} | |
631 | - temp = $i(id); | |
632 | - if(temp && temp.style.display == "block") | |
633 | - {i3GEO.coordenadas.atualizaGeo(x,y,id);} | |
634 | - }; | |
635 | 638 | if(ativaMovimento === true){ |
636 | 639 | if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')") < 0) |
637 | 640 | {i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')");} |
638 | 641 | } |
639 | - if(x != undefined){ | |
642 | + if(typeof(x) !== 'undefined'){ | |
640 | 643 | atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0]); |
641 | 644 | } |
642 | 645 | } |
... | ... | @@ -645,7 +648,7 @@ i3GEO.coordenadas = { |
645 | 648 | if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')") < 0) |
646 | 649 | {i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')");} |
647 | 650 | } |
648 | - if(x != undefined){ | |
651 | + if(typeof(x) !== 'undefined'){ | |
649 | 652 | i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y); |
650 | 653 | } |
651 | 654 | } |
... | ... | @@ -654,6 +657,6 @@ i3GEO.coordenadas = { |
654 | 657 | if(i3GEO.coordenadas.formato === "bloco") |
655 | 658 | {i3GEO.coordenadas.ativaBloco(onde);} |
656 | 659 | } |
657 | - catch(e){} | |
660 | + catch(men){} | |
658 | 661 | } |
659 | 662 | }; |
660 | 663 | \ No newline at end of file | ... | ... |
classesjs/classe_desenho.js
... | ... | @@ -123,7 +123,7 @@ i3GEO.desenho = { |
123 | 123 | // |
124 | 124 | i3GEO.eventos.ativa(divgeo); |
125 | 125 | } |
126 | - catch(erro){alert("Erro ao tentar criar container richdraw");} | |
126 | + catch(men){alert("Erro ao tentar criar container richdraw");} | |
127 | 127 | }, |
128 | 128 | /* |
129 | 129 | Function: criaDivContainer |
... | ... | @@ -164,7 +164,7 @@ i3GEO.desenho = { |
164 | 164 | ne.left=pos[0]; |
165 | 165 | document.body.appendChild(novoel); |
166 | 166 | } |
167 | - return ($i("divGeometriasTemp")); | |
167 | + return ($i("divGeometriasTemp")); | |
168 | 168 | }, |
169 | 169 | /* |
170 | 170 | Function: aplica |
... | ... | @@ -182,7 +182,7 @@ i3GEO.desenho = { |
182 | 182 | texto {string} - texto que será inserido no tipo "insereTexto" |
183 | 183 | */ |
184 | 184 | aplica: function(tipo,objeto,n,texto){ |
185 | - var pos,r,elemento,elementos,dy,dx,w,n,i,nindice; | |
185 | + var pos,r,elemento,elementos,dy,dx,w,i,nindice; | |
186 | 186 | if(i3GEO.desenho.richdraw && $i(i3GEO.Interface.IDCORPO)){ |
187 | 187 | pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); |
188 | 188 | // |
... | ... | @@ -198,26 +198,26 @@ i3GEO.desenho = { |
198 | 198 | if((tipo==="resizeLinha") && navm){ |
199 | 199 | r = $i(i3GEO.desenho.richdraw.container.id); |
200 | 200 | elementos = r.childNodes; |
201 | - if(desenhoUltimaLinha != "") | |
201 | + if(desenhoUltimaLinha !== "") | |
202 | 202 | {r.removeChild(desenhoUltimaLinha);} |
203 | 203 | dy = objposicaocursor.imgy; |
204 | 204 | dx = objposicaocursor.imgx - (i3GEO.parametros.w/2); |
205 | - i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode, i3GEO.desenho.richdraw.fillColor, i3GEO.desenho.richdraw.lineColor, i3GEO.desenho.richdraw.lineWidth, (pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],dx,dy); | |
205 | + i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode, i3GEO.desenho.richdraw.fillColor, i3GEO.desenho.richdraw.lineColor, i3GEO.desenho.richdraw.lineWidth, (pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],dx,dy); | |
206 | 206 | desenhoUltimaLinha = r.childNodes[$i(i3GEO.desenho.richdraw.container.id).childNodes.length - 1]; |
207 | 207 | } |
208 | 208 | if((tipo==="resizePoligono") && navm){ |
209 | 209 | try{ |
210 | 210 | r = $i(i3GEO.desenho.richdraw.container.id); |
211 | 211 | elementos = r.childNodes; |
212 | - if(desenhoUltimaLinhaPol != "") | |
212 | + if(desenhoUltimaLinhaPol !== "") | |
213 | 213 | {r.removeChild(desenhoUltimaLinhaPol);} |
214 | 214 | dy = objposicaocursor.imgy; |
215 | 215 | dx = objposicaocursor.imgx - (i3GEO.parametros.w/2); |
216 | - i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode, i3GEO.desenho.richdraw.fillColor, i3GEO.desenho.richdraw.lineColor, i3GEO.desenho.richdraw.lineWidth, (pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],dx,dy); | |
216 | + i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode, i3GEO.desenho.richdraw.fillColor, i3GEO.desenho.richdraw.lineColor, i3GEO.desenho.richdraw.lineWidth, (pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],dx,dy); | |
217 | 217 | desenhoUltimaLinhaPol = r.childNodes[$i(i3GEO.desenho.richdraw.container.id).childNodes.length - 1]; |
218 | 218 | } |
219 | - catch(erro){ | |
220 | - if(typeof(console) !== 'undefined'){console.error(erro);} | |
219 | + catch(men){ | |
220 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
221 | 221 | } |
222 | 222 | } |
223 | 223 | if(tipo==="insereCirculo"){ |
... | ... | @@ -228,16 +228,16 @@ i3GEO.desenho = { |
228 | 228 | try{ |
229 | 229 | i3GEO.desenho.richdraw.renderer.create('circ', '', 'rgb(250,250,250)', i3GEO.desenho.richdraw.lineWidth, pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,w); |
230 | 230 | } |
231 | - catch(erro){ | |
232 | - if(typeof(console) !== 'undefined'){console.error(erro);} | |
231 | + catch(men){ | |
232 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
233 | 233 | } |
234 | 234 | } |
235 | 235 | else{ |
236 | 236 | try{ |
237 | 237 | i3GEO.desenho.richdraw.renderer.create('circ', '', 'rgb(250,250,250)', i3GEO.desenho.richdraw.lineWidth, pontosdistobj.ximg[n-1]-w,pontosdistobj.yimg[n-1]-w,w*2,w*2); |
238 | 238 | } |
239 | - catch(erro){ | |
240 | - if(typeof(console) !== 'undefined'){console.error(erro);} | |
239 | + catch(men){ | |
240 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
241 | 241 | } |
242 | 242 | } |
243 | 243 | } |
... | ... | @@ -245,8 +245,8 @@ i3GEO.desenho = { |
245 | 245 | try{ |
246 | 246 | i3GEO.desenho.richdraw.renderer.create('text', '', 'rgb(250,250,250)', i3GEO.desenho.richdraw.lineWidth, pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto); |
247 | 247 | } |
248 | - catch(erro){ | |
249 | - if(typeof(console) !== 'undefined'){console.error(erro);} | |
248 | + catch(men){ | |
249 | + if(typeof(console) !== 'undefined'){console.error(men);} | |
250 | 250 | } |
251 | 251 | } |
252 | 252 | } | ... | ... |
classesjs/classe_eventos.js
... | ... | @@ -230,8 +230,8 @@ i3GEO.eventos = { |
230 | 230 | eventos {array} - array com os nomes das funções |
231 | 231 | */ |
232 | 232 | executaEventos: function(eventos){ |
233 | + var f,temp; | |
233 | 234 | try{ |
234 | - var f,temp; | |
235 | 235 | if (eventos.length > 0){ |
236 | 236 | f = eventos.length-1; |
237 | 237 | if (f >= 0){ |
... | ... | @@ -484,21 +484,19 @@ i3GEO.eventos = { |
484 | 484 | */ |
485 | 485 | cliqueCapturaPt: function(ixg,ixm,ixs,iyg,iym,iys){ |
486 | 486 | if(typeof(console) !== 'undefined'){console.info("i3GEO.eventos.cliqueCapturaPt()");} |
487 | + var x,y,doc; | |
487 | 488 | if(arguments.length === 0){ |
488 | - var ixg = "ixg", | |
489 | - ixm = "ixm", | |
490 | - ixs = "ixs", | |
491 | - iyg = "iyg", | |
492 | - iym = "iym", | |
493 | - iys = "iys", | |
494 | - x,y; | |
489 | + ixg = "ixg"; | |
490 | + ixm = "ixm"; | |
491 | + ixs = "ixs"; | |
492 | + iyg = "iyg"; | |
493 | + iym = "iym"; | |
494 | + iys = "iys"; | |
495 | 495 | if($i("wdocai")) |
496 | 496 | {doc = (navm) ? document.frames("wdocai").document : $i("wdocai").contentDocument;} |
497 | 497 | } |
498 | 498 | else{ |
499 | - var doc = document, | |
500 | - x, | |
501 | - y; | |
499 | + doc = document; | |
502 | 500 | } |
503 | 501 | if (g_tipoacao !== "capturaponto"){return;} |
504 | 502 | else{ | ... | ... |
classesjs/classe_gadgets.js
... | ... | @@ -218,7 +218,7 @@ i3GEO.gadgets = { |
218 | 218 | if(arguments.length === 1) |
219 | 219 | {e.value = escala;} |
220 | 220 | else{ |
221 | - if(i3GEO.parametros.mapscale != ""){ | |
221 | + if(i3GEO.parametros.mapscale !== ""){ | |
222 | 222 | e.value = parseInt(i3GEO.parametros.mapscale,10); |
223 | 223 | } |
224 | 224 | else{ |
... | ... | @@ -238,7 +238,7 @@ i3GEO.gadgets = { |
238 | 238 | {i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()");} |
239 | 239 | } |
240 | 240 | else{ |
241 | - atualizaEscalaNumerica = function(){} | |
241 | + atualizaEscalaNumerica = function(){}; | |
242 | 242 | } |
243 | 243 | }, |
244 | 244 | /* |
... | ... | @@ -303,7 +303,7 @@ i3GEO.gadgets = { |
303 | 303 | if($i(id)){ |
304 | 304 | i3geo_buscaRapida = function(){ |
305 | 305 | if ($i("valorBuscaRapida").value === "") |
306 | - {alert ("Digite uma palavra para busca!");return;} | |
306 | + {alert("Digite uma palavra para busca!");return;} | |
307 | 307 | wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida"); |
308 | 308 | }; |
309 | 309 | i = $inputText(id,"210","valorBuscaRapida","digite o texto para busca","30",$trad("o2")); |
... | ... | @@ -644,7 +644,7 @@ i3GEO.gadgets = { |
644 | 644 | iclone.style.heigth = i3GEO.parametros.h; |
645 | 645 | iclone.style.top = i.style.top; |
646 | 646 | iclone.style.left = i.style.left; |
647 | - c = $i("imgClone"); | |
647 | + c = $i("imgClone"); | |
648 | 648 | } |
649 | 649 | try{ |
650 | 650 | if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return;} |
... | ... | @@ -667,16 +667,17 @@ i3GEO.gadgets = { |
667 | 667 | obj {Object} - objeto clicado |
668 | 668 | */ |
669 | 669 | opcoes: function(obj){ |
670 | + var js,volta; | |
670 | 671 | if (i3GEO.parametros.utilizacgi === "sim"){ |
671 | 672 | i3GEO.parametros.utilizacgi = "nao"; |
672 | - var volta = function(){ | |
673 | + volta = function(){ | |
673 | 674 | alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis"); |
674 | 675 | }; |
675 | 676 | i3GEO.php.desativacgi(volta); |
676 | 677 | } |
677 | 678 | else{ |
678 | 679 | if(typeof(i3GEOF.opcoesQuadros) === 'undefined'){ |
679 | - var js = i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php"; | |
680 | + js = i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php"; | |
680 | 681 | i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script"); |
681 | 682 | } |
682 | 683 | } |
... | ... | @@ -701,7 +702,7 @@ i3GEO.gadgets = { |
701 | 702 | } |
702 | 703 | if(Qanima > i3GEO.gadgets.quadros.quadrosfilme.length){ |
703 | 704 | clearTimeout(tAnima); |
704 | - $i("imgClone").style.display = "none"; | |
705 | + $i("imgClone").style.display = "none"; | |
705 | 706 | $i("img").style.display="block"; |
706 | 707 | return; |
707 | 708 | } |
... | ... | @@ -726,7 +727,7 @@ i3GEO.gadgets = { |
726 | 727 | wi = window.open(""); |
727 | 728 | //pega os dados do objeto quadrosfilme e escreve na nova janela |
728 | 729 | mensagem = "<br><b>Não existem imagens guardadas."; |
729 | - wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o botão da direita do mouse sobre a imagem para fazer o download<br>"); | |
730 | + wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o botão da direita do mouse sobre a imagem para fazer o download<br>"); | |
730 | 731 | i = i3GEO.gadgets.quadros.quadrosfilme.length-1; |
731 | 732 | if(i >= 0){ |
732 | 733 | do{ |
... | ... | @@ -779,42 +780,42 @@ i3GEO.gadgets = { |
779 | 780 | ins = ""; |
780 | 781 | ins += '<div class="bd" style="display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'; |
781 | 782 | ins += '<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">'; |
782 | - sobe = ""; | |
783 | - if(navn){sobe = "line-height:0px;";} | |
783 | + sobe = ""; | |
784 | + if(navn){sobe = "line-height:0px;";} | |
784 | 785 | ins += '<li class="yuimenubaritem" style="padding-bottom:5px" ><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuajuda" > '+$trad("s1")+'</a></li>'; |
785 | 786 | ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuanalise" > '+$trad("s2")+'</a></li>'; |
786 | - ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menujanelas" > '+$trad("s3")+'</a></li>'; | |
787 | - ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuarquivos" > '+$trad("s4")+'</a></li>'; | |
788 | - ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuinterface" > '+$trad("d27")+'</a></li>'; | |
789 | - ins += '</ul>'; | |
790 | - ins += '</div>'; | |
791 | - objid.innerHTML=ins; | |
792 | - } | |
793 | - else{ | |
794 | - ins = ""; | |
795 | - alinhamento = ""; | |
796 | - if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){ | |
797 | - alinhamento = "left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"; | |
798 | - } | |
787 | + ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menujanelas" > '+$trad("s3")+'</a></li>'; | |
788 | + ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuarquivos" > '+$trad("s4")+'</a></li>'; | |
789 | + ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuinterface" > '+$trad("d27")+'</a></li>'; | |
790 | + ins += '</ul>'; | |
791 | + ins += '</div>'; | |
792 | + objid.innerHTML=ins; | |
793 | + } | |
794 | + else{ | |
795 | + ins = ""; | |
796 | + alinhamento = ""; | |
797 | + if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){ | |
798 | + alinhamento = "left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"; | |
799 | + } | |
799 | 800 | ins += '<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'; |
800 | 801 | ins += '<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">'; |
801 | - n = i3GEO.configura.oMenuData.menu.length; | |
802 | - for(i = 0;i < n;i++){ | |
803 | - if(i3GEO.parametros.w < 550){ | |
804 | - i3GEO.configura.oMenuData.menu[i].id = ""; | |
805 | - estilo = "padding-bottom:3px;top:0px;border: 0px solid white;"; | |
806 | - } | |
807 | - else | |
808 | - {estilo = "padding-bottom:3px;top:0px;border: 0px solid white;";} | |
809 | - t = ""; | |
810 | - if(i3GEO.configura.oMenuData.menu[i].target) | |
811 | - {t = "target="+i3GEO.configura.oMenuData.menu[i].target;} | |
812 | - ins += '<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+i3GEO.configura.oMenuData.menu[i].id+'" > '+i3GEO.configura.oMenuData.menu[i].nome+'</a></li>'; | |
813 | - } | |
814 | - ins += '</ul>'; | |
815 | - ins += '</div>'; | |
816 | - objid.innerHTML=ins; | |
817 | - } | |
802 | + n = i3GEO.configura.oMenuData.menu.length; | |
803 | + for(i = 0;i < n;i++){ | |
804 | + if(i3GEO.parametros.w < 550){ | |
805 | + i3GEO.configura.oMenuData.menu[i].id = ""; | |
806 | + estilo = "padding-bottom:3px;top:0px;border: 0px solid white;"; | |
807 | + } | |
808 | + else | |
809 | + {estilo = "padding-bottom:3px;top:0px;border: 0px solid white;";} | |
810 | + t = ""; | |
811 | + if(i3GEO.configura.oMenuData.menu[i].target) | |
812 | + {t = "target="+i3GEO.configura.oMenuData.menu[i].target;} | |
813 | + ins += '<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+i3GEO.configura.oMenuData.menu[i].id+'" > '+i3GEO.configura.oMenuData.menu[i].nome+'</a></li>'; | |
814 | + } | |
815 | + ins += '</ul>'; | |
816 | + ins += '</div>'; | |
817 | + objid.innerHTML=ins; | |
818 | + } | |
818 | 819 | onMenuBarBeforeRender = function (p_sType, p_sArgs){ |
819 | 820 | var conta,nomeMenu; |
820 | 821 | if(i3GEO.parametros.w >= 500) |
... | ... | @@ -836,36 +837,36 @@ i3GEO.gadgets = { |
836 | 837 | } |
837 | 838 | } |
838 | 839 | }; |
839 | - if(i3GEO.Interface.ATUAL == "googleearth" || i3GEO.Interface.ATUAL == "flamingo") | |
840 | + if(i3GEO.Interface.ATUAL === "googleearth" || i3GEO.Interface.ATUAL === "flamingo") | |
840 | 841 | {ifr = true;} |
841 | 842 | else |
842 | 843 | {ifr = false;} |
843 | 844 | i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay: true, showdelay: 100, hidedelay: 500, lazyload: false}); |
844 | - YAHOO.widget.MenuManager.addMenu(i3GEOoMenuBar); | |
845 | - i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender); | |
846 | - i3GEOoMenuBar.render(); | |
847 | - // | |
848 | - //marca o tipo de interface em uso | |
849 | - // | |
850 | - try{ | |
851 | - if(i3GEO.Interface.ATUAL === "padrao" && $i("omenudataInterface1")){ | |
852 | - YAHOO.widget.MenuManager.getMenuItem("omenudataInterface1").cfg.setProperty("checked", true); | |
853 | - } | |
854 | - if(i3GEO.Interface.ATUAL === "openlayers" && $i("omenudataInterface2")){ | |
855 | - YAHOO.widget.MenuManager.getMenuItem("omenudataInterface2").cfg.setProperty("checked", true); | |
856 | - } | |
857 | - if(i3GEO.Interface.ATUAL === "flamingo" && $i("omenudataInterface3")){ | |
858 | - YAHOO.widget.MenuManager.getMenuItem("omenudataInterface3").cfg.setProperty("checked", true); | |
859 | - } | |
860 | - if(i3GEO.Interface.ATUAL === "googlemaps" && $i("omenudataInterface4")){ | |
861 | - YAHOO.widget.MenuManager.getMenuItem("omenudataInterface4").cfg.setProperty("checked", true); | |
862 | - } | |
863 | - if(i3GEO.Interface.ATUAL === "googleearth" && $i("omenudataInterface5")){ | |
864 | - YAHOO.widget.MenuManager.getMenuItem("omenudataInterface5").cfg.setProperty("checked", true); | |
865 | - } | |
866 | - }catch(e){ | |
867 | - if(typeof(console) !== 'undefined'){console.warning("i3GEO.gadgets.mostraMenuSuspenso() "+ e);} | |
868 | - } | |
845 | + YAHOO.widget.MenuManager.addMenu(i3GEOoMenuBar); | |
846 | + i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender); | |
847 | + i3GEOoMenuBar.render(); | |
848 | + // | |
849 | + //marca o tipo de interface em uso | |
850 | + // | |
851 | + try{ | |
852 | + if(i3GEO.Interface.ATUAL === "padrao" && $i("omenudataInterface1")){ | |
853 | + YAHOO.widget.MenuManager.getMenuItem("omenudataInterface1").cfg.setProperty("checked", true); | |
854 | + } | |
855 | + if(i3GEO.Interface.ATUAL === "openlayers" && $i("omenudataInterface2")){ | |
856 | + YAHOO.widget.MenuManager.getMenuItem("omenudataInterface2").cfg.setProperty("checked", true); | |
857 | + } | |
858 | + if(i3GEO.Interface.ATUAL === "flamingo" && $i("omenudataInterface3")){ | |
859 | + YAHOO.widget.MenuManager.getMenuItem("omenudataInterface3").cfg.setProperty("checked", true); | |
860 | + } | |
861 | + if(i3GEO.Interface.ATUAL === "googlemaps" && $i("omenudataInterface4")){ | |
862 | + YAHOO.widget.MenuManager.getMenuItem("omenudataInterface4").cfg.setProperty("checked", true); | |
863 | + } | |
864 | + if(i3GEO.Interface.ATUAL === "googleearth" && $i("omenudataInterface5")){ | |
865 | + YAHOO.widget.MenuManager.getMenuItem("omenudataInterface5").cfg.setProperty("checked", true); | |
866 | + } | |
867 | + }catch(e){ | |
868 | + if(typeof(console) !== 'undefined'){console.warning("i3GEO.gadgets.mostraMenuSuspenso() "+ e);} | |
869 | + } | |
869 | 870 | // |
870 | 871 | //desabilita opções em interfaces específicas |
871 | 872 | // |
... | ... | @@ -884,7 +885,7 @@ i3GEO.gadgets = { |
884 | 885 | {temp.border = "0px solid white";} |
885 | 886 | else |
886 | 887 | {temp.border = "1px dotted white";} |
887 | - if(navm && i3GEO.Interface.ATUAL == "googlemaps") | |
888 | + if(navm && i3GEO.Interface.ATUAL === "googlemaps") | |
888 | 889 | {temp.border = "2px dotted white";} |
889 | 890 | } |
890 | 891 | } | ... | ... |
classesjs/classe_guias.js
... | ... | @@ -519,7 +519,7 @@ i3GEO.guias = { |
519 | 519 | novoel.id = "janelaguias"; |
520 | 520 | novoel.style.display="block"; |
521 | 521 | novoel.innerHTML = '<div class="hd">Guias</div><div class="bd" id="conteudojanelaguias"></div>'; |
522 | - $i("i3geo") ? $i("i3geo").appendChild(novoel) : document.body.appendChild(novoel); | |
522 | + temp = $i("i3geo") ? $i("i3geo").appendChild(novoel) : document.body.appendChild(novoel); | |
523 | 523 | YAHOO.namespace("janelaguias.xp"); |
524 | 524 | YAHOO.janelaguias.xp.panel = new YAHOO.widget.Panel("janelaguias", {width:"270px", fixedcenter: true, constraintoviewport: false, underlay:"none", close:true, visible:true, draggable:true, modal:false,iframe:false } ); |
525 | 525 | YAHOO.janelaguias.xp.panel.render(); |
... | ... | @@ -544,7 +544,7 @@ i3GEO.guias = { |
544 | 544 | i.style.display="block"; |
545 | 545 | i.style.left = "-1px"; |
546 | 546 | i.style.width = "270px"; |
547 | - }; | |
547 | + }; | |
548 | 548 | i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1")); |
549 | 549 | i3GEO.php.mudatamanho(temp,a,l); |
550 | 550 | } | ... | ... |
classesjs/classe_i3geo.js
... | ... | @@ -145,7 +145,6 @@ i3GEO = { |
145 | 145 | mensageminicia:"", |
146 | 146 | interfacePadrao:"geral.htm", |
147 | 147 | embedLegenda:"nao", |
148 | - celularef:"", | |
149 | 148 | autenticadoopenid:"nao" |
150 | 149 | }, |
151 | 150 | /* |
... | ... | @@ -229,7 +228,7 @@ i3GEO = { |
229 | 228 | // |
230 | 229 | //tenta definir automaticamente a variável que indica a localização do i3geo |
231 | 230 | // |
232 | - if(!i3GEO.configura.locaplic || i3GEO.configura.locaplic == ""){ | |
231 | + if(!i3GEO.configura.locaplic || i3GEO.configura.locaplic === ""){ | |
233 | 232 | i3GEO.util.localizai3GEO(); |
234 | 233 | } |
235 | 234 | // |
... | ... | @@ -288,7 +287,7 @@ i3GEO = { |
288 | 287 | i3GEO.parametros.h = i3GEO.parametros.h*1; |
289 | 288 | // |
290 | 289 | i3GEO.arvoreDeCamadas.CAMADAS = retorno.data.temas; |
291 | - if(retorno.data.variaveis.navegacaoDir == "sim") | |
290 | + if(retorno.data.variaveis.navegacaoDir === "sim") | |
292 | 291 | {i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir = true;} |
293 | 292 | // |
294 | 293 | //na interface padrão é necessário executar a atualização pois a geração do mapa |
... | ... | @@ -300,7 +299,7 @@ i3GEO = { |
300 | 299 | //calcula (opcional) o tamanho correto da tabela onde fica o mapa |
301 | 300 | //se não for feito esse cálculo, o mapa fica ajustado à esquerda |
302 | 301 | // |
303 | - temp = 0; | |
302 | + temp = 0; | |
304 | 303 | if ($i("contemFerramentas")){temp = temp + parseInt($i("contemFerramentas").style.width,10);} |
305 | 304 | if ($i("ferramentas")){temp = temp + parseInt($i("ferramentas").style.width,10);} |
306 | 305 | if($i("mst")) |
... | ... | @@ -315,7 +314,7 @@ i3GEO = { |
315 | 314 | // |
316 | 315 | if($i("ajuda")) //para efeitos de compatibilidade com as versões anteriores a 4.1 |
317 | 316 | {i3GEO.ajuda.DIVAJUDA = "ajuda";} |
318 | - if(i3GEO.util.pegaCookie("botoesAjuda") == "nao") | |
317 | + if(i3GEO.util.pegaCookie("botoesAjuda") === "nao") | |
319 | 318 | {i3GEO.barraDeBotoes.AJUDA = false;} |
320 | 319 | abreJM = "sim"; |
321 | 320 | if(i3GEO.util.pegaCookie("g_janelaMen")){ |
... | ... | @@ -386,7 +385,7 @@ i3GEO = { |
386 | 385 | */ |
387 | 386 | atualiza: function(retorno){ |
388 | 387 | if(typeof(console) !== 'undefined'){console.info("i3GEO.atualiza()");} |
389 | - var corpoMapa,erro,tempo,mapscale,mapexten; | |
388 | + var corpoMapa,erro,tempo,mapscale,mapexten,temp; | |
390 | 389 | if(i3GEO.contadorAtualiza > 1) |
391 | 390 | {i3GEO.contadorAtualiza--;return;} |
392 | 391 | if(i3GEO.contadorAtualiza > 0) |
... | ... | @@ -399,7 +398,7 @@ i3GEO = { |
399 | 398 | if($i("ajaxCorpoMapa")) |
400 | 399 | {return;} |
401 | 400 | i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando..."); |
402 | - i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
401 | + i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
403 | 402 | }; |
404 | 403 | // |
405 | 404 | //se retorno não tiver sido definido, busca os dados no servidor e chama novamente a função atualiza |
... | ... | @@ -462,13 +461,13 @@ i3GEO = { |
462 | 461 | // |
463 | 462 | if(arguments.length === 0){return;} |
464 | 463 | i3GEO.mapa.verifica(retorno); |
465 | - var tempo = ""; | |
464 | + tempo = ""; | |
466 | 465 | if(i3GEO.desenho.richdraw) |
467 | 466 | {i3GEO.desenho.richdraw.clearWorkspace();} |
468 | - var mapscale = i3GEO.parametros.mapscale; | |
467 | + mapscale = i3GEO.parametros.mapscale; | |
469 | 468 | i3GEO.atualizaParametros(retorno.data.variaveis); |
470 | 469 | |
471 | - if(retorno.data.variaveis.erro != "") | |
470 | + if(retorno.data.variaveis.erro !== "") | |
472 | 471 | {alert(retorno.data.variaveis.erro);} |
473 | 472 | // |
474 | 473 | //o try aqui é necessário pois na interface googlemaps os parâmetros retorno.data.variaveis não são gerados completamente |
... | ... | @@ -500,9 +499,9 @@ i3GEO = { |
500 | 499 | // |
501 | 500 | //verifica se deve ser feito o zoom em algum tema |
502 | 501 | // |
503 | - var temp = i3GEO.arvoreDeCamadas.verificaAplicaExtensao(); | |
504 | - if(temp != "") | |
505 | - {i3GEO.tema.zoom(temp)} | |
502 | + temp = i3GEO.arvoreDeCamadas.verificaAplicaExtensao(); | |
503 | + if(temp !== "") | |
504 | + {i3GEO.tema.zoom(temp);} | |
506 | 505 | } |
507 | 506 | }, |
508 | 507 | /* |
... | ... | @@ -518,10 +517,6 @@ i3GEO = { |
518 | 517 | var diminuix,diminuiy,menos,novow,novoh,w,h,temp; |
519 | 518 | diminuix = (navm) ? i3GEO.configura.diminuixM : i3GEO.configura.diminuixN; |
520 | 519 | diminuiy = (navm) ? i3GEO.configura.diminuiyM : i3GEO.configura.diminuiyN; |
521 | - if(chro){ | |
522 | - //diminuix = diminuix - 10; | |
523 | - //diminuiy = diminuiy - 50; | |
524 | - } | |
525 | 520 | menos = 0; |
526 | 521 | if ($i("contemFerramentas")) |
527 | 522 | {menos += parseInt($i("contemFerramentas").style.width,10);} |
... | ... | @@ -570,7 +565,7 @@ i3GEO = { |
570 | 565 | temp.style.height=h + "px"; |
571 | 566 | temp.style.width=w + "px"; |
572 | 567 | } |
573 | - return [w,h]; | |
568 | + return [w,h]; | |
574 | 569 | }, |
575 | 570 | /* |
576 | 571 | Function: atualizaParametros | ... | ... |
classesjs/classe_interface.js
... | ... | @@ -229,7 +229,6 @@ i3GEO.Interface = { |
229 | 229 | switch(i3GEO.Interface.ATUAL) |
230 | 230 | { |
231 | 231 | case "padrao": |
232 | - return; | |
233 | 232 | break; |
234 | 233 | default: |
235 | 234 | eval("i3GEO.Interface."+i3GEO.Interface.ATUAL+".atualizaTema(retorno,tema);"); |
... | ... | @@ -276,13 +275,13 @@ i3GEO.Interface = { |
276 | 275 | // |
277 | 276 | var temp = window.location.href.split("?")[0]; |
278 | 277 | if($i("i3GEOcompartilhar")) |
279 | - {i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp);} | |
278 | + {i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal");} | |
280 | 279 | |
281 | 280 | i3GEO.gadgets.quadros.inicia(10); |
282 | - i3GEO.gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal); | |
281 | + i3GEO.gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal); | |
283 | 282 | i3GEO.gadgets.mostraBuscaRapida(); |
284 | 283 | i3GEO.gadgets.mostraVersao(); |
285 | - i3GEO.guias.cria(); | |
284 | + i3GEO.guias.cria(); | |
286 | 285 | // |
287 | 286 | //esse id é utilizado apenas para manter o mapa não visível até que tudo seja montado |
288 | 287 | // |
... | ... | @@ -300,7 +299,7 @@ i3GEO.Interface = { |
300 | 299 | // |
301 | 300 | //inicialização específica de cada interface |
302 | 301 | // |
303 | - eval("i3GEO.Interface."+i3GEO.Interface.ATUAL+".inicia();") | |
302 | + eval("i3GEO.Interface."+i3GEO.Interface.ATUAL+".inicia();"); | |
304 | 303 | }, |
305 | 304 | /* |
306 | 305 | Function: alteraLayers |
... | ... | @@ -715,14 +714,14 @@ i3GEO.Interface = { |
715 | 714 | i3GEO.Interface.openlayers.criaLayers(); |
716 | 715 | i3GEO.Interface.openlayers.registraEventos(); |
717 | 716 | i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); |
718 | - if(i3GEO.Interface.openlayers.GADGETS.PanZoomBar == true){ | |
717 | + if(i3GEO.Interface.openlayers.GADGETS.PanZoomBar === true){ | |
719 | 718 | pz = new OpenLayers.Control.PanZoomBar(); |
720 | 719 | i3geoOL.addControl(pz); |
721 | 720 | pz.div.style.zIndex = 5000; |
722 | 721 | pz.div.style.top = i3GEO.Interface.BARRADEZOOMTOP+"px"; |
723 | 722 | pz.div.style.left = i3GEO.Interface.BARRADEZOOMLEFT+"px"; |
724 | 723 | } |
725 | - if(i3GEO.Interface.openlayers.GADGETS.PanZoom == true){ | |
724 | + if(i3GEO.Interface.openlayers.GADGETS.PanZoom === true){ | |
726 | 725 | pz = new OpenLayers.Control.PanZoom(); |
727 | 726 | i3geoOL.addControl(pz); |
728 | 727 | pz.div.style.zIndex = 5000; |
... | ... | @@ -745,17 +744,17 @@ i3GEO.Interface = { |
745 | 744 | i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp); |
746 | 745 | } |
747 | 746 | else{ |
748 | - if(i3GEO.Interface.openlayers.GADGETS.LayerSwitcher == true) | |
747 | + if(i3GEO.Interface.openlayers.GADGETS.LayerSwitcher === true) | |
749 | 748 | {i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher());} |
750 | 749 | } |
751 | - if(i3GEO.Interface.openlayers.GADGETS.ScaleLine == true){ | |
750 | + if(i3GEO.Interface.openlayers.GADGETS.ScaleLine === true){ | |
752 | 751 | pz = new OpenLayers.Control.ScaleLine(); |
753 | 752 | i3geoOL.addControl(pz); |
754 | 753 | pz.div.style.left = i3GEO.Interface.BARRADEZOOMLEFT+5+"px"; |
755 | 754 | } |
756 | - if(i3GEO.Interface.openlayers.GADGETS.OverviewMap == true) | |
755 | + if(i3GEO.Interface.openlayers.GADGETS.OverviewMap === true) | |
757 | 756 | {i3geoOL.addControl(new OpenLayers.Control.OverviewMap());} |
758 | - //i3geoOL.addControl(new OpenLayers.Control.KeyboardDefaults()); | |
757 | + //i3geoOL.addControl(new OpenLayers.Control.KeyboardDefaults()); | |
759 | 758 | // |
760 | 759 | //estes controles ficam invisíveis e são usados quando os ícones default do i3geo são ativados |
761 | 760 | // |
... | ... | @@ -809,7 +808,7 @@ i3GEO.Interface = { |
809 | 808 | } |
810 | 809 | } |
811 | 810 | catch(e){} |
812 | - if(i3geoOL.getLayersByName("Nenhum").length == 0 && fundoIsBase === true){ | |
811 | + if(i3geoOL.getLayersByName("Nenhum").length === 0 && fundoIsBase === true){ | |
813 | 812 | layer = new OpenLayers.Layer.WMS( "Nenhum", urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio: 1,singleTile:true,isBaseLayer:true, opacity: 1,visibility:true}); |
814 | 813 | i3geoOL.addLayer(layer); |
815 | 814 | } |
... | ... | @@ -830,16 +829,16 @@ i3GEO.Interface = { |
830 | 829 | }; |
831 | 830 | for(i=nlayers-1;i>=0;i--){ |
832 | 831 | camada = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
833 | - if(i3geoOL.getLayersByName(camada.name).length == 0){ | |
832 | + if(i3geoOL.getLayersByName(camada.name).length === 0){ | |
834 | 833 | urllayer = url+"&layer="+camada.name; |
835 | 834 | try{ |
836 | 835 | if(camada.escondido === "sim" || camada.connectiontype === 10 || camada.type === 0 || camada.type === 4 || camada.type === 8 ) |
837 | 836 | {opcoes.singleTile = true;} |
838 | 837 | else{ |
839 | - camada.type === 3 ? opcoes.singleTile = false : opcoes.singleTile = !(i3GEO.Interface.openlayers.TILES); | |
838 | + temp = camada.type === 3 ? opcoes.singleTile = false : opcoes.singleTile = !(i3GEO.Interface.openlayers.TILES); | |
840 | 839 | } |
841 | - camada.type === 0 ? opcoes.gutter = 20 : opcoes.gutter = 0; | |
842 | - camada.transitioneffect === "nao" ? opcoes.transitionEffect = "null" : opcoes.transitionEffect = "resize"; | |
840 | + temp = camada.type === 0 ? opcoes.gutter = 20 : opcoes.gutter = 0; | |
841 | + temp = camada.transitioneffect === "nao" ? opcoes.transitionEffect = "null" : opcoes.transitionEffect = "resize"; | |
843 | 842 | } |
844 | 843 | catch(e){} |
845 | 844 | layer = new OpenLayers.Layer.WMS(camada.name, urllayer,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes); |
... | ... | @@ -849,7 +848,7 @@ i3GEO.Interface = { |
849 | 848 | } |
850 | 849 | else |
851 | 850 | {layer = i3geoOL.getLayersByName(camada.name)[0];} |
852 | - camada.status == 0 ? layer.setVisibility(false) : layer.setVisibility(true); | |
851 | + temp = camada.status === 0 ? layer.setVisibility(false) : layer.setVisibility(true); | |
853 | 852 | } |
854 | 853 | try |
855 | 854 | {i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS);} |
... | ... | @@ -981,7 +980,7 @@ i3GEO.Interface = { |
981 | 980 | }); |
982 | 981 | i3geoOL.events.register("mousemove", i3geoOL, function(e){ |
983 | 982 | //i3GEO.eventos.mousemoveMapa(); |
984 | - var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey,pos; | |
983 | + var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey; | |
985 | 984 | p = e.xy; |
986 | 985 | //altera o indicador de localizacao |
987 | 986 | lonlat = i3geoOL.getLonLatFromPixel(p); |
... | ... | @@ -1005,7 +1004,7 @@ i3GEO.Interface = { |
1005 | 1004 | catch(e){ |
1006 | 1005 | if(typeof(console) !== 'undefined'){console.error(e);} |
1007 | 1006 | } |
1008 | - }); | |
1007 | + }); | |
1009 | 1008 | }, |
1010 | 1009 | ativaBotoes: function(){ |
1011 | 1010 | if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.openlayers.ativaBotoes()");} |
... | ... | @@ -1026,7 +1025,7 @@ i3GEO.Interface = { |
1026 | 1025 | escalaAtual = i3geoOL.getScale(); |
1027 | 1026 | if (i3GEO.parametros.mapscale !== escalaAtual) |
1028 | 1027 | {i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual);} |
1029 | - i3GEO.parametros.mapexten = bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3]; | |
1028 | + i3GEO.parametros.mapexten = bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3]; | |
1030 | 1029 | i3GEO.parametros.mapscale = escalaAtual; |
1031 | 1030 | i3GEO.parametros.pixelsize = i3geoOL.getResolution(); |
1032 | 1031 | try{ |
... | ... | @@ -1037,7 +1036,7 @@ i3GEO.Interface = { |
1037 | 1036 | var m,b; |
1038 | 1037 | m = ext.split(" "); |
1039 | 1038 | b = new OpenLayers.Bounds(m[0],m[1],m[2],m[3]); |
1040 | - i3geoOL.zoomToExtent(b); | |
1039 | + i3geoOL.zoomToExtent(b); | |
1041 | 1040 | }, |
1042 | 1041 | pan2ponto:function(x,y){ |
1043 | 1042 | i3geoOL.panTo(new OpenLayers.LonLat(x,y)); |
... | ... | @@ -1124,10 +1123,10 @@ i3GEO.Interface = { |
1124 | 1123 | {i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);} |
1125 | 1124 | catch(e) |
1126 | 1125 | {i3GEO.arvoreDeCamadas.atualiza();} |
1127 | - i3GEO.janela.fechaAguarde(); | |
1126 | + i3GEO.janela.fechaAguarde(); | |
1128 | 1127 | }, |
1129 | 1128 | redesenha: function(){ |
1130 | - // | |
1129 | + // | |
1131 | 1130 | //remove todos os layers |
1132 | 1131 | // |
1133 | 1132 | i3GEO.Interface.googlemaps.posfixo += "&"; |
... | ... | @@ -1169,7 +1168,7 @@ i3GEO.Interface = { |
1169 | 1168 | i3GEO.Interface.IDMAPA = "googlemapsdiv"; |
1170 | 1169 | i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli = true; |
1171 | 1170 | i3GEO.barraDeBotoes.INCLUIBOTAO.pan = true; |
1172 | - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot = true; | |
1171 | + i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot = true; | |
1173 | 1172 | }, |
1174 | 1173 | ativaZoomBox: function(){ |
1175 | 1174 | i3GeoMap.enableKeyDragZoom({ |
... | ... | @@ -1177,9 +1176,9 @@ i3GEO.Interface = { |
1177 | 1176 | }); |
1178 | 1177 | }, |
1179 | 1178 | inicia: function(){ |
1180 | - var pol,ret,pt1,pt2,bottomLeft,bottomRight,i3GEOTile; | |
1181 | - pol = i3GEO.parametros.mapexten; | |
1182 | - ret = pol.split(" "); | |
1179 | + var pol,ret,pt1,pt2,bottomLeft,bottomRight,i3GEOTile; | |
1180 | + pol = i3GEO.parametros.mapexten; | |
1181 | + ret = pol.split(" "); | |
1183 | 1182 | function montaMapa(retorno){ |
1184 | 1183 | var pos, sw,ne,z,myMapType; |
1185 | 1184 | try{ |
... | ... | @@ -1224,7 +1223,7 @@ i3GEO.Interface = { |
1224 | 1223 | i3GEO.Interface.googlemaps.adicionaListaKml(); |
1225 | 1224 | if(i3GEO.parametros.kmlurl !== "") |
1226 | 1225 | {i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl);} |
1227 | - }; | |
1226 | + } | |
1228 | 1227 | i3GEO.php.googlemaps(montaMapa); |
1229 | 1228 | }, |
1230 | 1229 | criaLayers: function(){ |
... | ... | @@ -1259,7 +1258,7 @@ i3GEO.Interface = { |
1259 | 1258 | }, |
1260 | 1259 | insereLayer: function(nomeLayer,indice){ |
1261 | 1260 | var i = i3GEO.Interface.googlemaps.criaImageMap(nomeLayer); |
1262 | - i3GeoMap.overlayMapTypes.insertAt(indice, i); | |
1261 | + i3GeoMap.overlayMapTypes.insertAt(indice, i); | |
1263 | 1262 | }, |
1264 | 1263 | registraEventos: function(){ |
1265 | 1264 | var pos; |
... | ... | @@ -1273,7 +1272,7 @@ i3GEO.Interface = { |
1273 | 1272 | }); |
1274 | 1273 | google.maps.event.addListener(i3GeoMap, "tilesloaded", function() { |
1275 | 1274 | i3GEO.Interface.googlemaps.recalcPar(); |
1276 | - }); | |
1275 | + }); | |
1277 | 1276 | google.maps.event.addListener(i3GeoMap, "bounds_changed", function() { |
1278 | 1277 | i3GEO.Interface.googlemaps.recalcPar(); |
1279 | 1278 | g_operacao = ""; |
... | ... | @@ -1296,7 +1295,7 @@ i3GEO.Interface = { |
1296 | 1295 | telax: tela.x + pos[0], |
1297 | 1296 | telay: tela.y + pos[1] |
1298 | 1297 | }; |
1299 | - }); | |
1298 | + }); | |
1300 | 1299 | }, |
1301 | 1300 | retornaIndiceLayer: function(nomeLayer){ |
1302 | 1301 | var i = false; |
... | ... | @@ -1304,7 +1303,7 @@ i3GEO.Interface = { |
1304 | 1303 | i3GeoMap.overlayMapTypes.forEach( |
1305 | 1304 | function(elemento, number){ |
1306 | 1305 | //alert(nomeLayer+" "+elemento.name) |
1307 | - if(elemento.name == nomeLayer) | |
1306 | + if(elemento.name === nomeLayer) | |
1308 | 1307 | {i = number;} |
1309 | 1308 | //console.error(i+" "+elemento.name+" "+nomeLayer); |
1310 | 1309 | } |
... | ... | @@ -1320,7 +1319,7 @@ i3GEO.Interface = { |
1320 | 1319 | try{ |
1321 | 1320 | i3GeoMap.overlayMapTypes.forEach( |
1322 | 1321 | function(elemento, number){ |
1323 | - if(elemento.name == nomeLayer) | |
1322 | + if(elemento.name === nomeLayer) | |
1324 | 1323 | {i = elemento;} |
1325 | 1324 | } |
1326 | 1325 | ); |
... | ... | @@ -1340,14 +1339,14 @@ i3GEO.Interface = { |
1340 | 1339 | try{ |
1341 | 1340 | i3GeoMap.overlayMapTypes.forEach( |
1342 | 1341 | function(elemento, number){ |
1343 | - if(elemento.name == nomeLayer){ | |
1342 | + if(elemento.name === nomeLayer){ | |
1344 | 1343 | divlayer = divmapa.firstChild; |
1345 | 1344 | divlayer = divlayer.firstChild; |
1346 | 1345 | divlayer = divlayer.firstChild; |
1347 | 1346 | divs = divlayer.getElementsByTagName("div"); |
1348 | 1347 | ndivs = divs.length; |
1349 | 1348 | for(j=0;j<ndivs;j++){ |
1350 | - if(divs[j].style.zIndex == number) | |
1349 | + if(divs[j].style.zIndex === number) | |
1351 | 1350 | {i = divs[j];} |
1352 | 1351 | } |
1353 | 1352 | } |
... | ... | @@ -1376,7 +1375,7 @@ i3GEO.Interface = { |
1376 | 1375 | i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value); |
1377 | 1376 | } |
1378 | 1377 | } |
1379 | - if(desligar != "" || ligar != "") | |
1378 | + if(desligar !== "" || ligar !== "") | |
1380 | 1379 | {i3GEO.php.ligatemas(temp,desligar,ligar);} |
1381 | 1380 | }, |
1382 | 1381 | bbox: function(){ |
... | ... | @@ -1430,8 +1429,8 @@ i3GEO.Interface = { |
1430 | 1429 | } |
1431 | 1430 | }, |
1432 | 1431 | calcescala:function(){ |
1433 | - var zoom = i3GeoMap.getZoom(); | |
1434 | - return (i3GEO.Interface.googlemaps.ZOOMSCALE[zoom]); | |
1432 | + var zoom = i3GeoMap.getZoom(); | |
1433 | + return (i3GEO.Interface.googlemaps.ZOOMSCALE[zoom]); | |
1435 | 1434 | }, |
1436 | 1435 | escala2nzoom:function(escala){ |
1437 | 1436 | var n,i; |
... | ... | @@ -1445,15 +1444,15 @@ i3GEO.Interface = { |
1445 | 1444 | zoom2extent:function(mapexten){ |
1446 | 1445 | var pol,ret,pt1,pt2,sw,ne,z; |
1447 | 1446 | pol = mapexten; |
1448 | - ret = pol.split(" "); | |
1447 | + ret = pol.split(" "); | |
1449 | 1448 | // |
1450 | 1449 | //verifica se é geo |
1451 | 1450 | // |
1452 | - pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1; | |
1453 | - pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1; | |
1451 | + pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1; | |
1452 | + pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1; | |
1454 | 1453 | sw = new google.maps.LatLng(ret[1],ret[0]); |
1455 | 1454 | ne = new google.maps.LatLng(ret[3],ret[2]); |
1456 | - i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne)); | |
1455 | + i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne)); | |
1457 | 1456 | }, |
1458 | 1457 | pan2ponto: function(x,y){ |
1459 | 1458 | i3GeoMap.panTo(new google.maps.LatLng(y,x)); |
... | ... | @@ -1555,12 +1554,12 @@ i3GEO.Interface = { |
1555 | 1554 | html += " <span style='"+estilo+"'>"+nomeOverlay+"</span>"; |
1556 | 1555 | d = {html:html}; |
1557 | 1556 | nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); |
1558 | - nodekml.enableHighlight = false; | |
1557 | + nodekml.enableHighlight = false; | |
1559 | 1558 | nodekml.isleaf = true; |
1560 | 1559 | i3GEO.Interface.googlemaps.ARVORE.draw(); |
1561 | 1560 | i3GEO.Interface.googlemaps.ARVORE.collapseAll(); |
1562 | 1561 | node.expand(); |
1563 | - if(ativo == true) | |
1562 | + if(ativo === true) | |
1564 | 1563 | {eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});");} |
1565 | 1564 | }, |
1566 | 1565 | criaArvoreKML: function(){ |
... | ... | @@ -1651,7 +1650,7 @@ i3GEO.Interface = { |
1651 | 1650 | {} |
1652 | 1651 | */ |
1653 | 1652 | GADGETS: { |
1654 | - setMouseNavigationEnabled:true, | |
1653 | + setMouseNavigationEnabled:true, | |
1655 | 1654 | setStatusBarVisibility:true, |
1656 | 1655 | setOverviewMapVisibility:true, |
1657 | 1656 | setScaleLegendVisibility:true, |
... | ... | @@ -1679,7 +1678,7 @@ i3GEO.Interface = { |
1679 | 1678 | desligar = obj.value; |
1680 | 1679 | } |
1681 | 1680 | layer.setVisibility(obj.checked); |
1682 | - if(desligar != "" || ligar != "") | |
1681 | + if(desligar !== "" || ligar !== "") | |
1683 | 1682 | {i3GEO.php.ligatemas(temp,desligar,ligar);} |
1684 | 1683 | }, |
1685 | 1684 | atualizaTema:function(retorno,tema){ |
... | ... | @@ -1705,9 +1704,7 @@ i3GEO.Interface = { |
1705 | 1704 | try{ |
1706 | 1705 | i3GeoMap.getFeatures().removeChild(indice); |
1707 | 1706 | } |
1708 | - catch(e){ | |
1709 | - if(typeof(console) !== 'undefined'){} | |
1710 | - } | |
1707 | + catch(e){} | |
1711 | 1708 | } |
1712 | 1709 | } |
1713 | 1710 | i3GEO.Interface.googleearth.criaLayers(); |
... | ... | @@ -1728,88 +1725,88 @@ i3GEO.Interface = { |
1728 | 1725 | { text: "p9", url: "javascript:i3GEO.mapa.dialogo.corFundo()"}, |
1729 | 1726 | { text: "p10", url: "javascript:i3GEO.mapa.dialogo.gradeCoord()"} |
1730 | 1727 | ] |
1731 | - }; | |
1728 | + }; | |
1732 | 1729 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1733 | - if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled == true) | |
1730 | + if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled === true) | |
1734 | 1731 | {texto += "CHECKED ";} |
1735 | 1732 | texto += " onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'" ; |
1736 | 1733 | texto += "> "+$trad("ge1"); |
1737 | 1734 | i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); |
1738 | 1735 | |
1739 | 1736 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1740 | - if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility == true) | |
1737 | + if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility === true) | |
1741 | 1738 | {texto += "CHECKED ";} |
1742 | 1739 | texto += " onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'" ; |
1743 | 1740 | texto += "> "+$trad("ge2"); |
1744 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1741 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1745 | 1742 | |
1746 | 1743 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1747 | - if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility == true) | |
1744 | + if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility === true) | |
1748 | 1745 | {texto += "CHECKED ";} |
1749 | 1746 | texto += " onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'" ; |
1750 | 1747 | texto += "> "+$trad("ge3"); |
1751 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1748 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1752 | 1749 | |
1753 | 1750 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1754 | - if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility == true) | |
1751 | + if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility === true) | |
1755 | 1752 | {texto += "CHECKED ";} |
1756 | 1753 | texto += " onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'" ; |
1757 | 1754 | texto += "> "+$trad("ge4"); |
1758 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1755 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1759 | 1756 | |
1760 | 1757 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1761 | - if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility == true) | |
1758 | + if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility === true) | |
1762 | 1759 | {texto += "CHECKED ";} |
1763 | 1760 | texto += " onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'" ; |
1764 | 1761 | texto += "> "+$trad("ge5"); |
1765 | 1762 | i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); |
1766 | 1763 | |
1767 | 1764 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1768 | - if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility == true) | |
1765 | + if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility === true) | |
1769 | 1766 | {texto += "CHECKED ";} |
1770 | 1767 | texto += " onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'" ; |
1771 | 1768 | texto += "> "+$trad("ge6"); |
1772 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1769 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1773 | 1770 | |
1774 | 1771 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1775 | - if(i3GEO.Interface.googleearth.GADGETS.getSun == true) | |
1772 | + if(i3GEO.Interface.googleearth.GADGETS.getSun === true) | |
1776 | 1773 | {texto += "CHECKED ";} |
1777 | 1774 | texto += " onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'" ; |
1778 | 1775 | texto += "> "+$trad("ge7"); |
1779 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1776 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1780 | 1777 | |
1781 | 1778 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1782 | - if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS == true) | |
1779 | + if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS === true) | |
1783 | 1780 | {texto += "CHECKED ";} |
1784 | 1781 | texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'" ; |
1785 | 1782 | texto += "> "+$trad("ge8"); |
1786 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1783 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1787 | 1784 | |
1788 | 1785 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1789 | - if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS == true) | |
1786 | + if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS === true) | |
1790 | 1787 | {texto += "CHECKED ";} |
1791 | 1788 | texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'" ; |
1792 | 1789 | texto += "> "+$trad("ge9"); |
1793 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1790 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1794 | 1791 | |
1795 | 1792 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1796 | - if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS == true) | |
1793 | + if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS === true) | |
1797 | 1794 | {texto += "CHECKED ";} |
1798 | 1795 | texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'" ; |
1799 | 1796 | texto += "> "+$trad("ge10"); |
1800 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1797 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1801 | 1798 | |
1802 | 1799 | texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' "; |
1803 | - if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN == true) | |
1800 | + if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN === true) | |
1804 | 1801 | {texto += "CHECKED ";} |
1805 | 1802 | texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'" ; |
1806 | 1803 | texto += "> "+$trad("ge11"); |
1807 | - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1804 | + i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text: texto,url:""}); | |
1808 | 1805 | i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa); |
1809 | 1806 | |
1810 | 1807 | i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli = false; |
1811 | 1808 | i3GEO.barraDeBotoes.INCLUIBOTAO.pan = false; |
1812 | - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot = false; | |
1809 | + i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot = false; | |
1813 | 1810 | i3GEO.Interface.IDMAPA = "i3GeoMap3d"; |
1814 | 1811 | i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.googleearth.ligaDesliga(this)"; |
1815 | 1812 | i = $i(i3GEO.Interface.IDCORPO); |
... | ... | @@ -1829,7 +1826,7 @@ i3GEO.Interface = { |
1829 | 1826 | google.earth.createInstance("i3GeoMap3d", i3GEO.Interface.googleearth.iniciaGE, i3GEO.Interface.googleearth.falha); |
1830 | 1827 | }, |
1831 | 1828 | iniciaGE: function(object){ |
1832 | - function montaMapa(retorno){ | |
1829 | + function montaMapa(retorno){ | |
1833 | 1830 | i3GeoMap = object; |
1834 | 1831 | i3GeoMap.getWindow().setVisibility(true); |
1835 | 1832 | i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten); |
... | ... | @@ -1840,7 +1837,7 @@ i3GEO.Interface = { |
1840 | 1837 | evento = function(e){ |
1841 | 1838 | i3GEO.Interface.googleearth.recalcPar(); |
1842 | 1839 | g_operacao = ""; |
1843 | - g_tipoacao = ""; | |
1840 | + g_tipoacao = ""; | |
1844 | 1841 | }; |
1845 | 1842 | |
1846 | 1843 | options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled); |
... | ... | @@ -1854,7 +1851,7 @@ i3GEO.Interface = { |
1854 | 1851 | layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS); |
1855 | 1852 | layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS); |
1856 | 1853 | layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN); |
1857 | - i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun); | |
1854 | + i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun); | |
1858 | 1855 | i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW); |
1859 | 1856 | |
1860 | 1857 | i3GEO.Interface.googleearth.POSICAOTELA = YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO)); |
... | ... | @@ -1867,7 +1864,7 @@ i3GEO.Interface = { |
1867 | 1864 | i3GEO.gadgets.mostraInserirKml("inserirKml"); |
1868 | 1865 | i3GEO.Interface.googleearth.adicionaListaKml(); |
1869 | 1866 | i3GEO.Interface.googleearth.registraEventos(); |
1870 | - }; | |
1867 | + } | |
1871 | 1868 | i3GEO.php.googleearth(montaMapa); |
1872 | 1869 | }, |
1873 | 1870 | criaLayers: function(){ |
... | ... | @@ -1895,19 +1892,19 @@ i3GEO.Interface = { |
1895 | 1892 | insereLayer: function(nomeLayer){ |
1896 | 1893 | var kmlUrl = i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&map="+i3GEO.parametros.mapfile+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER, |
1897 | 1894 | linki3geo = i3GeoMap.createLink(''); |
1898 | - linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo); | |
1899 | - nl = i3GeoMap.createNetworkLink(''); | |
1900 | - nl.setLink(linki3geo); | |
1901 | - nl.setFlyToView(false); | |
1895 | + linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo); | |
1896 | + nl = i3GeoMap.createNetworkLink(''); | |
1897 | + nl.setLink(linki3geo); | |
1898 | + nl.setFlyToView(false); | |
1902 | 1899 | nl.setName(nomeLayer); |
1903 | - i3GeoMap.getFeatures().appendChild(nl); | |
1900 | + i3GeoMap.getFeatures().appendChild(nl); | |
1904 | 1901 | return nl; |
1905 | 1902 | }, |
1906 | 1903 | retornaIndiceLayer: function(nomeLayer){ |
1907 | 1904 | var n = i3GeoMap.getFeatures().getChildNodes().getLength(), |
1908 | 1905 | indice = false; |
1909 | 1906 | for(i=0;i<n;i++){ |
1910 | - if(i3GeoMap.getFeatures().getChildNodes().item(i).getName() == nomeLayer) | |
1907 | + if(i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer) | |
1911 | 1908 | {indice = i;} |
1912 | 1909 | } |
1913 | 1910 | return indice; |
... | ... | @@ -1917,7 +1914,7 @@ i3GEO.Interface = { |
1917 | 1914 | indice = false, |
1918 | 1915 | i; |
1919 | 1916 | for(i=0;i<n;i++){ |
1920 | - if(i3GeoMap.getFeatures().getChildNodes().item(i).getName() == nomeLayer) | |
1917 | + if(i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer) | |
1921 | 1918 | {indice = i3GeoMap.getFeatures().getChildNodes().item(i);} |
1922 | 1919 | } |
1923 | 1920 | return indice; |
... | ... | @@ -1934,7 +1931,7 @@ i3GEO.Interface = { |
1934 | 1931 | i3GeoMap.getGlobe(), |
1935 | 1932 | 'mousemove', |
1936 | 1933 | function(event){ |
1937 | - d = i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude()); | |
1934 | + d = i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude()); | |
1938 | 1935 | objposicaocursor = { |
1939 | 1936 | ddx: event.getLongitude(), |
1940 | 1937 | ddy: event.getLatitude(), |
... | ... | @@ -1947,7 +1944,7 @@ i3GEO.Interface = { |
1947 | 1944 | }; |
1948 | 1945 | i3GEO.eventos.mousemoveMapa(); |
1949 | 1946 | } |
1950 | - ); | |
1947 | + ); | |
1951 | 1948 | google.earth.addEventListener( |
1952 | 1949 | i3GeoMap.getGlobe(), |
1953 | 1950 | 'click', |
... | ... | @@ -1958,34 +1955,34 @@ i3GEO.Interface = { |
1958 | 1955 | else |
1959 | 1956 | {i3GEO.Interface.googleearth.aguarde.visibility = "hidden";} |
1960 | 1957 | } |
1961 | - ); | |
1958 | + ); | |
1962 | 1959 | }, |
1963 | 1960 | recalcPar: function(){ |
1964 | 1961 | var bounds; |
1965 | 1962 | bounds = i3GeoMap.getView().getViewportGlobeBounds(); |
1966 | - i3GEO.parametros.mapexten = bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth(); | |
1963 | + i3GEO.parametros.mapexten = bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth(); | |
1967 | 1964 | //i3GEO.parametros.mapscale = i3GEO.Interface.googlemaps.calcescala(); |
1968 | 1965 | }, |
1969 | 1966 | falha: function() |
1970 | 1967 | {alert("Falhou. Vc precisa do plugin instalado");}, |
1971 | 1968 | ativaBotoes: function(){ |
1972 | - var cabecalho = function(){}; | |
1973 | - var minimiza = function(){ | |
1974 | - i3GEO.janela.minimiza("i3GEOF.ferramentasGE"); | |
1975 | - }; | |
1976 | - var janela = i3GEO.janela.cria( | |
1977 | - "230px", | |
1978 | - "100px", | |
1979 | - "", | |
1980 | - "", | |
1981 | - "", | |
1982 | - "Ferramentas", | |
1983 | - "i3GEOF.ferramentasGE", | |
1984 | - false, | |
1985 | - "hd", | |
1986 | - cabecalho, | |
1987 | - minimiza | |
1988 | - ); | |
1969 | + var cabecalho = function(){}, | |
1970 | + minimiza = function(){ | |
1971 | + i3GEO.janela.minimiza("i3GEOF.ferramentasGE"); | |
1972 | + }, | |
1973 | + janela = i3GEO.janela.cria( | |
1974 | + "230px", | |
1975 | + "100px", | |
1976 | + "", | |
1977 | + "", | |
1978 | + "", | |
1979 | + "Ferramentas", | |
1980 | + "i3GEOF.ferramentasGE", | |
1981 | + false, | |
1982 | + "hd", | |
1983 | + cabecalho, | |
1984 | + minimiza | |
1985 | + ); | |
1989 | 1986 | i3GEO.barraDeBotoes.TEMPLATEBOTAO = '<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> '; |
1990 | 1987 | i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id); |
1991 | 1988 | i3GEO.barraDeBotoes.ativaBotoes(); |
... | ... | @@ -1995,26 +1992,26 @@ i3GEO.Interface = { |
1995 | 1992 | i3GEO.ajuda.abreJanela(); |
1996 | 1993 | }, |
1997 | 1994 | balao: function(texto,ddx,ddy){ |
1998 | - var placemark = i3GeoMap.createPlacemark(''); | |
1999 | - var point = i3GeoMap.createPoint(''); | |
1995 | + var placemark = i3GeoMap.createPlacemark(''), | |
1996 | + point = i3GeoMap.createPoint(''), | |
1997 | + b; | |
2000 | 1998 | point.setLatitude(ddy); |
2001 | 1999 | point.setLongitude(ddx); |
2002 | 2000 | placemark.setGeometry(point); |
2003 | - var b = i3GeoMap.createHtmlStringBalloon(''); | |
2001 | + b = i3GeoMap.createHtmlStringBalloon(''); | |
2004 | 2002 | b.setContentString("<div style=text-align:left >"+texto+"</div>"); |
2005 | 2003 | b.setFeature(placemark); |
2006 | 2004 | i3GeoMap.setBalloon(b); |
2007 | - //i3GEO.Interface.googleearth.aguarde.visibility = "hidden"; | |
2008 | 2005 | }, |
2009 | 2006 | insereMarca: function(description,ddx,ddy,name,snippet){ |
2010 | 2007 | if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.googleearth.insereMarca()");} |
2011 | - var placemark = i3GeoMap.createPlacemark(''); | |
2008 | + var placemark = i3GeoMap.createPlacemark(''), | |
2009 | + point = i3GeoMap.createPoint(''); | |
2012 | 2010 | placemark.setName(name); |
2013 | - var point = i3GeoMap.createPoint(''); | |
2014 | 2011 | point.setLatitude(ddy); |
2015 | 2012 | point.setLongitude(ddx); |
2016 | 2013 | placemark.setGeometry(point); |
2017 | - if(description != "") | |
2014 | + if(description !== "") | |
2018 | 2015 | {placemark.setDescription(description);} |
2019 | 2016 | placemark.setSnippet(snippet); |
2020 | 2017 | i3GeoMap.getFeatures().appendChild(placemark); |
... | ... | @@ -2024,33 +2021,40 @@ i3GEO.Interface = { |
2024 | 2021 | // |
2025 | 2022 | insereCirculo: function(centerLng,centerLat,radius,name,snippet){ |
2026 | 2023 | function makeCircle(centerLat, centerLng, radius) { |
2027 | - var ring = i3GeoMap.createLinearRing(''); | |
2028 | - var steps = 25; | |
2029 | - var pi2 = Math.PI * 2; | |
2030 | - for (var i = 0; i < steps; i++) { | |
2031 | - var lat = centerLat + radius * Math.cos(i / steps * pi2); | |
2032 | - var lng = centerLng + radius * Math.sin(i / steps * pi2); | |
2024 | + var ring = i3GeoMap.createLinearRing(''), | |
2025 | + steps = 25, | |
2026 | + i, | |
2027 | + pi2 = Math.PI * 2, | |
2028 | + lat, | |
2029 | + lng; | |
2030 | + for (i = 0; i < steps; i++) { | |
2031 | + lat = centerLat + radius * Math.cos(i / steps * pi2); | |
2032 | + lng = centerLng + radius * Math.sin(i / steps * pi2); | |
2033 | 2033 | ring.getCoordinates().pushLatLngAlt(lat, lng, 0); |
2034 | 2034 | } |
2035 | 2035 | return ring; |
2036 | 2036 | } |
2037 | - var polygonPlacemark = i3GeoMap.createPlacemark(''); | |
2038 | - var poly = i3GeoMap.createPolygon(''); | |
2037 | + var polygonPlacemark = i3GeoMap.createPlacemark(''), | |
2038 | + poly = i3GeoMap.createPolygon(''), | |
2039 | + outer, | |
2040 | + polyStyle; | |
2039 | 2041 | poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND); |
2040 | 2042 | polygonPlacemark.setGeometry(poly); |
2041 | - var outer = i3GeoMap.createLinearRing(''); | |
2043 | + outer = i3GeoMap.createLinearRing(''); | |
2042 | 2044 | polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat, centerLng, radius)); |
2043 | 2045 | polygonPlacemark.setName(name); |
2044 | 2046 | polygonPlacemark.setSnippet(snippet); |
2045 | 2047 | polygonPlacemark.setStyleSelector(i3GeoMap.createStyle('')); |
2046 | - var polyStyle = polygonPlacemark.getStyleSelector().getPolyStyle(); | |
2048 | + polyStyle = polygonPlacemark.getStyleSelector().getPolyStyle(); | |
2047 | 2049 | polyStyle.setFill(0); |
2048 | 2050 | i3GeoMap.getFeatures().appendChild(polygonPlacemark); |
2049 | 2051 | }, |
2050 | 2052 | insereLinha: function(xi,yi,xf,yf,name,snippet){ |
2051 | - var lineStringPlacemark = i3GeoMap.createPlacemark(''); | |
2053 | + var lineStringPlacemark = i3GeoMap.createPlacemark(''), | |
2054 | + lineString, | |
2055 | + lineStyle; | |
2052 | 2056 | lineStringPlacemark.setName(name); |
2053 | - var lineString = i3GeoMap.createLineString(''); | |
2057 | + lineString = i3GeoMap.createLineString(''); | |
2054 | 2058 | lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND); |
2055 | 2059 | lineStringPlacemark.setGeometry(lineString); |
2056 | 2060 | lineString.getCoordinates().pushLatLngAlt(yi, xi, 0); |
... | ... | @@ -2058,10 +2062,10 @@ i3GEO.Interface = { |
2058 | 2062 | |
2059 | 2063 | lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle('')); |
2060 | 2064 | lineStringPlacemark.setSnippet(snippet); |
2061 | - var lineStyle = lineStringPlacemark.getStyleSelector().getLineStyle(); | |
2065 | + lineStyle = lineStringPlacemark.getStyleSelector().getLineStyle(); | |
2062 | 2066 | lineStyle.setWidth(3); |
2063 | 2067 | |
2064 | - i3GeoMap.getFeatures().appendChild(lineStringPlacemark); | |
2068 | + i3GeoMap.getFeatures().appendChild(lineStringPlacemark); | |
2065 | 2069 | }, |
2066 | 2070 | removePlacemark: function(nome){ |
2067 | 2071 | var features = i3GeoMap.getFeatures(), |
... | ... | @@ -2070,7 +2074,7 @@ i3GEO.Interface = { |
2070 | 2074 | nfeatures = []; |
2071 | 2075 | for(i=0;i<n;i++){ |
2072 | 2076 | try{ |
2073 | - if(features.getChildNodes().item(i).getName() == nome || features.getChildNodes().item(i).getDescription() == nome || features.getChildNodes().item(i).getSnippet() == nome){ | |
2077 | + if(features.getChildNodes().item(i).getName() === nome || features.getChildNodes().item(i).getDescription() === nome || features.getChildNodes().item(i).getSnippet() === nome){ | |
2074 | 2078 | //features.getChildNodes().item(i).setVisibility(false); |
2075 | 2079 | nfeatures.push(features.getChildNodes().item(i)); |
2076 | 2080 | //features.removeChild(features.getChildNodes().item(i)); |
... | ... | @@ -2126,9 +2130,9 @@ i3GEO.Interface = { |
2126 | 2130 | {return;} |
2127 | 2131 | i3GEO.mapa.GEOXML.push(ngeoxml); |
2128 | 2132 | linki3geokml = i3GeoMap.createLink(''); |
2129 | - if(url.split("http").length == 1) | |
2133 | + if(url.split("http").length === 1) | |
2130 | 2134 | {url = i3GEO.util.protocolo()+"://"+window.location.host+url;} |
2131 | - linki3geokml.setHref(url); | |
2135 | + linki3geokml.setHref(url); | |
2132 | 2136 | eval(ngeoxml+" = i3GeoMap.createNetworkLink('')"); |
2133 | 2137 | eval(ngeoxml+".setLink(linki3geokml)"); |
2134 | 2138 | i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml); |
... | ... | @@ -2182,7 +2186,7 @@ i3GEO.Interface = { |
2182 | 2186 | html += " <span style='cursor:move'>"+nomeOverlay+"</span>"; |
2183 | 2187 | d = {html:html}; |
2184 | 2188 | nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); |
2185 | - nodekml.enableHighlight = false; | |
2189 | + nodekml.enableHighlight = false; | |
2186 | 2190 | nodekml.isleaf = true; |
2187 | 2191 | i3GEO.Interface.googleearth.ARVORE.draw(); |
2188 | 2192 | i3GEO.Interface.googleearth.ARVORE.collapseAll(); |
... | ... | @@ -2215,7 +2219,7 @@ i3GEO.Interface = { |
2215 | 2219 | i; |
2216 | 2220 | for(i=0;i<n;i++){ |
2217 | 2221 | try{ |
2218 | - if(features.getChildNodes().item(i).getLink().getHref() == url){ | |
2222 | + if(features.getChildNodes().item(i).getLink().getHref() === url){ | |
2219 | 2223 | existe = true; |
2220 | 2224 | } |
2221 | 2225 | } |
... | ... | @@ -2229,7 +2233,7 @@ i3GEO.Interface = { |
2229 | 2233 | i; |
2230 | 2234 | for(i=0;i<n;i++){ |
2231 | 2235 | try{ |
2232 | - if(features.getChildNodes().item(i).getLink().getHref() == url){ | |
2236 | + if(features.getChildNodes().item(i).getLink().getHref() === url){ | |
2233 | 2237 | features.getChildNodes().item(i).setVisibility(valor); |
2234 | 2238 | } |
2235 | 2239 | } |
... | ... | @@ -2246,14 +2250,14 @@ i3GEO.Interface = { |
2246 | 2250 | obj {object} - objeto do tipo checkbox que foi ativado/desativado |
2247 | 2251 | */ |
2248 | 2252 | ativaDesativaCamadaKml: function(obj){ |
2249 | - var url = eval(obj.value+".getLink().getHref()"); | |
2250 | - var existe = i3GEO.Interface.googleearth.existeLink(url); | |
2253 | + var url = eval(obj.value+".getLink().getHref()"), | |
2254 | + existe = i3GEO.Interface.googleearth.existeLink(url); | |
2251 | 2255 | if(!obj.checked){ |
2252 | - {i3GEO.Interface.googleearth.ativaDesativaLink(url,false);} | |
2256 | + i3GEO.Interface.googleearth.ativaDesativaLink(url,false); | |
2253 | 2257 | } |
2254 | 2258 | else |
2255 | 2259 | { |
2256 | - if(existe == false) | |
2260 | + if(existe === false) | |
2257 | 2261 | {eval("i3GeoMap.getFeatures().appendChild("+obj.value+")");} |
2258 | 2262 | else |
2259 | 2263 | {i3GEO.Interface.googleearth.ativaDesativaLink(url,true);} |
... | ... | @@ -2261,30 +2265,39 @@ i3GEO.Interface = { |
2261 | 2265 | }, |
2262 | 2266 | zoom2extent:function(mapexten){ |
2263 | 2267 | var r = 6378700, |
2264 | - ret = mapexten.split(" "), | |
2265 | - fov = 32, | |
2266 | - camera = i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND); | |
2267 | - var lng2 = (ret[0]*1); | |
2268 | - var lng1 = (ret[2]*1); | |
2269 | - var lat1 = (ret[1]*1); | |
2270 | - var lat2 = (ret[3]*1); | |
2268 | + lng2, | |
2269 | + lng1, | |
2270 | + lat1, | |
2271 | + lat2, | |
2272 | + ret = mapexten.split(" "), | |
2273 | + fov = 32, | |
2274 | + camera = i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND), | |
2275 | + dy, | |
2276 | + dx, | |
2277 | + d, | |
2278 | + dist, | |
2279 | + alt; | |
2280 | + lng2 = (ret[0]*1); | |
2281 | + lng1 = (ret[2]*1); | |
2282 | + lat1 = (ret[1]*1); | |
2283 | + lat2 = (ret[3]*1); | |
2271 | 2284 | camera.setLatitude((lat1 + lat2) / 2.0); |
2272 | 2285 | camera.setLongitude((lng1 + lng2) / 2.0); |
2273 | 2286 | camera.setHeading(0.0); |
2274 | 2287 | camera.setTilt(0.0); |
2275 | 2288 | // determine if the rectangle is portrait or landscape |
2276 | - var dy = Math.max(lat1, lat2) - Math.min(lat1, lat2); | |
2277 | - var dx = Math.max(lng1, lng2) - Math.min(lng1, lng2); | |
2289 | + dy = Math.max(lat1, lat2) - Math.min(lat1, lat2); | |
2290 | + dx = Math.max(lng1, lng2) - Math.min(lng1, lng2); | |
2278 | 2291 | // find the longest side |
2279 | - var d = Math.max(dy, dx); | |
2292 | + d = Math.max(dy, dx); | |
2280 | 2293 | // convert the longest side degrees to radians |
2281 | 2294 | d = d * Math.PI/180.0; |
2282 | 2295 | // find half the chord length |
2283 | - var dist = r * Math.tan(d / 2); | |
2296 | + dist = r * Math.tan(d / 2); | |
2284 | 2297 | // get the altitude using the chord length |
2285 | - var alt = dist/(Math.tan(fov * Math.PI / 180.0)); | |
2298 | + alt = dist/(Math.tan(fov * Math.PI / 180.0)); | |
2286 | 2299 | camera.setAltitude(alt); |
2287 | - i3GeoMap.getView().setAbstractView(camera); | |
2300 | + i3GeoMap.getView().setAbstractView(camera); | |
2288 | 2301 | }, |
2289 | 2302 | alteraParametroLayers: function(parametro,valor){ |
2290 | 2303 | parametro = parametro.toUpperCase(); |
... | ... | @@ -2294,9 +2307,4 @@ i3GEO.Interface = { |
2294 | 2307 | i3GEO.Interface.googleearth.redesenha(); |
2295 | 2308 | } |
2296 | 2309 | } |
2297 | -}; | |
2298 | -// | |
2299 | -//para efeitos de compatibilidade | |
2300 | -// | |
2301 | -i3GEO.interface = i3GEO.Interface; | |
2302 | -//YAHOO.log("carregou classe interface", "Classes i3geo"); | |
2303 | 2310 | \ No newline at end of file |
2311 | +}; | |
2304 | 2312 | \ No newline at end of file | ... | ... |
classesjs/classe_janela.js
... | ... | @@ -203,7 +203,7 @@ i3GEO.janela = { |
203 | 203 | */ |
204 | 204 | cria: function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){ |
205 | 205 | if(typeof(console) !== 'undefined'){console.info("i3GEO.janela.cria()");} |
206 | - var i,wlargura_,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr; | |
206 | + var i,wlargurA ,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr; | |
207 | 207 | if(i3GEO.janela.ANTESCRIA){ |
208 | 208 | for(i=0;i<i3GEO.janela.ANTESCRIA.length;i++) |
209 | 209 | {eval(i3GEO.janela.ANTESCRIA[i]);} |
... | ... | @@ -236,12 +236,12 @@ i3GEO.janela = { |
236 | 236 | if (arguments.length === 10){ |
237 | 237 | funcaoMinimiza = null; |
238 | 238 | } |
239 | - if(i3GEO.Interface.ATUAL == "googleearth") | |
239 | + if(i3GEO.Interface.ATUAL === "googleearth") | |
240 | 240 | { |
241 | 241 | classe = "hd"; |
242 | 242 | i3GEO.janela.TRANSICAOSUAVE = false; |
243 | 243 | } |
244 | - wlargura_ = parseInt(wlargura,10)+2+"px"; | |
244 | + wlargurA = parseInt(wlargura,10)+2+"px"; | |
245 | 245 | if($i(id)) |
246 | 246 | {YAHOO.janelaDoca.xp.panel.destroy();} |
247 | 247 | i3GEO.util.removeChild(id+"_c"); |
... | ... | @@ -268,7 +268,7 @@ i3GEO.janela = { |
268 | 268 | }; |
269 | 269 | novoel.onmouseout = function(){ |
270 | 270 | YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE / 100); |
271 | - }; | |
271 | + }; | |
272 | 272 | } |
273 | 273 | else{ |
274 | 274 | YAHOO.util.Dom.setStyle(novoel,"opacity",1); |
... | ... | @@ -301,16 +301,16 @@ i3GEO.janela = { |
301 | 301 | else |
302 | 302 | {ifr = false;} |
303 | 303 | if(waltura === "auto") |
304 | - {YAHOO.janelaDoca.xp.panel = new YAHOO.widget.Panel(id, { iframe:ifr,modal:modal, width: wlargura_,underlay:"none", fixedcenter: fix, constraintoviewport: false, visible: true,monitorresize:false,dragOnly:true,keylisteners:null} );} | |
305 | - else{YAHOO.janelaDoca.xp.panel = new YAHOO.widget.ResizePanel(id, { iframe:ifr,underlay:underlay, modal:modal, width: wlargura_, fixedcenter: fix, constraintoviewport: false, visible: true,monitorresize:false,dragOnly:true,keylisteners:null} );} | |
304 | + {YAHOO.janelaDoca.xp.panel = new YAHOO.widget.Panel(id, { iframe:ifr,modal:modal, width: wlargurA,underlay:"none", fixedcenter: fix, constraintoviewport: false, visible: true,monitorresize:false,dragOnly:true,keylisteners:null} );} | |
305 | + else{YAHOO.janelaDoca.xp.panel = new YAHOO.widget.ResizePanel(id, { iframe:ifr,underlay:underlay, modal:modal, width: wlargurA, fixedcenter: fix, constraintoviewport: false, visible: true,monitorresize:false,dragOnly:true,keylisteners:null} );} | |
306 | 306 | if(nx !== "" && nx !== "center"){ |
307 | 307 | YAHOO.janelaDoca.xp.panel.moveTo(nx,ny + 50); |
308 | 308 | } |
309 | 309 | YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel); |
310 | 310 | YAHOO.janelaDoca.xp.panel.render(); |
311 | - if(navm && id !== "i3geo_janelaMensagens" && i3GEO.Interface.ATUAL == "googleearth") | |
311 | + if(navm && id !== "i3geo_janelaMensagens" && i3GEO.Interface.ATUAL === "googleearth") | |
312 | 312 | {YAHOO.janelaDoca.xp.panel.moveTo(0,0);} |
313 | - if(ifr == true) | |
313 | + if(ifr === true) | |
314 | 314 | {YAHOO.janelaDoca.xp.panel.iframe.style.zIndex = 0;} |
315 | 315 | if(modal === true){ |
316 | 316 | if($i(id+"_mask")){ |
... | ... | @@ -463,19 +463,19 @@ i3GEO.janela = { |
463 | 463 | for(index=0; index<i3GEO.contadorAtualiza; index++) { |
464 | 464 | contador = contador + "."; |
465 | 465 | } |
466 | - eval ('YAHOO.aguarde.'+id+' = new YAHOO.widget.Panel("'+id+'",{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:'+i3GEO.janela.AGUARDEMODAL.toString()+',monitorresize:false})'); | |
466 | + eval('YAHOO.aguarde.'+id+' = new YAHOO.widget.Panel("'+id+'",{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:'+i3GEO.janela.AGUARDEMODAL.toString()+',monitorresize:false})'); | |
467 | 467 | if(i3GEO.janela.ESTILOAGUARDE === "normal" || i3GEO.janela.ESTILOAGUARDE === "reduzida"){ |
468 | - eval ('YAHOO.aguarde.'+id+'.setBody(texto)'); | |
469 | - eval ('YAHOO.aguarde.'+id+'.body.style.padding="5px"'); | |
468 | + eval('YAHOO.aguarde.'+id+'.setBody(texto)'); | |
469 | + eval('YAHOO.aguarde.'+id+'.body.style.padding="5px"'); | |
470 | 470 | } |
471 | 471 | if(i3GEO.janela.ESTILOAGUARDE === "normal" || i3GEO.janela.ESTILOAGUARDE === "minima") |
472 | - {eval ('YAHOO.aguarde.'+id+'.setHeader("<span><img id=aguardeGifAberto src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span> <span style=font-size:8px >'+contador+'</span>")');} | |
473 | - eval ('YAHOO.aguarde.'+id+'.render(document.body)'); | |
472 | + {eval('YAHOO.aguarde.'+id+'.setHeader("<span><img id=aguardeGifAberto src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span> <span style=font-size:8px >'+contador+'</span>")');} | |
473 | + eval('YAHOO.aguarde.'+id+'.render(document.body)'); | |
474 | 474 | if(i3GEO.parametros.w > 0) |
475 | - {eval ('YAHOO.aguarde.'+id+'.moveTo('+(pos[0] + (i3GEO.parametros.w / 2) - 120)+','+pos[1]+')');} | |
475 | + {eval('YAHOO.aguarde.'+id+'.moveTo('+(pos[0] + (i3GEO.parametros.w / 2) - 120)+','+pos[1]+')');} | |
476 | 476 | else |
477 | - {eval ('YAHOO.aguarde.'+id+'.moveTo('+pos[0]+','+pos[1]+')');} | |
478 | - eval ('YAHOO.aguarde.'+id+'.show()'); | |
477 | + {eval('YAHOO.aguarde.'+id+'.moveTo('+pos[0]+','+pos[1]+')');} | |
478 | + eval('YAHOO.aguarde.'+id+'.show()'); | |
479 | 479 | if($i(id+"_mask")) |
480 | 480 | {$i(id+"_mask").style.zIndex=25000;} |
481 | 481 | if($i(id+"_c")){ |
... | ... | @@ -588,42 +588,42 @@ i3GEO.janela = { |
588 | 588 | novoel.tabindex = "-1"; |
589 | 589 | novoel.innerHTML = '<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>'; |
590 | 590 | janela[2].appendChild(novoel); |
591 | - Event = YAHOO.util.Event; | |
592 | - Dom = YAHOO.util.Dom; | |
593 | - lang = YAHOO.lang; | |
594 | - bg="slider-bg"; | |
595 | - thumb="slider-thumb"; | |
596 | - valuearea="slider-value"; | |
597 | - textfield="slider-converted-value"; | |
591 | + Event = YAHOO.util.Event; | |
592 | + Dom = YAHOO.util.Dom; | |
593 | + lang = YAHOO.lang; | |
594 | + bg="slider-bg"; | |
595 | + thumb="slider-thumb"; | |
596 | + valuearea="slider-value"; | |
597 | + textfield="slider-converted-value"; | |
598 | 598 | novoel.style.position = "relative"; |
599 | - novoel.style.background= 'url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat'; | |
600 | - novoel.style.height = "28px"; | |
601 | - novoel.style.width= "228px"; | |
602 | - // The slider can move 0 pixels up | |
603 | - topConstraint = 0; | |
604 | - // The slider can move 200 pixels down | |
605 | - bottomConstraint = 200; | |
606 | - // Custom scale factor for converting the pixel offset into a real value | |
607 | - scaleFactor = 1; | |
608 | - // The amount the slider moves when the value is changed with the arrow | |
609 | - // keys | |
610 | - keyIncrement = 20; | |
611 | - tickSize = 20; | |
612 | - Event.onDOMReady(function() { | |
613 | - slider = YAHOO.widget.Slider.getHorizSlider(bg,thumb, topConstraint, bottomConstraint, 20); | |
614 | - slider.setValue(parseInt(inicial,10)); | |
615 | - slider.getRealValue = function() { | |
616 | - return Math.round(this.getValue() * scaleFactor); | |
617 | - }; | |
618 | - slider.subscribe("slideEnd", function(offsetFromStart) { | |
619 | - var actualValue = slider.getRealValue(); | |
620 | - eval(funcao+"("+actualValue+")"); | |
599 | + novoel.style.background= 'url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat'; | |
600 | + novoel.style.height = "28px"; | |
601 | + novoel.style.width= "228px"; | |
602 | + // The slider can move 0 pixels up | |
603 | + topConstraint = 0; | |
604 | + // The slider can move 200 pixels down | |
605 | + bottomConstraint = 200; | |
606 | + // Custom scale factor for converting the pixel offset into a real value | |
607 | + scaleFactor = 1; | |
608 | + // The amount the slider moves when the value is changed with the arrow | |
609 | + // keys | |
610 | + keyIncrement = 20; | |
611 | + tickSize = 20; | |
612 | + Event.onDOMReady(function() { | |
613 | + slider = YAHOO.widget.Slider.getHorizSlider(bg,thumb, topConstraint, bottomConstraint, 20); | |
614 | + slider.setValue(parseInt(inicial,10)); | |
615 | + slider.getRealValue = function() { | |
616 | + return Math.round(this.getValue() * scaleFactor); | |
617 | + }; | |
618 | + slider.subscribe("slideEnd", function(offsetFromStart) { | |
619 | + var actualValue = slider.getRealValue(); | |
620 | + eval(funcao+"("+actualValue+")"); | |
621 | 621 | }); |
622 | - }); | |
623 | - // Use setValue to reset the value to white: | |
624 | - Event.on("putval", "click", function(e) { | |
625 | - slider.setValue(100, false); //false here means to animate if possible | |
626 | - }); | |
622 | + }); | |
623 | + // Use setValue to reset the value to white: | |
624 | + Event.on("putval", "click", function(e) { | |
625 | + slider.setValue(100, false); //false here means to animate if possible | |
626 | + }); | |
627 | 627 | }, |
628 | 628 | /* |
629 | 629 | Function: fechaAguarde |
... | ... | @@ -687,100 +687,100 @@ try{ |
687 | 687 | //controle dos painéis que podem ser redimensionados |
688 | 688 | YAHOO.widget.ResizePanel = function(el, userConfig) |
689 | 689 | { |
690 | - if (arguments.length > 0) | |
691 | - {YAHOO.widget.ResizePanel.superclass.constructor.call(this, el, userConfig);} | |
690 | + if (arguments.length > 0) | |
691 | + {YAHOO.widget.ResizePanel.superclass.constructor.call(this, el, userConfig);} | |
692 | 692 | }; |
693 | 693 | YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE = "yui-resizepanel"; |
694 | 694 | YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE = "resizehandle"; |
695 | 695 | YAHOO.extend( |
696 | 696 | YAHOO.widget.ResizePanel, YAHOO.widget.Panel,{ |
697 | - init: function(el, userConfig){ | |
698 | - YAHOO.widget.ResizePanel.superclass.init.call(this, el); | |
699 | - this.beforeInitEvent.fire(YAHOO.widget.ResizePanel); | |
700 | - var Dom = YAHOO.util.Dom, | |
701 | - Event = YAHOO.util.Event, | |
702 | - oInnerElement = this.innerElement, | |
703 | - oResizeHandle = document.createElement("DIV"), | |
704 | - sResizeHandleId = this.id + "_resizehandle"; | |
705 | - oResizeHandle.id = sResizeHandleId; | |
706 | - oResizeHandle.className = YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE; | |
707 | - Dom.addClass(oInnerElement, YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE); | |
708 | - this.resizeHandle = oResizeHandle; | |
709 | - function initResizeFunctionality(){ | |
710 | - var me = this, | |
711 | - oHeader = this.header, | |
712 | - oBody = this.body, | |
713 | - oFooter = this.footer, | |
714 | - nStartWidth, | |
715 | - nStartHeight, | |
716 | - aStartPos, | |
717 | - nBodyBorderTopWidth, | |
718 | - nBodyBorderBottomWidth, | |
719 | - nBodyTopPadding, | |
720 | - nBodyBottomPadding, | |
721 | - nBodyOffset; | |
722 | - oInnerElement.appendChild(oResizeHandle); | |
723 | - this.ddResize = new YAHOO.util.DragDrop(sResizeHandleId, this.id); | |
724 | - this.ddResize.setHandleElId(sResizeHandleId); | |
725 | - this.ddResize.onMouseDown = function(e){ | |
726 | - nStartWidth = oInnerElement.offsetWidth; | |
727 | - nStartHeight = oInnerElement.offsetHeight; | |
728 | - if (YAHOO.env.ua.ie && document.compatMode === "BackCompat") | |
729 | - {nBodyOffset = 0;} | |
730 | - else{ | |
731 | - nBodyBorderTopWidth = parseInt(Dom.getStyle(oBody, "borderTopWidth"), 10); | |
732 | - nBodyBorderBottomWidth = parseInt(Dom.getStyle(oBody, "borderBottomWidth"), 10); | |
733 | - nBodyTopPadding = parseInt(Dom.getStyle(oBody, "paddingTop"), 10); | |
734 | - nBodyBottomPadding = parseInt(Dom.getStyle(oBody, "paddingBottom"), 10); | |
735 | - nBodyOffset = nBodyBorderTopWidth + nBodyBorderBottomWidth + nBodyTopPadding + nBodyBottomPadding; | |
736 | - } | |
697 | + init: function(el, userConfig){ | |
698 | + YAHOO.widget.ResizePanel.superclass.init.call(this, el); | |
699 | + this.beforeInitEvent.fire(YAHOO.widget.ResizePanel); | |
700 | + var Dom = YAHOO.util.Dom, | |
701 | + Event = YAHOO.util.Event, | |
702 | + oInnerElement = this.innerElement, | |
703 | + oResizeHandle = document.createElement("DIV"), | |
704 | + sResizeHandleId = this.id + "_resizehandle"; | |
705 | + oResizeHandle.id = sResizeHandleId; | |
706 | + oResizeHandle.className = YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE; | |
707 | + Dom.addClass(oInnerElement, YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE); | |
708 | + this.resizeHandle = oResizeHandle; | |
709 | + function initResizeFunctionality(){ | |
710 | + var me = this, | |
711 | + oHeader = this.header, | |
712 | + oBody = this.body, | |
713 | + oFooter = this.footer, | |
714 | + nStartWidth, | |
715 | + nStartHeight, | |
716 | + aStartPos, | |
717 | + nBodyBorderTopWidth, | |
718 | + nBodyBorderBottomWidth, | |
719 | + nBodyTopPadding, | |
720 | + nBodyBottomPadding, | |
721 | + nBodyOffset; | |
722 | + oInnerElement.appendChild(oResizeHandle); | |
723 | + this.ddResize = new YAHOO.util.DragDrop(sResizeHandleId, this.id); | |
724 | + this.ddResize.setHandleElId(sResizeHandleId); | |
725 | + this.ddResize.onMouseDown = function(e){ | |
726 | + nStartWidth = oInnerElement.offsetWidth; | |
727 | + nStartHeight = oInnerElement.offsetHeight; | |
728 | + if (YAHOO.env.ua.ie && document.compatMode === "BackCompat") | |
729 | + {nBodyOffset = 0;} | |
730 | + else{ | |
731 | + nBodyBorderTopWidth = parseInt(Dom.getStyle(oBody, "borderTopWidth"), 10); | |
732 | + nBodyBorderBottomWidth = parseInt(Dom.getStyle(oBody, "borderBottomWidth"), 10); | |
733 | + nBodyTopPadding = parseInt(Dom.getStyle(oBody, "paddingTop"), 10); | |
734 | + nBodyBottomPadding = parseInt(Dom.getStyle(oBody, "paddingBottom"), 10); | |
735 | + nBodyOffset = nBodyBorderTopWidth + nBodyBorderBottomWidth + nBodyTopPadding + nBodyBottomPadding; | |
736 | + } | |
737 | 737 | // |
738 | 738 | //ajusta o tamanho do body no IE qd a janela é redimensionada |
739 | 739 | // |
740 | 740 | me.cfg.setProperty("width", nStartWidth + "px"); |
741 | - aStartPos = [Event.getPageX(e), Event.getPageY(e)]; | |
742 | - }; | |
743 | - this.ddResize.onDrag = function(e){ | |
744 | - var aNewPos = [Event.getPageX(e), Event.getPageY(e)], | |
745 | - nOffsetX = aNewPos[0] - aStartPos[0], | |
746 | - nOffsetY = aNewPos[1] - aStartPos[1], | |
747 | - nNewWidth = Math.max(nStartWidth + nOffsetX, 10), | |
748 | - nNewHeight = Math.max(nStartHeight + nOffsetY, 10), | |
749 | - nBodyHeight = (nNewHeight - (oFooter.offsetHeight + oHeader.offsetHeight + nBodyOffset)); | |
741 | + aStartPos = [Event.getPageX(e), Event.getPageY(e)]; | |
742 | + }; | |
743 | + this.ddResize.onDrag = function(e){ | |
744 | + var aNewPos = [Event.getPageX(e), Event.getPageY(e)], | |
745 | + nOffsetX = aNewPos[0] - aStartPos[0], | |
746 | + nOffsetY = aNewPos[1] - aStartPos[1], | |
747 | + nNewWidth = Math.max(nStartWidth + nOffsetX, 10), | |
748 | + nNewHeight = Math.max(nStartHeight + nOffsetY, 10), | |
749 | + nBodyHeight = (nNewHeight - (oFooter.offsetHeight + oHeader.offsetHeight + nBodyOffset)); | |
750 | 750 | me.cfg.setProperty("width", nNewWidth + "px"); |
751 | 751 | if(navm) |
752 | 752 | {nNewWidth = nNewWidth - 2;} |
753 | - oBody.style.width = nNewWidth - 2 +"px"; | |
754 | - if (nBodyHeight < 0) | |
755 | - {nBodyHeight = 0;} | |
756 | - oBody.style.height = nBodyHeight + "px"; | |
757 | - if ($i("wdocai")){ | |
753 | + oBody.style.width = nNewWidth - 2 +"px"; | |
754 | + if (nBodyHeight < 0) | |
755 | + {nBodyHeight = 0;} | |
756 | + oBody.style.height = nBodyHeight + "px"; | |
757 | + if ($i("wdocai")){ | |
758 | 758 | $i("wdocai").style.height = nBodyHeight; |
759 | 759 | $i("wdocai").style.width = oBody.style.width; |
760 | 760 | } |
761 | - }; | |
762 | - this.ddResize.onMouseUp = this.ddResize.onDrag.call(); | |
763 | - } | |
764 | - function onBeforeShow(){ | |
765 | - initResizeFunctionality.call(this); | |
766 | - this.unsubscribe("beforeShow", onBeforeShow); | |
767 | - } | |
768 | - function onBeforeRender(){ | |
769 | - if (!this.footer) | |
770 | - {this.setFooter("");} | |
771 | - if (this.cfg.getProperty("visible")) | |
772 | - {initResizeFunctionality.call(this);} | |
773 | - else | |
774 | - {this.subscribe("beforeShow", onBeforeShow);} | |
775 | - this.unsubscribe("beforeRender", onBeforeRender); | |
776 | - } | |
777 | - this.subscribe("beforeRender", onBeforeRender); | |
778 | - if (userConfig) | |
779 | - {this.cfg.applyConfig(userConfig, true);} | |
780 | - this.initEvent.fire(YAHOO.widget.ResizePanel); | |
781 | - }, | |
782 | - toString: function() | |
783 | - {return "ResizePanel " + this.id;} | |
761 | + }; | |
762 | + this.ddResize.onMouseUp = this.ddResize.onDrag.call(); | |
763 | + } | |
764 | + function onBeforeShow(){ | |
765 | + initResizeFunctionality.call(this); | |
766 | + this.unsubscribe("beforeShow", onBeforeShow); | |
767 | + } | |
768 | + function onBeforeRender(){ | |
769 | + if (!this.footer) | |
770 | + {this.setFooter("");} | |
771 | + if (this.cfg.getProperty("visible")) | |
772 | + {initResizeFunctionality.call(this);} | |
773 | + else | |
774 | + {this.subscribe("beforeShow", onBeforeShow);} | |
775 | + this.unsubscribe("beforeRender", onBeforeRender); | |
776 | + } | |
777 | + this.subscribe("beforeRender", onBeforeRender); | |
778 | + if (userConfig) | |
779 | + {this.cfg.applyConfig(userConfig, true);} | |
780 | + this.initEvent.fire(YAHOO.widget.ResizePanel); | |
781 | + }, | |
782 | + toString: function() | |
783 | + {return "ResizePanel " + this.id;} | |
784 | 784 | } |
785 | 785 | ); |
786 | 786 | } | ... | ... |
classesjs/classe_mapa.js
... | ... | @@ -240,7 +240,7 @@ i3GEO.mapa = { |
240 | 240 | permitindo que seja criada a janela flutuante apenas, por exemplo: |
241 | 241 | |
242 | 242 | i3GEO.mapa.legendaHTML.cria(""); |
243 | - i3GEO.mapa.legendaHTML.libera(); | |
243 | + i3GEO.mapa.legendaHTML.libera(); | |
244 | 244 | |
245 | 245 | Parametros: |
246 | 246 | |
... | ... | @@ -253,7 +253,7 @@ i3GEO.mapa = { |
253 | 253 | i3GEO.mapa.legendaHTML.ID = id; |
254 | 254 | if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()") < 0) |
255 | 255 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()");} |
256 | - i3GEO.mapa.legendaHTML.atualiza(); | |
256 | + i3GEO.mapa.legendaHTML.atualiza(); | |
257 | 257 | }, |
258 | 258 | /* |
259 | 259 | Function: atualiza |
... | ... | @@ -600,7 +600,7 @@ i3GEO.mapa = { |
600 | 600 | {return;} |
601 | 601 | if(i3GEO.Interface.ATUAL==="padrao") |
602 | 602 | {$i("img").style.cursor = "wait";} |
603 | - if(i3GEO.Interface.ATUAL == "googleearth") | |
603 | + if(i3GEO.Interface.ATUAL === "googleearth") | |
604 | 604 | {i3GEO.Interface.googleearth.aguarde.visibility = "visible";} |
605 | 605 | retorna = function(retorno){ |
606 | 606 | var temp,rfes,n,balloon,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s; |
... | ... | @@ -703,7 +703,7 @@ i3GEO.mapa = { |
703 | 703 | {temp = "identifica_contexto";} |
704 | 704 | i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic); |
705 | 705 | } |
706 | - if(i3GEO.Interface.ATUAL == "googleearth") | |
706 | + if(i3GEO.Interface.ATUAL === "googleearth") | |
707 | 707 | {i3GEO.Interface.googleearth.aguarde.visibility = "hidden";} |
708 | 708 | if(typeof(console) !== 'undefined'){console.error(e);} |
709 | 709 | } | ... | ... |
classesjs/classe_maparef.js
... | ... | @@ -159,7 +159,7 @@ i3GEO.maparef = { |
159 | 159 | temp = "javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();"; |
160 | 160 | ins += "<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />"; |
161 | 161 | temp = "javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();"; |
162 | - ins += "<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> "; | |
162 | + ins += "<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> "; | |
163 | 163 | if(i3GEO.maparef.SELETORTIPO){ |
164 | 164 | ins += "<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>"; |
165 | 165 | ins += "<option value='fixo' select >fixo</option>"; |
... | ... | @@ -177,7 +177,7 @@ i3GEO.maparef = { |
177 | 177 | if(i3GEO.maparef.TRANSICAOSUAVE){ |
178 | 178 | YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE / 100); |
179 | 179 | novoel.onmouseover = function(){ |
180 | - YAHOO.util.Dom.setStyle(novoel,"opacity",1); | |
180 | + YAHOO.util.Dom.setStyle(novoel,"opacity",1); | |
181 | 181 | }; |
182 | 182 | novoel.onmouseout = function(){ |
183 | 183 | YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE / 100); |
... | ... | @@ -200,16 +200,16 @@ i3GEO.maparef = { |
200 | 200 | $i("i3geo_winRef").style.border = "1px solid gray"; |
201 | 201 | moveX = pos[0] + i3GEO.parametros.w + 153 - i3GEO.maparef.RIGHT - 300; |
202 | 202 | moveY = pos[1] + i3GEO.maparef.TOP; |
203 | - if(i3GEO.Interface.ATUAL == "googlemaps") | |
203 | + if(i3GEO.Interface.ATUAL === "googlemaps") | |
204 | 204 | {moveY += 30;} |
205 | 205 | YAHOO.janelaRef.xp.panel.moveTo(moveX,moveY); |
206 | 206 | escondeRef = function(){ |
207 | 207 | YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close, "click"); |
208 | 208 | $i("imagemReferencia").src = ""; |
209 | - YAHOO.janelaRef.xp.panel.destroy(); | |
209 | + YAHOO.janelaRef.xp.panel.destroy(); | |
210 | 210 | i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none"); |
211 | 211 | }; |
212 | - YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close, "click", escondeRef); | |
212 | + YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close, "click", escondeRef); | |
213 | 213 | i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block"); |
214 | 214 | |
215 | 215 | if(typeof(atualizaLocalizarxy) === "function"){ |
... | ... | @@ -240,12 +240,12 @@ i3GEO.maparef = { |
240 | 240 | Se houve alteração na extensão, é preciso refazer o mapa de referência se não, a imagem atual é armazenada no quado de animação |
241 | 241 | */ |
242 | 242 | atualiza: function(forca){ |
243 | - if(arguments.length == 0) | |
243 | + if(arguments.length === 0) | |
244 | 244 | {forca = false;} |
245 | 245 | if(typeof(console) !== 'undefined'){console.info("i3GEO.maparef.atualiza()");} |
246 | 246 | var dinamico,tiporef,temp,re; |
247 | 247 | dinamico = false; |
248 | - $i("refDinamico") ? tiporef = $i("refDinamico").value : tiporef = "fixo";; | |
248 | + temp = $i("refDinamico") ? tiporef = $i("refDinamico").value : tiporef = "fixo"; | |
249 | 249 | if ($i("mapaReferencia")){ |
250 | 250 | temp = $i("maparefmaismenosZoom"); |
251 | 251 | if(tiporef === "dinamico"){ |
... | ... | @@ -256,11 +256,11 @@ i3GEO.maparef = { |
256 | 256 | // |
257 | 257 | //no modo cgi ativado, a obtenção da imagem é feita de forma diferente do modo normal do mapa |
258 | 258 | // |
259 | - if($i("imagemReferencia").src == "" || i3GEO.parametros.utilizacgi !== "sim"){ | |
259 | + if($i("imagemReferencia").src === "" || i3GEO.parametros.utilizacgi !== "sim"){ | |
260 | 260 | // |
261 | 261 | //se o valor do tamanho da celula já existir, não é necessário redesenhar a imagem |
262 | 262 | // |
263 | - if(i3GEO.parametros.celularef === "" || $i("imagemReferencia").src == "" || forca == true) | |
263 | + if(i3GEO.parametros.celularef === "" || $i("imagemReferencia").src === "" || forca === true) | |
264 | 264 | {i3GEO.php.referencia(i3GEO.maparef.processaImagem);} |
265 | 265 | else |
266 | 266 | {i3GEO.maparef.atualizaBox();} | ... | ... |
classesjs/classe_navega.js
... | ... | @@ -309,7 +309,7 @@ i3GEO.navega = { |
309 | 309 | "i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');"; |
310 | 310 | if(i3GEO.navega.timerNavega !== undefined) |
311 | 311 | {clearTimeout(i3GEO.navega.timerNavega);} |
312 | - i3GEO.navega.timerNavega = setTimeout(f,i3GEO.navega.TEMPONAVEGAR); | |
312 | + i3GEO.navega.timerNavega = setTimeout(f,i3GEO.navega.TEMPONAVEGAR); | |
313 | 313 | }, |
314 | 314 | /* |
315 | 315 | Function: aplicaEscala |
... | ... | @@ -338,7 +338,7 @@ i3GEO.navega = { |
338 | 338 | "i3GEO.php.mudaescala(i3GEO.atualiza,"+escala+");"; |
339 | 339 | if(i3GEO.navega.timerNavega !== undefined) |
340 | 340 | {clearTimeout(i3GEO.navega.timerNavega);} |
341 | - i3GEO.navega.timerNavega = setTimeout(f,i3GEO.navega.TEMPONAVEGAR); | |
341 | + i3GEO.navega.timerNavega = setTimeout(f,i3GEO.navega.TEMPONAVEGAR); | |
342 | 342 | } |
343 | 343 | if(i3GEO.Interface.ATUAL === "googlemaps"){ |
344 | 344 | i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala)); |
... | ... | @@ -414,7 +414,7 @@ i3GEO.navega = { |
414 | 414 | y = h - (h / 6); |
415 | 415 | x = w / 6; |
416 | 416 | break; |
417 | - }; | |
417 | + } | |
418 | 418 | if(i3GEO.Interface.ATUAL === "openlayers"){ |
419 | 419 | i3geoOL.pan(x,y); |
420 | 420 | return; |
... | ... | @@ -426,7 +426,7 @@ i3GEO.navega = { |
426 | 426 | catch(e){ |
427 | 427 | if(typeof(console) !== 'undefined'){console.error(e);} |
428 | 428 | } |
429 | - i3GEO.navega.timerNavega = setTimeout(f,i3GEO.navega.TEMPONAVEGAR); | |
429 | + i3GEO.navega.timerNavega = setTimeout(f,i3GEO.navega.TEMPONAVEGAR); | |
430 | 430 | }, |
431 | 431 | /* |
432 | 432 | Function: panFixoNorte |
... | ... | @@ -513,7 +513,7 @@ i3GEO.navega = { |
513 | 513 | setas += "<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>"; |
514 | 514 | setas += "<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>"; |
515 | 515 | i = $i("i3geo_rosa"); |
516 | - i.innerHTML = setas; | |
516 | + i.innerHTML = setas; | |
517 | 517 | i.style.top = objposicaocursor.telay - 27; |
518 | 518 | i.style.left = objposicaocursor.telax - 27; |
519 | 519 | i.style.display="block"; |
... | ... | @@ -683,7 +683,7 @@ i3GEO.navega = { |
683 | 683 | {novoel.style.opacity = 0.25;} |
684 | 684 | novoel.style.backgroundColor = "gray"; |
685 | 685 | novoel.style.position="absolute"; |
686 | - novoel.style.border = "2px solid #ff0000"; | |
686 | + novoel.style.border = "2px solid #ff0000"; | |
687 | 687 | if (navm) |
688 | 688 | {novoel.style.filter = "alpha(opacity=25)";} |
689 | 689 | novoel.onmousemove = function(){ |
... | ... | @@ -876,7 +876,7 @@ i3GEO.navega = { |
876 | 876 | $i("imgS").src=sul; |
877 | 877 | $i("imgN").src=norte; |
878 | 878 | $i("imgL").src=leste; |
879 | - $i("imgO").src=oeste; | |
879 | + $i("imgO").src=oeste; | |
880 | 880 | }, |
881 | 881 | /* |
882 | 882 | Function: ajustaPosicao |
... | ... | @@ -893,7 +893,7 @@ i3GEO.navega = { |
893 | 893 | $top("imgS",i3GEO.parametros.h*-1); |
894 | 894 | $top("imgL",i3GEO.parametros.h*-1); |
895 | 895 | $top("imgN",i3GEO.parametros.h*-1); |
896 | - $top("imgO",i3GEO.parametros.h*-1); | |
896 | + $top("imgO",i3GEO.parametros.h*-1); | |
897 | 897 | } |
898 | 898 | }, |
899 | 899 | /* |
... | ... | @@ -1158,7 +1158,7 @@ i3GEO.navega = { |
1158 | 1158 | novoel.src = m.src; |
1159 | 1159 | novoel.style.display = "block"; |
1160 | 1160 | $i("div_d").appendChild(novoel); |
1161 | - i3GEO.janela.fechaAguarde("ajaxdestaca"); | |
1161 | + i3GEO.janela.fechaAguarde("ajaxdestaca"); | |
1162 | 1162 | }; |
1163 | 1163 | i3GEO.janela.abreAguarde("ajaxdestaca","Aguarde...gerando imagem"); |
1164 | 1164 | i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten); |
... | ... | @@ -1216,7 +1216,7 @@ i3GEO.navega = { |
1216 | 1216 | else |
1217 | 1217 | {temp += '<div id=vertMenosZoom ></div>';} |
1218 | 1218 | if (navn){temp += '</div>';} |
1219 | - return temp; | |
1219 | + return temp; | |
1220 | 1220 | }, |
1221 | 1221 | /* |
1222 | 1222 | Function: ativa |
... | ... | @@ -1244,7 +1244,7 @@ i3GEO.navega = { |
1244 | 1244 | catch(e){ |
1245 | 1245 | if(typeof(console) !== 'undefined'){console.error(e);} |
1246 | 1246 | } |
1247 | - i3GEO.navega.timerNavega = setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR); | |
1247 | + i3GEO.navega.timerNavega = setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR); | |
1248 | 1248 | if(g_fatordezoom < -6){ |
1249 | 1249 | $i("vertBGDiv").onmouseup.call(); |
1250 | 1250 | } |
... | ... | @@ -1279,7 +1279,7 @@ i3GEO.navega = { |
1279 | 1279 | if($i("vertBGDiv")){ |
1280 | 1280 | $i("vertBGDiv").onmouseup = function(){ |
1281 | 1281 | verticalSlider.setValue(35,true); |
1282 | - if(g_fatordezoom != 0){ | |
1282 | + if(g_fatordezoom !== 0){ | |
1283 | 1283 | temp = i3GEO.navega.TEMPONAVEGAR; |
1284 | 1284 | i3GEO.navega.TEMPONAVEGAR = 0; |
1285 | 1285 | i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns); |
... | ... | @@ -1292,8 +1292,8 @@ i3GEO.navega = { |
1292 | 1292 | $i("vertHandleDivZoom").onmousedown = function(){ |
1293 | 1293 | var iclone,corpo; |
1294 | 1294 | $i("vertHandleDivZoom").onmouseout = function(e){ |
1295 | - if (!e) e = window.event; | |
1296 | - if (g_fatordezoom != 0) | |
1295 | + if (!e) {e = window.event;} | |
1296 | + if (g_fatordezoom !== 0) | |
1297 | 1297 | {$i("vertBGDiv").onmouseup.call();} |
1298 | 1298 | e.onmouseup.returnValue = false; |
1299 | 1299 | e.onmouseout.returnValue = false; | ... | ... |
classesjs/classe_php.js
... | ... | @@ -123,7 +123,7 @@ i3GEO.php = { |
123 | 123 | pegaMensagens: function(funcao){ |
124 | 124 | i3GEO.php.verifica(); |
125 | 125 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMensagens&g_sid="+i3GEO.configura.sid; |
126 | - cpJSON.call(p,"pegaMensagem",funcao); | |
126 | + cpJSON.call(p,"pegaMensagem",funcao); | |
127 | 127 | }, |
128 | 128 | /* |
129 | 129 | Function: areaPixel |
... | ... | @@ -133,7 +133,7 @@ i3GEO.php = { |
133 | 133 | areaPixel: function(funcao,g_celula){ |
134 | 134 | i3GEO.php.verifica(); |
135 | 135 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid; |
136 | - cpJSON.call(p,"areaPixel",funcao); | |
136 | + cpJSON.call(p,"areaPixel",funcao); | |
137 | 137 | }, |
138 | 138 | /* |
139 | 139 | Function: excluitema |
... | ... | @@ -141,9 +141,9 @@ i3GEO.php = { |
141 | 141 | <EXCLUITEMA> |
142 | 142 | */ |
143 | 143 | excluitema: function(funcao,tema){ |
144 | - var layer; | |
144 | + var layer,retorno,p; | |
145 | 145 | i3GEO.php.verifica(); |
146 | - var retorno = function(retorno){ | |
146 | + retorno = function(retorno){ | |
147 | 147 | if(i3GEO.Interface.ATUAL === "openlayers"){ |
148 | 148 | layers = i3geoOL.getLayersByName(tema); |
149 | 149 | if(layers.length > 0) |
... | ... | @@ -151,8 +151,8 @@ i3GEO.php = { |
151 | 151 | } |
152 | 152 | funcao.call(retorno); |
153 | 153 | }; |
154 | - var p = i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=excluitema&temas="+tema+"&g_sid="+i3GEO.arvoreDeCamadas.SID; | |
155 | - cpJSON.call(p,"excluitema",retorno); | |
154 | + p = i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=excluitema&temas="+tema+"&g_sid="+i3GEO.arvoreDeCamadas.SID; | |
155 | + cpJSON.call(p,"excluitema",retorno); | |
156 | 156 | }, |
157 | 157 | /* |
158 | 158 | Function: reordenatemas |
... | ... | @@ -162,7 +162,7 @@ i3GEO.php = { |
162 | 162 | reordenatemas: function(funcao,lista){ |
163 | 163 | i3GEO.php.verifica(); |
164 | 164 | var p = i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID; |
165 | - cpJSON.call(p,"reordenatemas",funcao); | |
165 | + cpJSON.call(p,"reordenatemas",funcao); | |
166 | 166 | }, |
167 | 167 | /* |
168 | 168 | Function: criaLegendaHTML |
... | ... | @@ -178,7 +178,7 @@ i3GEO.php = { |
178 | 178 | if(arguments.length === 2) |
179 | 179 | {template = "legenda2.htm";} |
180 | 180 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid; |
181 | - cpJSON.call(p,"criaLegendaHTML",funcao); | |
181 | + cpJSON.call(p,"criaLegendaHTML",funcao); | |
182 | 182 | }, |
183 | 183 | /* |
184 | 184 | Function: inverteStatusClasse |
... | ... | @@ -188,7 +188,7 @@ i3GEO.php = { |
188 | 188 | inverteStatusClasse: function(funcao,tema,classe){ |
189 | 189 | i3GEO.php.verifica(); |
190 | 190 | var p = i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe; |
191 | - cpJSON.call(p,"inverteStatusClasse",funcao); | |
191 | + cpJSON.call(p,"inverteStatusClasse",funcao); | |
192 | 192 | }, |
193 | 193 | /* |
194 | 194 | Function: ligatemas |
... | ... | @@ -200,7 +200,7 @@ i3GEO.php = { |
200 | 200 | if(arguments.length === 3) |
201 | 201 | {adicionar = "nao";} |
202 | 202 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid; |
203 | - cpJSON.call(p,"ligaDesligaTemas",funcao); | |
203 | + cpJSON.call(p,"ligaDesligaTemas",funcao); | |
204 | 204 | }, |
205 | 205 | /* |
206 | 206 | Function: pegalistademenus |
... | ... | @@ -210,7 +210,7 @@ i3GEO.php = { |
210 | 210 | pegalistademenus: function(funcao){ |
211 | 211 | i3GEO.php.verifica(); |
212 | 212 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL; |
213 | - cpJSON.call(p,"pegalistademenus",funcao); | |
213 | + cpJSON.call(p,"pegalistademenus",funcao); | |
214 | 214 | }, |
215 | 215 | /* |
216 | 216 | Function: pegalistadegrupos |
... | ... | @@ -220,7 +220,7 @@ i3GEO.php = { |
220 | 220 | pegalistadegrupos: function(funcao,id_menu,listasgrupos){ |
221 | 221 | i3GEO.php.verifica(); |
222 | 222 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL; |
223 | - cpJSON.call(p,"pegalistadegrupos",funcao); | |
223 | + cpJSON.call(p,"pegalistadegrupos",funcao); | |
224 | 224 | }, |
225 | 225 | /* |
226 | 226 | Function: pegalistadeSubgrupos |
... | ... | @@ -230,7 +230,7 @@ i3GEO.php = { |
230 | 230 | pegalistadeSubgrupos: function(funcao,id_menu,id_grupo){ |
231 | 231 | i3GEO.php.verifica(); |
232 | 232 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL; |
233 | - cpJSON.call(p,"pegalistadeSubgrupos",funcao); | |
233 | + cpJSON.call(p,"pegalistadeSubgrupos",funcao); | |
234 | 234 | }, |
235 | 235 | /* |
236 | 236 | Function: pegalistadetemas |
... | ... | @@ -240,7 +240,7 @@ i3GEO.php = { |
240 | 240 | pegalistadetemas: function(funcao,id_menu,id_grupo,id_subgrupo){ |
241 | 241 | i3GEO.php.verifica(); |
242 | 242 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL; |
243 | - cpJSON.call(p,"pegalistadetemas",funcao); | |
243 | + cpJSON.call(p,"pegalistadetemas",funcao); | |
244 | 244 | }, |
245 | 245 | /* |
246 | 246 | Function: listaTemas |
... | ... | @@ -253,7 +253,7 @@ i3GEO.php = { |
253 | 253 | sid = i3GEO.configura.sid; |
254 | 254 | } |
255 | 255 | var p = locaplic+"/classesphp/mapa_controle.php?funcao=listatemas&g_sid="+sid+"&tipo="+tipo; |
256 | - cpJSON.call(p,"listaTemas",funcao); | |
256 | + cpJSON.call(p,"listaTemas",funcao); | |
257 | 257 | }, |
258 | 258 | /* |
259 | 259 | Function: listaTemasEditaveis |
... | ... | @@ -266,7 +266,7 @@ i3GEO.php = { |
266 | 266 | sid = i3GEO.configura.sid; |
267 | 267 | } |
268 | 268 | var p = locaplic+"/classesphp/mapa_controle.php?funcao=listatemaslocais&g_sid="+sid; |
269 | - cpJSON.call(p,"listatemaslocais",funcao); | |
269 | + cpJSON.call(p,"listatemaslocais",funcao); | |
270 | 270 | }, |
271 | 271 | |
272 | 272 | /* |
... | ... | @@ -280,7 +280,7 @@ i3GEO.php = { |
280 | 280 | sid = i3GEO.configura.sid; |
281 | 281 | } |
282 | 282 | var p = locaplic+"/classesphp/mapa_controle.php?funcao=listatemascomsel&g_sid="+sid; |
283 | - cpJSON.call(p,"listaTemasComSel",funcao); | |
283 | + cpJSON.call(p,"listaTemasComSel",funcao); | |
284 | 284 | }, |
285 | 285 | /* |
286 | 286 | Function: listatemasTipo |
... | ... | @@ -293,7 +293,7 @@ i3GEO.php = { |
293 | 293 | sid = i3GEO.configura.sid; |
294 | 294 | } |
295 | 295 | var p = locaplic+"/classesphp/mapa_controle.php?funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid; |
296 | - cpJSON.call(p,"listatemasTipo",funcao); | |
296 | + cpJSON.call(p,"listatemasTipo",funcao); | |
297 | 297 | }, |
298 | 298 | /* |
299 | 299 | Function: pegaSistemas |
... | ... | @@ -303,7 +303,7 @@ i3GEO.php = { |
303 | 303 | pegaSistemas: function(funcao){ |
304 | 304 | i3GEO.php.verifica(); |
305 | 305 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaSistemas&g_sid="+i3GEO.configura.sid; |
306 | - cpJSON.call(p,"pegaSistemas",funcao); | |
306 | + cpJSON.call(p,"pegaSistemas",funcao); | |
307 | 307 | }, |
308 | 308 | /* |
309 | 309 | Function: listadrives |
... | ... | @@ -313,7 +313,7 @@ i3GEO.php = { |
313 | 313 | listadrives: function(funcao){ |
314 | 314 | i3GEO.php.verifica(); |
315 | 315 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaDrives&g_sid="+i3GEO.configura.sid; |
316 | - cpJSON.call(p,"listaDrives",funcao); | |
316 | + cpJSON.call(p,"listaDrives",funcao); | |
317 | 317 | }, |
318 | 318 | /* |
319 | 319 | Function: listaarquivos |
... | ... | @@ -323,7 +323,7 @@ i3GEO.php = { |
323 | 323 | listaarquivos: function(funcao,caminho){ |
324 | 324 | i3GEO.php.verifica(); |
325 | 325 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho; |
326 | - cpJSON.call(p,"listaArquivos",funcao); | |
326 | + cpJSON.call(p,"listaArquivos",funcao); | |
327 | 327 | }, |
328 | 328 | /* |
329 | 329 | Function: geo2utm |
... | ... | @@ -335,7 +335,7 @@ i3GEO.php = { |
335 | 335 | if($i("aguardeGifAberto") || x < -180) |
336 | 336 | {return;} |
337 | 337 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid; |
338 | - cpJSON.call(p,"geo2utm",funcao); | |
338 | + cpJSON.call(p,"geo2utm",funcao); | |
339 | 339 | }, |
340 | 340 | /* |
341 | 341 | Function: desativacgi |
... | ... | @@ -345,7 +345,7 @@ i3GEO.php = { |
345 | 345 | desativacgi: function(funcao){ |
346 | 346 | i3GEO.php.verifica(); |
347 | 347 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=desativacgi&g_sid="+i3GEO.configura.sid; |
348 | - cpJSON.call(p,"desativacgi",funcao); | |
348 | + cpJSON.call(p,"desativacgi",funcao); | |
349 | 349 | }, |
350 | 350 | /* |
351 | 351 | Function: pegaMapas |
... | ... | @@ -355,7 +355,7 @@ i3GEO.php = { |
355 | 355 | pegaMapas: function(funcao){ |
356 | 356 | i3GEO.php.verifica(); |
357 | 357 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid; |
358 | - cpJSON.call(p,"pegaSistemas",funcao); | |
358 | + cpJSON.call(p,"pegaSistemas",funcao); | |
359 | 359 | }, |
360 | 360 | /* |
361 | 361 | Function: mudatamanho |
... | ... | @@ -365,7 +365,7 @@ i3GEO.php = { |
365 | 365 | mudatamanho: function(funcao,altura,largura){ |
366 | 366 | i3GEO.php.verifica(); |
367 | 367 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid; |
368 | - cpJSON.call(p,"pegaSistemas",funcao); | |
368 | + cpJSON.call(p,"pegaSistemas",funcao); | |
369 | 369 | }, |
370 | 370 | /* |
371 | 371 | Function: ativalogo |
... | ... | @@ -375,7 +375,7 @@ i3GEO.php = { |
375 | 375 | ativalogo: function(funcao,altura,largura){ |
376 | 376 | i3GEO.php.verifica(); |
377 | 377 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ativalogo&g_sid="+i3GEO.configura.sid; |
378 | - cpJSON.call(p,"ativalogo",funcao); | |
378 | + cpJSON.call(p,"ativalogo",funcao); | |
379 | 379 | }, |
380 | 380 | /* |
381 | 381 | Function: insereAnnotation |
... | ... | @@ -385,7 +385,7 @@ i3GEO.php = { |
385 | 385 | insereAnnotation: function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){ |
386 | 386 | i3GEO.php.verifica(); |
387 | 387 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid; |
388 | - cpJSON.call(p,"inserefeature",funcao); | |
388 | + cpJSON.call(p,"inserefeature",funcao); | |
389 | 389 | }, |
390 | 390 | /* |
391 | 391 | Function: identificaunico |
... | ... | @@ -395,7 +395,7 @@ i3GEO.php = { |
395 | 395 | identificaunico: function(funcao,xy,tema,item){ |
396 | 396 | i3GEO.php.verifica(); |
397 | 397 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten; |
398 | - cpJSON.call(p,"identificaunico",funcao); | |
398 | + cpJSON.call(p,"identificaunico",funcao); | |
399 | 399 | }, |
400 | 400 | /* |
401 | 401 | Function: recuperamapa |
... | ... | @@ -405,7 +405,7 @@ i3GEO.php = { |
405 | 405 | recuperamapa: function(funcao){ |
406 | 406 | i3GEO.php.verifica(); |
407 | 407 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=recuperamapa&g_sid="+i3GEO.configura.sid; |
408 | - cpJSON.call(p,"recuperamapa",funcao); | |
408 | + cpJSON.call(p,"recuperamapa",funcao); | |
409 | 409 | }, |
410 | 410 | /* |
411 | 411 | Function: criaLegendaImagem |
... | ... | @@ -415,7 +415,7 @@ i3GEO.php = { |
415 | 415 | criaLegendaImagem: function(funcao){ |
416 | 416 | i3GEO.php.verifica(); |
417 | 417 | var p =i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid; |
418 | - cpJSON.call(p,"criaLegendaImagem",funcao); | |
418 | + cpJSON.call(p,"criaLegendaImagem",funcao); | |
419 | 419 | }, |
420 | 420 | /* |
421 | 421 | Function: referenciadinamica |
... | ... | @@ -437,7 +437,7 @@ i3GEO.php = { |
437 | 437 | referencia: function(funcao){ |
438 | 438 | i3GEO.php.verifica(); |
439 | 439 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten; |
440 | - cpJSON.call(p,"retornaReferencia",funcao); | |
440 | + cpJSON.call(p,"retornaReferencia",funcao); | |
441 | 441 | }, |
442 | 442 | /* |
443 | 443 | Function: pan |
... | ... | @@ -457,7 +457,7 @@ i3GEO.php = { |
457 | 457 | aproxima: function(funcao,nivel){ |
458 | 458 | i3GEO.php.verifica(); |
459 | 459 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid; |
460 | - cpJSON.call(p,"aproxima",funcao); | |
460 | + cpJSON.call(p,"aproxima",funcao); | |
461 | 461 | }, |
462 | 462 | /* |
463 | 463 | Function: afasta |
... | ... | @@ -467,7 +467,7 @@ i3GEO.php = { |
467 | 467 | afasta: function(funcao,nivel){ |
468 | 468 | i3GEO.php.verifica(); |
469 | 469 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid; |
470 | - cpJSON.call(p,"afasta",funcao); | |
470 | + cpJSON.call(p,"afasta",funcao); | |
471 | 471 | }, |
472 | 472 | /* |
473 | 473 | Function: zoomponto |
... | ... | @@ -485,16 +485,16 @@ i3GEO.php = { |
485 | 485 | var retorno = function(retorno){ |
486 | 486 | if(i3GEO.Interface.ATUAL === "openlayers"){ |
487 | 487 | i3GEO.Interface.openlayers.pan2ponto(x,y); |
488 | - i3GEO.janela.fechaAguarde(); | |
488 | + i3GEO.janela.fechaAguarde(); | |
489 | 489 | } |
490 | 490 | if(i3GEO.Interface.ATUAL === "googlemaps"){ |
491 | 491 | i3GEO.Interface.googlemaps.pan2ponto(x,y); |
492 | - i3GEO.janela.fechaAguarde(); | |
492 | + i3GEO.janela.fechaAguarde(); | |
493 | 493 | } |
494 | 494 | funcao.call(retorno); |
495 | - }; | |
496 | - var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor; | |
497 | - cpJSON.call(p,"zoomponto",retorno); | |
495 | + }, | |
496 | + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor; | |
497 | + cpJSON.call(p,"zoomponto",retorno); | |
498 | 498 | }, |
499 | 499 | /* |
500 | 500 | Function: localizaIP |
... | ... | @@ -504,7 +504,7 @@ i3GEO.php = { |
504 | 504 | localizaIP: function(funcao){ |
505 | 505 | i3GEO.php.verifica(); |
506 | 506 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+i3GEO.configura.sid; |
507 | - cpJSON.call(p,"localizaIP",funcao); | |
507 | + cpJSON.call(p,"localizaIP",funcao); | |
508 | 508 | }, |
509 | 509 | /* |
510 | 510 | Function: mudaext |
... | ... | @@ -544,7 +544,7 @@ i3GEO.php = { |
544 | 544 | case "openlayers": |
545 | 545 | i3GEO.Interface.openlayers.zoom2ext(ext); |
546 | 546 | break; |
547 | - }; | |
547 | + } | |
548 | 548 | i3GEO.janela.fechaAguarde(); |
549 | 549 | try{ |
550 | 550 | funcao.call(retorno); |
... | ... | @@ -552,7 +552,7 @@ i3GEO.php = { |
552 | 552 | catch(e){} |
553 | 553 | }; |
554 | 554 | p = locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo; |
555 | - cpJSON.call(p,"mudaext",retorno); | |
555 | + cpJSON.call(p,"mudaext",retorno); | |
556 | 556 | }, |
557 | 557 | /* |
558 | 558 | Function: mudaescala |
... | ... | @@ -562,7 +562,7 @@ i3GEO.php = { |
562 | 562 | mudaescala: function(funcao,escala){ |
563 | 563 | i3GEO.php.verifica(); |
564 | 564 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem; |
565 | - cpJSON.call(p,"mudaescala",funcao); | |
565 | + cpJSON.call(p,"mudaescala",funcao); | |
566 | 566 | }, |
567 | 567 | /* |
568 | 568 | Function: aplicaResolucao |
... | ... | @@ -582,7 +582,7 @@ i3GEO.php = { |
582 | 582 | geradestaque: function(funcao,tema,ext){ |
583 | 583 | i3GEO.php.verifica(); |
584 | 584 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext; |
585 | - cpJSON.call(p,"geradestaque",funcao); | |
585 | + cpJSON.call(p,"geradestaque",funcao); | |
586 | 586 | }, |
587 | 587 | /* |
588 | 588 | Function: selecaopt |
... | ... | @@ -592,7 +592,7 @@ i3GEO.php = { |
592 | 592 | selecaopt: function(funcao,tema,xy,tipo,tolerancia){ |
593 | 593 | i3GEO.php.verifica(); |
594 | 594 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten; |
595 | - cpJSON.call(p,"selecaoPT",funcao); | |
595 | + cpJSON.call(p,"selecaoPT",funcao); | |
596 | 596 | }, |
597 | 597 | /* |
598 | 598 | Function: selecaobox |
... | ... | @@ -602,7 +602,7 @@ i3GEO.php = { |
602 | 602 | selecaobox: function(funcao,tema,tipo,box){ |
603 | 603 | i3GEO.php.verifica(); |
604 | 604 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten; |
605 | - cpJSON.call(p,"selecaobox",funcao); | |
605 | + cpJSON.call(p,"selecaobox",funcao); | |
606 | 606 | }, |
607 | 607 | /* |
608 | 608 | Function: selecaoext |
... | ... | @@ -612,7 +612,7 @@ i3GEO.php = { |
612 | 612 | selecaoext: function(funcao,tema,tipo){ |
613 | 613 | i3GEO.php.verifica(); |
614 | 614 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten; |
615 | - cpJSON.call(p,"selecaobox",funcao); | |
615 | + cpJSON.call(p,"selecaobox",funcao); | |
616 | 616 | }, |
617 | 617 | /* |
618 | 618 | Function: selecaoatrib2 |
... | ... | @@ -622,7 +622,7 @@ i3GEO.php = { |
622 | 622 | selecaoatrib2: function(funcao,tema,filtro,tipo){ |
623 | 623 | i3GEO.php.verifica(); |
624 | 624 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten; |
625 | - cpJSON.call(p,"selecaoatrib2",funcao); | |
625 | + cpJSON.call(p,"selecaoatrib2",funcao); | |
626 | 626 | }, |
627 | 627 | /* |
628 | 628 | Function: selecaotema |
... | ... | @@ -632,7 +632,7 @@ i3GEO.php = { |
632 | 632 | selecaotema: function(funcao,temao,tema,tipo){ |
633 | 633 | i3GEO.php.verifica(); |
634 | 634 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten; |
635 | - cpJSON.call(p,"selecaotema",funcao); | |
635 | + cpJSON.call(p,"selecaotema",funcao); | |
636 | 636 | }, |
637 | 637 | /* |
638 | 638 | Function: sobetema |
... | ... | @@ -642,7 +642,7 @@ i3GEO.php = { |
642 | 642 | sobetema: function(funcao,tema){ |
643 | 643 | i3GEO.php.verifica(); |
644 | 644 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
645 | - cpJSON.call(p,"sobetema",funcao); | |
645 | + cpJSON.call(p,"sobetema",funcao); | |
646 | 646 | }, |
647 | 647 | /* |
648 | 648 | Function: descetema |
... | ... | @@ -652,7 +652,7 @@ i3GEO.php = { |
652 | 652 | descetema: function(funcao,tema){ |
653 | 653 | i3GEO.php.verifica(); |
654 | 654 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?&funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
655 | - cpJSON.call(p,"descetema",funcao); | |
655 | + cpJSON.call(p,"descetema",funcao); | |
656 | 656 | }, |
657 | 657 | /* |
658 | 658 | Function: fontetema |
... | ... | @@ -662,7 +662,7 @@ i3GEO.php = { |
662 | 662 | fontetema: function(funcao,tema){ |
663 | 663 | i3GEO.php.verifica(); |
664 | 664 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
665 | - cpJSON.call(p,"fontetema",funcao); | |
665 | + cpJSON.call(p,"fontetema",funcao); | |
666 | 666 | }, |
667 | 667 | /* |
668 | 668 | Function: zoomtema |
... | ... | @@ -693,10 +693,10 @@ i3GEO.php = { |
693 | 693 | case "padrao": |
694 | 694 | i3GEO.atualiza(retorno); |
695 | 695 | break; |
696 | - }; | |
696 | + } | |
697 | 697 | }; |
698 | 698 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
699 | - cpJSON.call(p,"zoomtema",retorno); | |
699 | + cpJSON.call(p,"zoomtema",retorno); | |
700 | 700 | }, |
701 | 701 | /* |
702 | 702 | Function: zoomsel |
... | ... | @@ -727,7 +727,7 @@ i3GEO.php = { |
727 | 727 | case "padrao": |
728 | 728 | i3GEO.atualiza(retorno); |
729 | 729 | break; |
730 | - }; | |
730 | + } | |
731 | 731 | }; |
732 | 732 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
733 | 733 | cpJSON.call(p,"zoomsel",retorno); |
... | ... | @@ -740,7 +740,7 @@ i3GEO.php = { |
740 | 740 | limpasel: function(funcao,tema){ |
741 | 741 | i3GEO.php.verifica(); |
742 | 742 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
743 | - cpJSON.call(p,"limpasel",funcao); | |
743 | + cpJSON.call(p,"limpasel",funcao); | |
744 | 744 | }, |
745 | 745 | /* |
746 | 746 | Function: invertestatuslegenda |
... | ... | @@ -750,7 +750,7 @@ i3GEO.php = { |
750 | 750 | invertestatuslegenda: function(funcao,tema){ |
751 | 751 | i3GEO.php.verifica(); |
752 | 752 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
753 | - cpJSON.call(p,"invertestatuslegenda",funcao); | |
753 | + cpJSON.call(p,"invertestatuslegenda",funcao); | |
754 | 754 | }, |
755 | 755 | /* |
756 | 756 | Function: aplicaCorClasseTema |
... | ... | @@ -760,7 +760,7 @@ i3GEO.php = { |
760 | 760 | aplicaCorClasseTema: function(funcao,idtema,idclasse,rgb){ |
761 | 761 | i3GEO.php.verifica(); |
762 | 762 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid; |
763 | - cpJSON.call(p,"aplicaCorClasseTema",funcao); | |
763 | + cpJSON.call(p,"aplicaCorClasseTema",funcao); | |
764 | 764 | }, |
765 | 765 | /* |
766 | 766 | Function: mudatransp |
... | ... | @@ -770,7 +770,7 @@ i3GEO.php = { |
770 | 770 | mudatransp: function(funcao,tema,valor){ |
771 | 771 | i3GEO.php.verifica(); |
772 | 772 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid; |
773 | - cpJSON.call(p,"mudatransp",funcao); | |
773 | + cpJSON.call(p,"mudatransp",funcao); | |
774 | 774 | }, |
775 | 775 | /* |
776 | 776 | Function: mudanome |
... | ... | @@ -780,7 +780,7 @@ i3GEO.php = { |
780 | 780 | mudanome: function(funcao,tema,valor){ |
781 | 781 | i3GEO.php.verifica(); |
782 | 782 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid; |
783 | - cpJSON.call(p,"mudanome",funcao); | |
783 | + cpJSON.call(p,"mudanome",funcao); | |
784 | 784 | }, |
785 | 785 | /* |
786 | 786 | Function: adicionaTemaWMS |
... | ... | @@ -794,7 +794,7 @@ i3GEO.php = { |
794 | 794 | sid = i3GEO.configura.sid; |
795 | 795 | } |
796 | 796 | var p = locaplic+"/classesphp/mapa_controle.php?g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo; |
797 | - cpJSON.call(p,"adicionatemawms",funcao); | |
797 | + cpJSON.call(p,"adicionatemawms",funcao); | |
798 | 798 | }, |
799 | 799 | /* |
800 | 800 | Function: adicionaTemaSHP |
... | ... | @@ -804,7 +804,7 @@ i3GEO.php = { |
804 | 804 | adicionaTemaSHP: function(funcao,path){ |
805 | 805 | i3GEO.php.verifica(); |
806 | 806 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path; |
807 | - cpJSON.call(p,"adicionaTemaSHP",funcao); | |
807 | + cpJSON.call(p,"adicionaTemaSHP",funcao); | |
808 | 808 | }, |
809 | 809 | /* |
810 | 810 | Function: adicionaTemaIMG |
... | ... | @@ -814,7 +814,7 @@ i3GEO.php = { |
814 | 814 | adicionaTemaIMG: function(funcao,path){ |
815 | 815 | i3GEO.php.verifica(); |
816 | 816 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path; |
817 | - cpJSON.call(p,"adicionaTemaIMG",funcao); | |
817 | + cpJSON.call(p,"adicionaTemaIMG",funcao); | |
818 | 818 | }, |
819 | 819 | /* |
820 | 820 | Function: identifica |
... | ... | @@ -823,7 +823,7 @@ i3GEO.php = { |
823 | 823 | */ |
824 | 824 | identifica: function(funcao,x,y,resolucao,locaplic,sid){ |
825 | 825 | var p = locaplic+"/classesphp/mapa_controle.php?funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid; |
826 | - cpJSON.call(p,"identifica",funcao); | |
826 | + cpJSON.call(p,"identifica",funcao); | |
827 | 827 | }, |
828 | 828 | /* |
829 | 829 | Function: identifica2 |
... | ... | @@ -849,7 +849,7 @@ i3GEO.php = { |
849 | 849 | var p = locaplic+"/classesphp/mapa_controle.php?funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao=5&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas; |
850 | 850 | if(opcao !== "tip") |
851 | 851 | {p += "&tema="+tema;} |
852 | - cpJSON.call(p,"identifica",funcao); | |
852 | + cpJSON.call(p,"identifica",funcao); | |
853 | 853 | }, |
854 | 854 | /* |
855 | 855 | Function: reiniciaMapa |
... | ... | @@ -859,7 +859,7 @@ i3GEO.php = { |
859 | 859 | reiniciaMapa: function(funcao){ |
860 | 860 | i3GEO.php.verifica(); |
861 | 861 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid; |
862 | - cpJSON.call(p,"reiniciaMapa",funcao); | |
862 | + cpJSON.call(p,"reiniciaMapa",funcao); | |
863 | 863 | }, |
864 | 864 | /* |
865 | 865 | Depreciado na versão 4.4 |
... | ... | @@ -910,7 +910,7 @@ i3GEO.php = { |
910 | 910 | sid = i3GEO.configura.sid; |
911 | 911 | } |
912 | 912 | var p = locaplic+"/classesphp/mapa_controle.php?funcao=adtema&temas="+temas+"&g_sid="+sid; |
913 | - cpJSON.call(p,"adtema",funcao); | |
913 | + cpJSON.call(p,"adtema",funcao); | |
914 | 914 | }, |
915 | 915 | /* |
916 | 916 | Function: escalagrafica |
... | ... | @@ -920,7 +920,7 @@ i3GEO.php = { |
920 | 920 | escalagrafica: function(funcao){ |
921 | 921 | i3GEO.php.verifica(); |
922 | 922 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=escalagrafica&g_sid="+i3GEO.configura.sid; |
923 | - cpJSON.call(p,"escalagrafica",funcao); | |
923 | + cpJSON.call(p,"escalagrafica",funcao); | |
924 | 924 | }, |
925 | 925 | /* |
926 | 926 | Function: flamingo |
... | ... | @@ -930,7 +930,7 @@ i3GEO.php = { |
930 | 930 | flamingo: function(funcao){ |
931 | 931 | i3GEO.php.verifica(); |
932 | 932 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=montaFlamingo&g_sid="+i3GEO.configura.sid; |
933 | - cpJSON.call(p,"montaFlamingo",funcao); | |
933 | + cpJSON.call(p,"montaFlamingo",funcao); | |
934 | 934 | }, |
935 | 935 | /* |
936 | 936 | Function: googlemaps |
... | ... | @@ -940,7 +940,7 @@ i3GEO.php = { |
940 | 940 | googlemaps: function(funcao){ |
941 | 941 | i3GEO.php.verifica(); |
942 | 942 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googlemaps&g_sid="+i3GEO.configura.sid; |
943 | - cpJSON.call(p,"googlemaps",funcao); | |
943 | + cpJSON.call(p,"googlemaps",funcao); | |
944 | 944 | }, |
945 | 945 | /* |
946 | 946 | Function: googleearth |
... | ... | @@ -950,7 +950,7 @@ i3GEO.php = { |
950 | 950 | googleearth: function(funcao){ |
951 | 951 | i3GEO.php.verifica(); |
952 | 952 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googleearth&g_sid="+i3GEO.configura.sid; |
953 | - cpJSON.call(p,"googleearth",funcao); | |
953 | + cpJSON.call(p,"googleearth",funcao); | |
954 | 954 | }, |
955 | 955 | /* |
956 | 956 | Function: openlayers |
... | ... | @@ -960,7 +960,7 @@ i3GEO.php = { |
960 | 960 | openlayers: function(funcao){ |
961 | 961 | i3GEO.php.verifica(); |
962 | 962 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=openlayers&g_sid="+i3GEO.configura.sid; |
963 | - cpJSON.call(p,"openlayers",funcao); | |
963 | + cpJSON.call(p,"openlayers",funcao); | |
964 | 964 | }, |
965 | 965 | /* |
966 | 966 | Function: corpo |
... | ... | @@ -975,7 +975,7 @@ i3GEO.php = { |
975 | 975 | i3GEO.Interface.googleearth.recalcPar(); |
976 | 976 | p += "&mapexten="+i3GEO.parametros.mapexten; |
977 | 977 | } |
978 | - cpJSON.call(p,"corpo",funcao); | |
978 | + cpJSON.call(p,"corpo",funcao); | |
979 | 979 | }, |
980 | 980 | /* |
981 | 981 | Function: criamapa |
... | ... | @@ -984,7 +984,7 @@ i3GEO.php = { |
984 | 984 | */ |
985 | 985 | criamapa: function(funcao,parametros){ |
986 | 986 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa&"+parametros; |
987 | - cpJSON.call(p,"criaMapa",funcao); | |
987 | + cpJSON.call(p,"criaMapa",funcao); | |
988 | 988 | }, |
989 | 989 | /* |
990 | 990 | Function: inicia |
... | ... | @@ -994,7 +994,7 @@ i3GEO.php = { |
994 | 994 | inicia: function(funcao,embedLegenda,w,h){ |
995 | 995 | i3GEO.php.verifica(); |
996 | 996 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL; |
997 | - cpJSON.call(p,"iniciaMapa",funcao); | |
997 | + cpJSON.call(p,"iniciaMapa",funcao); | |
998 | 998 | }, |
999 | 999 | /* |
1000 | 1000 | Function: chaveGoogle |
... | ... | @@ -1004,7 +1004,7 @@ i3GEO.php = { |
1004 | 1004 | chaveGoogle: function(funcao){ |
1005 | 1005 | i3GEO.php.verifica(); |
1006 | 1006 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=chavegoogle&g_sid="+i3GEO.configura.sid; |
1007 | - cpJSON.call(p,"chavegoogle",funcao); | |
1007 | + cpJSON.call(p,"chavegoogle",funcao); | |
1008 | 1008 | }, |
1009 | 1009 | /* |
1010 | 1010 | Function: listaRSSwsARRAY |
... | ... | @@ -1013,7 +1013,7 @@ i3GEO.php = { |
1013 | 1013 | */ |
1014 | 1014 | listaRSSwsARRAY: function(funcao,tipo){ |
1015 | 1015 | var p = i3GEO.configura.locaplic+"/classesphp/wscliente.php?funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo; |
1016 | - cpJSON.call(p,"listaRSSwsARRAY",funcao); | |
1016 | + cpJSON.call(p,"listaRSSwsARRAY",funcao); | |
1017 | 1017 | }, |
1018 | 1018 | /* |
1019 | 1019 | Function: listaLayersWMS |
... | ... | @@ -1022,7 +1022,7 @@ i3GEO.php = { |
1022 | 1022 | */ |
1023 | 1023 | listaLayersWMS: function(funcao,servico,nivel,id_ws,nomelayer){ |
1024 | 1024 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer; |
1025 | - cpJSON.call(p,"listaLayersWMS",funcao); | |
1025 | + cpJSON.call(p,"listaLayersWMS",funcao); | |
1026 | 1026 | }, |
1027 | 1027 | /* |
1028 | 1028 | Function: buscaRapida |
... | ... | @@ -1031,7 +1031,7 @@ i3GEO.php = { |
1031 | 1031 | */ |
1032 | 1032 | buscaRapida: function(funcao,locaplic,servico,palavra){ |
1033 | 1033 | var p = locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico; |
1034 | - cpJSON.call(p,"buscaRapida",funcao); | |
1034 | + cpJSON.call(p,"buscaRapida",funcao); | |
1035 | 1035 | }, |
1036 | 1036 | /* |
1037 | 1037 | Function: listaItensTema |
... | ... | @@ -1040,7 +1040,7 @@ i3GEO.php = { |
1040 | 1040 | */ |
1041 | 1041 | listaItensTema: function(funcao,tema){ |
1042 | 1042 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema; |
1043 | - cpJSON.call(p,"listaItensTema",funcao); | |
1043 | + cpJSON.call(p,"listaItensTema",funcao); | |
1044 | 1044 | }, |
1045 | 1045 | /* |
1046 | 1046 | Function: listaValoresItensTema |
... | ... | @@ -1049,7 +1049,7 @@ i3GEO.php = { |
1049 | 1049 | */ |
1050 | 1050 | listaValoresItensTema: function(funcao,tema,itemTema){ |
1051 | 1051 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema; |
1052 | - cpJSON.call(p,"listaRegistros",funcao); | |
1052 | + cpJSON.call(p,"listaRegistros",funcao); | |
1053 | 1053 | }, |
1054 | 1054 | /* |
1055 | 1055 | Function: extRegistros |
... | ... | @@ -1086,7 +1086,7 @@ i3GEO.php = { |
1086 | 1086 | criatemaSel: function(funcao,tema){ |
1087 | 1087 | i3GEO.php.verifica(); |
1088 | 1088 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema; |
1089 | - cpJSON.call(p,"chavegoogle",funcao); | |
1089 | + cpJSON.call(p,"chavegoogle",funcao); | |
1090 | 1090 | }, |
1091 | 1091 | /* |
1092 | 1092 | Function: pegaData |
... | ... | @@ -1096,7 +1096,7 @@ i3GEO.php = { |
1096 | 1096 | pegaData: function(funcao,tema){ |
1097 | 1097 | i3GEO.php.verifica(); |
1098 | 1098 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema; |
1099 | - cpJSON.call(p,"pegadata",funcao); | |
1099 | + cpJSON.call(p,"pegadata",funcao); | |
1100 | 1100 | }, |
1101 | 1101 | /* |
1102 | 1102 | Function: alteraData |
... | ... | @@ -1106,7 +1106,7 @@ i3GEO.php = { |
1106 | 1106 | alteraData: function(funcao,tema,data){ |
1107 | 1107 | i3GEO.php.verifica(); |
1108 | 1108 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data; |
1109 | - cpJSON.call(p,"alteradata",funcao); | |
1109 | + cpJSON.call(p,"alteradata",funcao); | |
1110 | 1110 | }, |
1111 | 1111 | /* |
1112 | 1112 | Function: dadosPerfilRelevo |
... | ... | @@ -1115,8 +1115,8 @@ i3GEO.php = { |
1115 | 1115 | */ |
1116 | 1116 | dadosPerfilRelevo: function(funcao,opcao,pontos,amostragem){ |
1117 | 1117 | i3GEO.php.verifica(); |
1118 | - var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao; | |
1119 | - var cp = new cpaint(); | |
1118 | + var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao, | |
1119 | + cp = new cpaint(); | |
1120 | 1120 | cp.set_transfer_mode('POST'); |
1121 | 1121 | cp.set_response_type("JSON"); |
1122 | 1122 | cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem); | ... | ... |
classesjs/classe_selecao.js
... | ... | @@ -123,7 +123,7 @@ i3GEO.selecao = { |
123 | 123 | {novoel.style.opacity = 0.25;} |
124 | 124 | novoel.style.backgroundColor = "yellow"; |
125 | 125 | novoel.style.position="absolute"; |
126 | - novoel.style.border = "2px solid #ff0000"; | |
126 | + novoel.style.border = "2px solid #ff0000"; | |
127 | 127 | if (navm) |
128 | 128 | {novoel.style.filter = "alpha(opacity=25)";} |
129 | 129 | novoel.onmousemove = function(){ | ... | ... |
classesjs/classe_social.js
... | ... | @@ -38,15 +38,15 @@ Opções de compartilhamento e uso de redes sociais. |
38 | 38 | */ |
39 | 39 | i3GEO.social = { |
40 | 40 | curtirFacebook: function(url,tipo){ |
41 | - if(tipo == "comtotal") | |
41 | + if(tipo === "comtotal") | |
42 | 42 | {return "<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>";} |
43 | - if(tipo == "semtotal") | |
44 | - {return "<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=55&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:55px; height:21px;' allowTransparency='true'></iframe>";} | |
43 | + if(tipo === "semtotal") | |
44 | + {return "<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=75&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:75px; height:21px;' allowTransparency='true'></iframe>";} | |
45 | 45 | }, |
46 | 46 | publicarTwitter: function(url,tipo){ |
47 | - if(tipo == "comtotal") | |
47 | + if(tipo === "comtotal") | |
48 | 48 | {return '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>';} |
49 | - if(tipo == "semtotal") | |
49 | + if(tipo === "semtotal") | |
50 | 50 | {return '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:55px; height:21px;"></iframe>';} |
51 | 51 | }, |
52 | 52 | /* |
... | ... | @@ -80,17 +80,17 @@ i3GEO.social = { |
80 | 80 | {tipo = "comtotal";} |
81 | 81 | var onde = $i(id), |
82 | 82 | tabela = ""; |
83 | - if(tipo == "comtotal") | |
83 | + if(tipo === "comtotal") | |
84 | 84 | {tabela += "<table style='width:250px' ><tr>";} |
85 | - if(tipo == "semtotal") | |
85 | + if(tipo === "semtotal") | |
86 | 86 | {tabela += "<table style='width:115px' ><tr>";} |
87 | - if(onde || id == ""){ | |
87 | + if(onde || id === ""){ | |
88 | 88 | if(urlpt !== ""){ |
89 | 89 | tabela += "<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"; |
90 | 90 | } |
91 | 91 | if(urlcf !== ""){ |
92 | - tabela += "<td><img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+urlcf+"\")' title='Compartilhar'/></td>"; | |
93 | 92 | tabela += "<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"; |
93 | + tabela += "<td><img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+urlcf+"\")' title='Compartilhar'/></td>"; | |
94 | 94 | } |
95 | 95 | tabela += "</tr></table>"; |
96 | 96 | if(id !== "") | ... | ... |
classesjs/classe_tema.js
... | ... | @@ -355,7 +355,7 @@ i3GEO.tema = { |
355 | 355 | janela = i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false); |
356 | 356 | janela[2].style.textAlign="left"; |
357 | 357 | janela[2].style.background="white"; |
358 | - janela[2].innerHTML = $trad("o1"); | |
358 | + janela[2].innerHTML = $trad("o1"); | |
359 | 359 | } |
360 | 360 | i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm"); |
361 | 361 | } | ... | ... |
classesjs/classe_util.js
... | ... | @@ -83,7 +83,7 @@ opera = navigator.userAgent.toLowerCase().indexOf('opera') > -1; |
83 | 83 | var app = navigator.appName.substring(0,1); |
84 | 84 | if (app==='N'){navn=true;} |
85 | 85 | if (app==='M'){navm=true;} |
86 | -if(opera == true) | |
86 | +if(opera === true) | |
87 | 87 | {navn = true;} |
88 | 88 | /* |
89 | 89 | Variavel: g_operacao |
... | ... | @@ -122,7 +122,7 @@ Obtém um elemento DOM a partir de seu id |
122 | 122 | Parametros: |
123 | 123 | |
124 | 124 | id - {String} ID do elemento. |
125 | - | |
125 | + | |
126 | 126 | Returns: |
127 | 127 | |
128 | 128 | {Object} Objeto. |
... | ... | @@ -250,8 +250,8 @@ i3GEO.util = { |
250 | 250 | var keys,key; |
251 | 251 | keys = []; |
252 | 252 | for(key in obj){ |
253 | - if(obj[key]) | |
254 | - {keys.push(key);} | |
253 | + if(obj[key]) | |
254 | + {keys.push(key);} | |
255 | 255 | } |
256 | 256 | return keys; |
257 | 257 | }, |
... | ... | @@ -380,8 +380,7 @@ i3GEO.util = { |
380 | 380 | temaNode.enableHighlight = false; |
381 | 381 | } |
382 | 382 | arvore.collapseAll(); |
383 | - arvore.draw(); | |
384 | - //YAHOO.log("Fim arvore", "i3geo"); | |
383 | + arvore.draw(); | |
385 | 384 | }, |
386 | 385 | /* |
387 | 386 | Function: removeAcentos |
... | ... | @@ -426,7 +425,7 @@ i3GEO.util = { |
426 | 425 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.protocolo()");} |
427 | 426 | var u = window.location.href; |
428 | 427 | u = u.split(":"); |
429 | - return (u[0]); | |
428 | + return (u[0]); | |
430 | 429 | }, |
431 | 430 | /* |
432 | 431 | Function: pegaPosicaoObjeto |
... | ... | @@ -486,7 +485,7 @@ i3GEO.util = { |
486 | 485 | if (e.srcElement) |
487 | 486 | {targ = e.srcElement;} |
488 | 487 | if (targ.nodeType === 3) |
489 | - {targ = targ.parentNode;} | |
488 | + {targ = targ.parentNode;} | |
490 | 489 | tparent=targ.parentNode; |
491 | 490 | return(tparent); |
492 | 491 | }, |
... | ... | @@ -541,7 +540,7 @@ i3GEO.util = { |
541 | 540 | //testa novamente |
542 | 541 | if(c === "default" || c === "pointer" || c === "crosshair" || c === "help" || c === "move" || c === "text") |
543 | 542 | {cursor = c;} |
544 | - if(cursor == "") | |
543 | + if(cursor === "") | |
545 | 544 | {cursor = "URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto";} |
546 | 545 | for(i=0;i<n;i++){ |
547 | 546 | o = os[i]; |
... | ... | @@ -839,7 +838,7 @@ i3GEO.util = { |
839 | 838 | } |
840 | 839 | else{ |
841 | 840 | i.top = parseInt($i(i3GEO.Interface.IDMAPA).style.top,10); |
842 | - i.left = parseInt($i(i3GEO.Interface.IDMAPA).style.left,10); | |
841 | + i.left = parseInt($i(i3GEO.Interface.IDMAPA).style.left,10); | |
843 | 842 | } |
844 | 843 | document.body.appendChild(novoel); |
845 | 844 | } |
... | ... | @@ -878,7 +877,7 @@ i3GEO.util = { |
878 | 877 | {$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML = "";} |
879 | 878 | } |
880 | 879 | i3GEO.util.insereMarca.CONTAINER = []; |
881 | - i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()"); | |
880 | + i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()"); | |
882 | 881 | } |
883 | 882 | catch(e){ |
884 | 883 | if(typeof(console) !== 'undefined'){console.error(e);} |
... | ... | @@ -920,7 +919,7 @@ i3GEO.util = { |
920 | 919 | abreCor: function(janela,elemento,tipo){ |
921 | 920 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.abreCor()");} |
922 | 921 | //i3GEO.janela.cria("400","240",i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento,"","","Cor","i3geo_janelaCor",true); |
923 | - if(arguments.length == 2) | |
922 | + if(arguments.length === 2) | |
924 | 923 | {tipo = "rgb";} |
925 | 924 | var ins, |
926 | 925 | temp, |
... | ... | @@ -1093,7 +1092,7 @@ i3GEO.util = { |
1093 | 1092 | {obj.style.opacity= 1;} |
1094 | 1093 | } |
1095 | 1094 | }; |
1096 | - tempoFadei = setTimeout(fadei, tempo); | |
1095 | + tempoFadei = setTimeout(fadei, tempo); | |
1097 | 1096 | }, |
1098 | 1097 | /* |
1099 | 1098 | Function: desaparece |
... | ... | @@ -1154,7 +1153,7 @@ i3GEO.util = { |
1154 | 1153 | } |
1155 | 1154 | } |
1156 | 1155 | }; |
1157 | - tempoFade = setTimeout(fade, tempo); | |
1156 | + tempoFade = setTimeout(fade, tempo); | |
1158 | 1157 | }, |
1159 | 1158 | /* |
1160 | 1159 | Function: wkt2ext |
... | ... | @@ -1185,9 +1184,9 @@ i3GEO.util = { |
1185 | 1184 | x = []; |
1186 | 1185 | y = []; |
1187 | 1186 | for (w=0;w<wkt.length; w++){ |
1188 | - temp = wkt[w].split(" "); | |
1189 | - x.push(temp[0]); | |
1190 | - y.push(temp[1]); | |
1187 | + temp = wkt[w].split(" "); | |
1188 | + x.push(temp[0]); | |
1189 | + y.push(temp[1]); | |
1191 | 1190 | } |
1192 | 1191 | x.sort(i3GEO.util.sortNumber); |
1193 | 1192 | xMin = x[0]; |
... | ... | @@ -1237,38 +1236,37 @@ i3GEO.util = { |
1237 | 1236 | altura |
1238 | 1237 | */ |
1239 | 1238 | getScrollerWidth: function() { |
1240 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.util.getScrollerWidth()");} | |
1241 | - var scr = null, | |
1242 | - inn = null, | |
1243 | - wNoScroll = 0, | |
1244 | - wScroll = 0; | |
1245 | - // Outer scrolling div | |
1246 | - scr = document.createElement('div'); | |
1247 | - scr.style.position = 'absolute'; | |
1248 | - scr.style.top = '-1000px'; | |
1249 | - scr.style.left = '-1000px'; | |
1250 | - scr.style.width = '100px'; | |
1251 | - scr.style.height = '50px'; | |
1252 | - // Start with no scrollbar | |
1253 | - scr.style.overflow = 'hidden'; | |
1254 | - // Inner content div | |
1255 | - inn = document.createElement('div'); | |
1256 | - inn.style.width = '100%'; | |
1257 | - inn.style.height = '200px'; | |
1258 | - // Put the inner div in the scrolling div | |
1259 | - scr.appendChild(inn); | |
1260 | - // Append the scrolling div to the doc | |
1261 | - document.body.appendChild(scr); | |
1262 | - // Width of the inner div sans scrollbar | |
1263 | - wNoScroll = inn.offsetWidth; | |
1264 | - // Add the scrollbar | |
1265 | - scr.style.overflow = 'auto'; | |
1266 | - // Width of the inner div width scrollbar | |
1267 | - wScroll = inn.offsetWidth; | |
1268 | - // Remove the scrolling div from the doc | |
1269 | - document.body.removeChild(document.body.lastChild); | |
1270 | - // Pixel width of the scroller | |
1271 | - return (wNoScroll - wScroll); | |
1239 | + if(typeof(console) !== 'undefined'){console.info("i3GEO.util.getScrollerWidth()");} | |
1240 | + var scr = null, | |
1241 | + inn = null, | |
1242 | + wNoScroll = 0, | |
1243 | + wScroll = 0; | |
1244 | + scr = document.createElement('div'); | |
1245 | + scr.style.position = 'absolute'; | |
1246 | + scr.style.top = '-1000px'; | |
1247 | + scr.style.left = '-1000px'; | |
1248 | + scr.style.width = '100px'; | |
1249 | + scr.style.height = '50px'; | |
1250 | + // Start with no scrollbar | |
1251 | + scr.style.overflow = 'hidden'; | |
1252 | + // Inner content div | |
1253 | + inn = document.createElement('div'); | |
1254 | + inn.style.width = '100%'; | |
1255 | + inn.style.height = '200px'; | |
1256 | + // Put the inner div in the scrolling div | |
1257 | + scr.appendChild(inn); | |
1258 | + // Append the scrolling div to the doc | |
1259 | + document.body.appendChild(scr); | |
1260 | + // Width of the inner div sans scrollbar | |
1261 | + wNoScroll = inn.offsetWidth; | |
1262 | + // Add the scrollbar | |
1263 | + scr.style.overflow = 'auto'; | |
1264 | + // Width of the inner div width scrollbar | |
1265 | + wScroll = inn.offsetWidth; | |
1266 | + // Remove the scrolling div from the doc | |
1267 | + document.body.removeChild(document.body.lastChild); | |
1268 | + // Pixel width of the scroller | |
1269 | + return (wNoScroll - wScroll); | |
1272 | 1270 | }, |
1273 | 1271 | /* |
1274 | 1272 | Function: scriptTag |
... | ... | @@ -1287,7 +1285,7 @@ i3GEO.util = { |
1287 | 1285 | */ |
1288 | 1286 | scriptTag: function(js,ini,id,aguarde){ |
1289 | 1287 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.scriptTag()");} |
1290 | - if(!aguarde){var aguarde = true;} | |
1288 | + if(!aguarde){aguarde = true;} | |
1291 | 1289 | var head,script, tipojanela = i3GEO.janela.ESTILOAGUARDE; |
1292 | 1290 | if(!$i(id) || id === ""){ |
1293 | 1291 | i3GEO.janela.ESTILOAGUARDE = "reduzida"; |
... | ... | @@ -1375,7 +1373,7 @@ i3GEO.util = { |
1375 | 1373 | if(t[0] === texto) |
1376 | 1374 | {return true;} |
1377 | 1375 | } |
1378 | - return false | |
1376 | + return false; | |
1379 | 1377 | }, |
1380 | 1378 | /* |
1381 | 1379 | Function: mensagemAjuda |
... | ... | @@ -1417,7 +1415,7 @@ i3GEO.util = { |
1417 | 1415 | g = parseInt(255*v,10); |
1418 | 1416 | v = Math.random(); |
1419 | 1417 | b = parseInt(255*v,10); |
1420 | - return (r+","+g+","+b); | |
1418 | + return (r+","+g+","+b); | |
1421 | 1419 | }, |
1422 | 1420 | /* |
1423 | 1421 | Function: rgb2hex |
... | ... | @@ -1436,7 +1434,7 @@ i3GEO.util = { |
1436 | 1434 | function hex(x) { |
1437 | 1435 | var hexDigits = ["0", "1", "2", "3", "4", "5", "6", "7", "8","9", "A", "B", "C", "D", "E", "F"]; |
1438 | 1436 | return hexDigits[(x - x % 16) / 16] + hexDigits[x% 16]; |
1439 | - }; | |
1437 | + } | |
1440 | 1438 | return "#" + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); |
1441 | 1439 | }, |
1442 | 1440 | /* |
... | ... | @@ -1771,15 +1769,15 @@ i3GEO.util = { |
1771 | 1769 | onde {String} - id do elemento HTML que receberá o combo. É utilizado apenas para inserir uma mensagem de aguarde. |
1772 | 1770 | */ |
1773 | 1771 | comboValoresItem: function(id,tema,itemTema,funcao,onde){ |
1774 | - if (arguments.length == 5) | |
1772 | + if (arguments.length === 5) | |
1775 | 1773 | {$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>";} |
1776 | 1774 | var monta = function(retorno){ |
1777 | 1775 | var ins = [], |
1778 | 1776 | i, |
1779 | 1777 | pares, |
1780 | 1778 | j, |
1781 | - temp; | |
1782 | - if (retorno.data != undefined){ | |
1779 | + temp; | |
1780 | + if (retorno.data !== undefined){ | |
1783 | 1781 | ins.push("<select id="+id+" >"); |
1784 | 1782 | ins.push("<option value='' >---</option>"); |
1785 | 1783 | for (i=0;i<retorno.data[1].registros.length; i++){ |
... | ... | @@ -1848,17 +1846,17 @@ i3GEO.util = { |
1848 | 1846 | comboSimNao: function(id,selecionado){ |
1849 | 1847 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.comboSimNao()");} |
1850 | 1848 | var combo = "<select name="+id+" id="+id+" >"; |
1851 | - combo+= "<option value='' >---</option>"; | |
1852 | - if(selecionado === "sim") | |
1853 | - {combo+= "<option value=TRUE selected >sim</option>";} | |
1854 | - else | |
1855 | - {combo+= "<option value=TRUE >sim</option>";} | |
1856 | - if(selecionado === "nao") | |
1849 | + combo+= "<option value='' >---</option>"; | |
1850 | + if(selecionado === "sim") | |
1851 | + {combo+= "<option value=TRUE selected >sim</option>";} | |
1852 | + else | |
1853 | + {combo+= "<option value=TRUE >sim</option>";} | |
1854 | + if(selecionado === "nao") | |
1857 | 1855 | {combo += "<option value=FALSE selected >não</option>";} |
1858 | 1856 | else |
1859 | 1857 | {combo += "<option value=FALSE >não</option>";} |
1860 | 1858 | combo += "</select>"; |
1861 | - return(combo); | |
1859 | + return(combo); | |
1862 | 1860 | }, |
1863 | 1861 | /* |
1864 | 1862 | Function: checkItensEditaveis |
... | ... | @@ -1888,7 +1886,7 @@ i3GEO.util = { |
1888 | 1886 | var ins = [], |
1889 | 1887 | i, |
1890 | 1888 | temp, |
1891 | - n; | |
1889 | + n; | |
1892 | 1890 | if (retorno.data !== undefined) |
1893 | 1891 | { |
1894 | 1892 | ins.push("<table class=lista3 >"); |
... | ... | @@ -1928,14 +1926,14 @@ i3GEO.util = { |
1928 | 1926 | if (arguments.length === 2) |
1929 | 1927 | {$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>";} |
1930 | 1928 | var cp,monta = function(retorno){ |
1931 | - var ins = new Array(), | |
1929 | + var ins = [], | |
1932 | 1930 | i,n,temp; |
1933 | 1931 | if (retorno.data !== undefined){ |
1934 | 1932 | ins.push("<table class=lista2 >"); |
1935 | 1933 | ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>"); |
1936 | 1934 | ins.push("<td>"+retorno.data[0].nome+"</td></tr>"); |
1937 | 1935 | ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>"); |
1938 | - ins.push("<td>"+retorno.data[1].nome+"</td></tr>"); | |
1936 | + ins.push("<td>"+retorno.data[1].nome+"</td></tr>"); | |
1939 | 1937 | n = retorno.data.length; |
1940 | 1938 | for (i=2;i<n; i++){ |
1941 | 1939 | ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>"); |
... | ... | @@ -1976,7 +1974,8 @@ i3GEO.util = { |
1976 | 1974 | ndiv = document.createElement("div"), |
1977 | 1975 | nids, |
1978 | 1976 | i, |
1979 | - fundo; | |
1977 | + fundo, | |
1978 | + b; | |
1980 | 1979 | |
1981 | 1980 | if(temp){$i(container).removeChild(temp);} |
1982 | 1981 | if (!document.getElementById(idatual)) |
... | ... | @@ -1992,13 +1991,13 @@ i3GEO.util = { |
1992 | 1991 | |
1993 | 1992 | $i(container).appendChild(ndiv); |
1994 | 1993 | |
1995 | - new YAHOO.widget.Button(idatual+"anterior_",{ | |
1994 | + b = new YAHOO.widget.Button(idatual+"anterior_",{ | |
1996 | 1995 | onclick:{fn: function(){ |
1997 | 1996 | eval(anterior+"()"); |
1998 | 1997 | }, |
1999 | 1998 | lazyloadmenu:true |
2000 | 1999 | }}); |
2001 | - new YAHOO.widget.Button(idatual+"proxima_", | |
2000 | + b = new YAHOO.widget.Button(idatual+"proxima_", | |
2002 | 2001 | {onclick:{fn: function(){ |
2003 | 2002 | eval(proxima+"()"); |
2004 | 2003 | }, |
... | ... | @@ -2062,18 +2061,19 @@ i3GEO.util = { |
2062 | 2061 | boolean |
2063 | 2062 | */ |
2064 | 2063 | intersectaBox: function(box1,box2){ |
2065 | - var box1 = box1.split(" "), | |
2066 | - box2 = box2.split(" "), | |
2067 | - box1i = box2, | |
2064 | + box1 = box1.split(" "); | |
2065 | + box2 = box2.split(" "); | |
2066 | + var box1i = box2, | |
2068 | 2067 | box2i = box1, |
2069 | 2068 | coordx, |
2070 | 2069 | coordy, |
2071 | 2070 | i; |
2072 | 2071 | coordx = box1[0]*1; |
2073 | 2072 | coordy = box1[1]*1; |
2074 | - if(coordx >= box2[0]*1 && coordx <= box2[2]*1 && coordy >= box2[1]*1 && coordy <= box2[3]*1) | |
2075 | - coordx = box1[0]*1; | |
2076 | - coordy = box1[3]*1; | |
2073 | + if(coordx >= box2[0]*1 && coordx <= box2[2]*1 && coordy >= box2[1]*1 && coordy <= box2[3]*1){ | |
2074 | + coordx = box1[0]*1; | |
2075 | + coordy = box1[3]*1; | |
2076 | + } | |
2077 | 2077 | if(coordx >= box2[0]*1 && coordx <= box2[2]*1 && coordy >= box2[1]*1 && coordy <= box2[3]*1) |
2078 | 2078 | {return true;} |
2079 | 2079 | coordx = box1[2]*1; |
... | ... | @@ -2090,9 +2090,10 @@ i3GEO.util = { |
2090 | 2090 | |
2091 | 2091 | coordx = box1[0]*1; |
2092 | 2092 | coordy = box1[1]*1; |
2093 | - if(coordx >= box2[0]*1 && coordx <= box2[2]*1 && coordy >= box2[1]*1 && coordy <= box2[3]*1) | |
2094 | - coordx = box1[0]*1; | |
2095 | - coordy = box1[3]*1; | |
2093 | + if(coordx >= box2[0]*1 && coordx <= box2[2]*1 && coordy >= box2[1]*1 && coordy <= box2[3]*1){ | |
2094 | + coordx = box1[0]*1; | |
2095 | + coordy = box1[3]*1; | |
2096 | + } | |
2096 | 2097 | if(coordx >= box2[0]*1 && coordx <= box2[2]*1 && coordy >= box2[1]*1 && coordy <= box2[3]*1) |
2097 | 2098 | {return true;} |
2098 | 2099 | coordx = box1[2]*1; |
... | ... | @@ -2180,18 +2181,19 @@ i3GEO.util = { |
2180 | 2181 | scripts = document.getElementsByTagName('script'), |
2181 | 2182 | i = 0, |
2182 | 2183 | index, |
2183 | - ns = scripts.length; | |
2184 | + ns = scripts.length, | |
2185 | + src; | |
2184 | 2186 | for (i = 0; i < ns; i++) { |
2185 | - var src = scripts[i].getAttribute('src'); | |
2187 | + src = scripts[i].getAttribute('src'); | |
2186 | 2188 | if (src) { |
2187 | - var index = src.lastIndexOf("/classesjs/i3geo.js"); | |
2189 | + index = src.lastIndexOf("/classesjs/i3geo.js"); | |
2188 | 2190 | // is it found, at the end of the URL? |
2189 | - if ((index > -1) && (index + "/classesjs/i3geo.js".length == src.length)) { | |
2191 | + if ((index > -1) && (index + "/classesjs/i3geo.js".length === src.length)) { | |
2190 | 2192 | scriptLocation = src.slice(0, -"/classesjs/i3geo.js".length); |
2191 | 2193 | break; |
2192 | 2194 | } |
2193 | - var index = src.lastIndexOf("/classesjs/i3geonaocompacto.js"); | |
2194 | - if ((index > -1) && (index + "/classesjs/i3geonaocompacto.js".length == src.length)) { | |
2195 | + index = src.lastIndexOf("/classesjs/i3geonaocompacto.js"); | |
2196 | + if ((index > -1) && (index + "/classesjs/i3geonaocompacto.js".length === src.length)) { | |
2195 | 2197 | scriptLocation = src.slice(0, -"/classesjs/i3geonaocompacto.js".length); |
2196 | 2198 | break; |
2197 | 2199 | } |
... | ... | @@ -2284,36 +2286,40 @@ try{ |
2284 | 2286 | if(ativa) { |
2285 | 2287 | this.properties.ativa = ativa; |
2286 | 2288 | } |
2287 | - var accordionObject = document.getElementById(this.properties.Id); | |
2289 | + var accordionObject = document.getElementById(this.properties.Id), | |
2290 | + headers, | |
2291 | + bodies; | |
2288 | 2292 | if(accordionObject) { |
2289 | - if(accordionObject.nodeName == "DL") { | |
2290 | - var headers = accordionObject.getElementsByTagName("dt"); | |
2291 | - var bodies = headers[0].parentNode.getElementsByTagName("dd"); | |
2293 | + if(accordionObject.nodeName === "DL") { | |
2294 | + headers = accordionObject.getElementsByTagName("dt"); | |
2295 | + bodies = headers[0].parentNode.getElementsByTagName("dd"); | |
2292 | 2296 | } |
2293 | 2297 | this.attachEvents(headers,0); |
2294 | 2298 | } |
2295 | 2299 | }, |
2296 | 2300 | |
2297 | 2301 | attachEvents : function(headers,nr) { |
2298 | - for(var i=0; i<headers.length; i++) { | |
2299 | - var headerProperties = { | |
2302 | + var i,headerProperties,parentObj,header; | |
2303 | + for(i=0; i<headers.length; i++) { | |
2304 | + headerProperties = { | |
2300 | 2305 | objRef : headers[i], |
2301 | 2306 | nr : i, |
2302 | 2307 | jsObj : this |
2303 | 2308 | }; |
2304 | 2309 | YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties); |
2305 | 2310 | } |
2306 | - var parentObj = headers[this.properties.ativa].parentNode; | |
2307 | - var headers = parentObj.getElementsByTagName("dd"); | |
2308 | - var header = headers[this.properties.ativa]; | |
2311 | + parentObj = headers[this.properties.ativa].parentNode; | |
2312 | + headers = parentObj.getElementsByTagName("dd"); | |
2313 | + header = headers[this.properties.ativa]; | |
2309 | 2314 | |
2310 | 2315 | this.expand(header); |
2311 | 2316 | }, |
2312 | 2317 | |
2313 | 2318 | clickHeader : function(e,headerProperties) { |
2314 | - var parentObj = headerProperties.objRef.parentNode; | |
2315 | - var headers = parentObj.getElementsByTagName("dd"); | |
2316 | - var header = headers[headerProperties.nr]; | |
2319 | + var parentObj = headerProperties.objRef.parentNode, | |
2320 | + headers = parentObj.getElementsByTagName("dd"), | |
2321 | + header = headers[headerProperties.nr], | |
2322 | + i; | |
2317 | 2323 | |
2318 | 2324 | if(YAHOO.util.Dom.hasClass(header,"open")) { |
2319 | 2325 | headerProperties.jsObj.collapse(header); |
... | ... | @@ -2321,7 +2327,7 @@ try{ |
2321 | 2327 | if(headerProperties.jsObj.properties.multipleOpen) { |
2322 | 2328 | headerProperties.jsObj.expand(header); |
2323 | 2329 | } else { |
2324 | - for(var i=0; i<headers.length; i++) { | |
2330 | + for(i=0; i<headers.length; i++) { | |
2325 | 2331 | if(YAHOO.util.Dom.hasClass(headers[i],"open")) { |
2326 | 2332 | headerProperties.jsObj.collapse(headers[i]); |
2327 | 2333 | } |
... | ... | @@ -2347,11 +2353,12 @@ try{ |
2347 | 2353 | } |
2348 | 2354 | }, |
2349 | 2355 | initAnimation : function(header,dir) { |
2350 | - if(dir == "open") { | |
2356 | + var attributes,animation,animationEnd; | |
2357 | + if(dir === "open") { | |
2351 | 2358 | YAHOO.util.Dom.setStyle(header,"visibility","hidden"); |
2352 | 2359 | YAHOO.util.Dom.setStyle(header,"height",this.properties.altura); |
2353 | 2360 | YAHOO.util.Dom.addClass(header,"open"); |
2354 | - var attributes = { | |
2361 | + attributes = { | |
2355 | 2362 | height : { |
2356 | 2363 | from : 0, |
2357 | 2364 | to : this.properties.altura |
... | ... | @@ -2359,8 +2366,7 @@ try{ |
2359 | 2366 | }; |
2360 | 2367 | YAHOO.util.Dom.setStyle(header,"height",0); |
2361 | 2368 | YAHOO.util.Dom.setStyle(header,"visibility","visible"); |
2362 | - | |
2363 | - var animation = new YAHOO.util.Anim(header,attributes); | |
2369 | + animation = new YAHOO.util.Anim(header,attributes); | |
2364 | 2370 | animationEnd = function() { |
2365 | 2371 | //alert(this.properties.altura+"px") |
2366 | 2372 | header.style.height = this.properties.altura+"px"; |
... | ... | @@ -2370,15 +2376,15 @@ try{ |
2370 | 2376 | animation.onComplete.subscribe(animationEnd); |
2371 | 2377 | animation.animate(); |
2372 | 2378 | } else if ("close") { |
2373 | - var attributes = { | |
2379 | + attributes = { | |
2374 | 2380 | height : { |
2375 | 2381 | to : 0 |
2376 | 2382 | } |
2377 | - }; | |
2383 | + }; | |
2378 | 2384 | animationEnd = function() { |
2379 | 2385 | YAHOO.util.Dom.removeClass(header,"open"); |
2380 | 2386 | }; |
2381 | - var animation = new YAHOO.util.Anim(header,attributes); | |
2387 | + animation = new YAHOO.util.Anim(header,attributes); | |
2382 | 2388 | animation.duration = this.properties.animationDuration; |
2383 | 2389 | animation.useSeconds = false; |
2384 | 2390 | animation.onComplete.subscribe(animationEnd); | ... | ... |
classesjs/datadownload.js
classesjs/depreciados.js
... | ... | @@ -449,7 +449,7 @@ function aguarde() |
449 | 449 | alert("aguarde foi depreciado utilize i3GEO.janela"); |
450 | 450 | this.abre = function(aguardeId,texto) |
451 | 451 | { |
452 | - i3GEO.janela.abreAguarde(aguardeId,texto); | |
452 | + i3GEO.janela.abreAguarde(aguardeId,texto); | |
453 | 453 | }; |
454 | 454 | this.fecha = function(aguardeId) |
455 | 455 | { | ... | ... |
classesjs/geradordelinks.js