Commit 8bdfef15d1650fcaba4a60c067ff3386b171ed0d

Authored by Edmar Moretti
1 parent 6821dc2f

Revisão dos códigos javascript para remoção de lixo e aplicação de padrões

classesjs/classe_guias.js
... ... @@ -250,7 +250,7 @@ i3GEO.guias = {
250 250 //
251 251 //obtém outras guias que podem existir no mapa
252 252 //
253   - var nguiasreal = 0,onf,outf,guiaconteudo,id,guia,guias,g,re,ng,tituloguia,i,ins,largura,altura,temp,preload,
  253 + var nguiasreal = 0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,
254 254 CONFIGURA = i3GEO.guias.CONFIGURA,
255 255 guias = i3GEO.util.listaChaves(CONFIGURA),
256 256 nguias = guias.length;
... ... @@ -330,23 +330,6 @@ i3GEO.guias = {
330 330 //adiciona uma guia que permite esconder todas as outras guias se for do tipo tablet
331 331 ins += "</ul>";
332 332 onde.innerHTML = ins;
333   -
334   - onf = function(event){
335   - var bcg,cor;
336   - YAHOO.util.Event.stopEvent(event);
337   - bcg = this.parentNode.parentNode.style;
338   - cor = bcg.background.split(" ")[0];
339   - if(cor !== "white" && bcg.backgroundColor !== "white")
340   - {bcg.background = "#bfdaff";}
341   - };
342   - outf = function(event){
343   - var bcg,cor;
344   - YAHOO.util.Event.stopEvent(event);
345   - bcg = this.parentNode.parentNode.style;
346   - cor = bcg.background.split(" ")[0];
347   - if(cor !== "white" && bcg.backgroundColor !== "white")
348   - {bcg.background = "transparent";}
349   - };
350 333 }
351 334 if(i3GEO.guias.TIPO === "sanfona"){
352 335 ins = '<dl id=sanfona'+onde.id+' class="accordion" >';
... ... @@ -385,8 +368,6 @@ i3GEO.guias = {
385 368 ins += "</dl>";
386 369 onde.innerHTML = ins;
387 370 onde.style.height = altura+"px";
388   - onf = function(){};
389   - outf = function(){};
390 371 YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);
391 372 i3GEO.guias.ALTURACORPOGUIAS = altura;
392 373 }
... ... @@ -403,8 +384,8 @@ i3GEO.guias = {
403 384 YAHOO.util.Event.addListener($i(id), "click", YAHOO.util.Event.preventDefault);
404 385 YAHOO.util.Event.addListener($i(id), "click", YAHOO.util.Event.stopPropagation);
405 386 YAHOO.util.Event.addFocusListener($i(id), YAHOO.util.Event.preventDefault);
406   - guiaconteudo.onmouseover = onf;
407   - guiaconteudo.onmouseout = outf;
  387 + guiaconteudo.onmouseover = function(){};
  388 + guiaconteudo.onmouseout = function(){};
408 389 temp = $i(guia.idconteudo);
409 390 if(temp){
410 391 temp.style.overflow="auto";
... ... @@ -437,7 +418,7 @@ i3GEO.guias = {
437 418 */
438 419 ajustaAltura: function(){
439 420 if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.ajustaAltura()");}
440   - var guia,guias,nguias,temp,temps,n,i,
  421 + var guia,guias,nguias,temp,temps,n,i,g,
441 422 altura=0;
442 423 if(i3GEO.guias.ALTURACORPOGUIAS != 0)
443 424 {altura = i3GEO.guias.ALTURACORPOGUIAS;}
... ... @@ -512,7 +493,7 @@ i3GEO.guias = {
512 493 */
513 494 mostra: function(guia){
514 495 if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.mostra()");}
515   - var guias,nguias,g,temp,temp1,attributes,anim;
  496 + var guias,nguias,g,temp,attributes,anim;
516 497 guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);
517 498 nguias = guias.length;
518 499 //
... ... @@ -601,7 +582,7 @@ i3GEO.guias = {
601 582 libera: function(){
602 583 if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.libera()");}
603 584 if (!$i("conteudojanelaguias")){
604   - var i,w,pos,a,l,letras,temp;
  585 + var i,w,pos,a,l,temp;
605 586 $i(i3GEO.Interface.IDCORPO).style.left = "0px";
606 587 if($i(this.IDGUIAS))
607 588 {$i(this.IDGUIAS).style.display="none";}
... ... @@ -752,7 +733,6 @@ i3GEO.guias = {
752 733 var posMapa = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),
753 734 centroY = posMapa[1] + (i3GEO.parametros.h / 2),
754 735 config = i3GEO.guias.guiaMovel.config,
755   - ins = "",
756 736 temp;
757 737  
758 738 if(i3GEO.guias.ALTURACORPOGUIAS === 0 && config.alturaGuiaMovel === 0)
... ... @@ -910,8 +890,7 @@ i3GEO.guias = {
910 890 Abre ou fecha a guia móvel
911 891 */
912 892 abreFecha: function(){
913   - var conteudo = $i("i3GEOguiaMovelConteudo"),
914   - molde = $i("i3GEOguiaMovelMolde"),
  893 + var molde = $i("i3GEOguiaMovelMolde"),
915 894 guia = $i("i3GEOguiaMovel"),
916 895 attributes,
917 896 anim,
... ...
classesjs/classe_i3geo.js
... ... @@ -443,7 +443,7 @@ i3GEO = {
443 443 */
444 444 atualiza: function(retorno){
445 445 if(typeof(console) !== 'undefined'){console.info("i3GEO.atualiza()");}
446   - var corpoMapa,erro,tempo,mapscale,mapexten,temp;
  446 + var corpoMapa,erro,mapscale,temp;
447 447 if(i3GEO.contadorAtualiza > 1)
448 448 {i3GEO.contadorAtualiza--;return;}
449 449 if(i3GEO.contadorAtualiza > 0)
... ... @@ -496,9 +496,7 @@ i3GEO = {
496 496 if(typeof(console) !== 'undefined'){console.error(e);}
497 497 }
498 498 erro = function(){
499   - var legimagem,c;
500   - legimagem = "";
501   - c = confirm("Ocorreu um erro, quer tentar novamente?");
  499 + var c = confirm("Ocorreu um erro, quer tentar novamente?");
502 500 if(c){
503 501 corpoMapa.call();
504 502 }
... ... @@ -627,9 +625,8 @@ i3GEO = {
627 625 {array} - [w,h]
628 626 */
629 627 reCalculaTamanho: function(){
630   - var diminuix,diminuiy,menos,novow,novoh,w,h,temp,temp1,
631   - antigoh = i3GEO.parametros.h,
632   - antigow = i3GEO.parametros.w;
  628 + var diminuix,diminuiy,menos,novow,novoh,w,h,temp,
  629 + antigoh = i3GEO.parametros.h;
633 630 diminuix = (navm) ? i3GEO.configura.diminuixM : i3GEO.configura.diminuixN;
634 631 diminuiy = (navm) ? i3GEO.configura.diminuiyM : i3GEO.configura.diminuiyN;
635 632 menos = 0;
... ... @@ -644,7 +641,6 @@ i3GEO = {
644 641 novow = temp[0];
645 642 novoh = temp[1];
646 643 temp = (antigoh - (novoh - diminuiy));
647   - temp1 = (antigow - (novow - diminuix));
648 644  
649 645 document.body.style.height = novoh + "px";
650 646 w = novow - menos - diminuix;
... ...
classesjs/classe_interface.js
... ... @@ -598,7 +598,7 @@ i3GEO.Interface = {
598 598 //monta o mapa após receber o resultado da criação do mapfile temporário
599 599 //
600 600 var montaMapa = function(){
601   - var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo,layersn,
  601 + var pz,temp,layers,i,texto,estilo,layersn,
602 602 openlayers = i3GEO.Interface.openlayers;
603 603 i3GEO.util.multiStep([
604 604 openlayers.registraEventos,
... ... @@ -726,7 +726,7 @@ i3GEO.Interface = {
726 726 i3GEO.php.listaRSSwsARRAY(monta,"KML");
727 727 },
728 728 adicionaKml: function(pan,url,titulo,ativo){
729   - var ngeoxml,i,zoom;
  729 + var ngeoxml,i;
730 730 if(!$i("arvoreCamadasKml"))
731 731 {i3GEO.Interface.openlayers.criaArvoreKML();}
732 732 ngeoxml = "geoXml_"+i3GEO.mapa.GEOXML.length;
... ... @@ -783,7 +783,7 @@ i3GEO.Interface = {
783 783 }
784 784 },
785 785 adicionaNoArvoreKml: function(url,nomeOverlay,ativo,id){
786   - var root,node,d,nodekml;
  786 + var node,d,nodekml;
787 787 if(!$i("arvoreCamadasKml"))
788 788 {i3GEO.Interface.openlayers.criaArvoreKML();}
789 789 if(arguments.length === 2){
... ... @@ -792,7 +792,6 @@ i3GEO.Interface = {
792 792 }
793 793 if(arguments.length === 2)
794 794 {id = nomeOverlay;}
795   - root = i3GEO.Interface.openlayers.ARVORE.getRoot();
796 795 node = i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");
797 796 html = "<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";
798 797 if(ativo === true)
... ... @@ -821,35 +820,39 @@ i3GEO.Interface = {
821 820 eval("i3geoOL.addLayer("+id+");");
822 821 eval("temp = "+id+".div;");
823 822 temp.onclick = function(e){
824   - var targ,id,temp,features,n,i,j,html="";
  823 + var targ = "",
  824 + id,temp,features,n,i,
  825 + j = "",
  826 + html="";
825 827 if (!e){e = window.event;}
826 828 if (e.target)
827 829 {targ = e.target;}
828 830 else
829 831 if (e.srcElement)
830 832 {targ = e.srcElement;}
831   -
832   - temp = targ.id.split("_");
833   - if(temp[0] === "OpenLayers.Geometry.Point"){
834   - id = targ.id;
835   - temp = i3geoOL.getLayer(this.id);
836   - features = temp.features;
837   - n = features.length;
838   - for(i=0;i<n;i++){
839   - if(features[i].geometry.id === id){
840   - for (j in features[i].attributes) {
841   - html += j+": "+features[i].attributes[j];
  833 + if(targ.id){
  834 + temp = targ.id.split("_");
  835 + if(temp[0] === "OpenLayers.Geometry.Point"){
  836 + id = targ.id;
  837 + temp = i3geoOL.getLayer(this.id);
  838 + features = temp.features;
  839 + n = features.length;
  840 + for(i=0;i<n;i++){
  841 + if(features[i].geometry.id === id){
  842 + for (j in features[i].attributes) {
  843 + html += j+": "+features[i].attributes[j];
  844 + }
  845 + g = features[i].geometry;
  846 + i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud(
  847 + "kml",
  848 + new OpenLayers.LonLat(g.x,g.y),
  849 + null,
  850 + html,
  851 + null,
  852 + true
  853 + ));
  854 +
842 855 }
843   - g = features[i].geometry;
844   - i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud(
845   - "kml",
846   - new OpenLayers.LonLat(g.x,g.y),
847   - null,
848   - html,
849   - null,
850   - true
851   - ));
852   -
853 856 }
854 857 }
855 858 }
... ... @@ -869,20 +872,15 @@ i3GEO.Interface = {
869 872 criaLayers: function(){
870 873 var configura = i3GEO.configura,
871 874 url = configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,
872   - urlfundo = configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&layer=&tipolayer=fundo&TIPOIMAGEM="+configura.tipoimagem,
873 875 nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length,
874 876 layer,
875   - layers,
876 877 camada,
877 878 urllayer,
878 879 opcoes,
879 880 i,
880 881 n,
881   - temp,
  882 + temp = $i("i3GEOprogressoDiv"),
882 883 fundoIsBase = true;
883   -
884   -
885   - var temp = $i("i3GEOprogressoDiv");
886 884 if(temp){
887 885 i3GEO.Interface.STATUS.atualizando = [];
888 886 temp.style.display = "none";
... ... @@ -987,10 +985,6 @@ i3GEO.Interface = {
987 985 }
988 986 },
989 987 inverteModoTile: function(){
990   - var nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length,
991   - layer,
992   - i,
993   - camada;
994 988 if(i3GEO.Interface.openlayers.TILES === true)
995 989 {i3GEO.Interface.openlayers.TILES = false;}
996 990 else
... ... @@ -1084,7 +1078,6 @@ i3GEO.Interface = {
1084 1078 },
1085 1079 ligaDesliga:function(obj){
1086 1080 var layers = i3geoOL.getLayersByName(obj.value),
1087   - temp = function(){i3GEO.mapa.legendaHTML.atualiza();},
1088 1081 desligar = "",
1089 1082 ligar = "",
1090 1083 b;
... ... @@ -1175,7 +1168,7 @@ i3GEO.Interface = {
1175 1168 i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]);
1176 1169 });
1177 1170 i3geoOL.events.register("mousemove", i3geoOL, function(e){
1178   - var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey;
  1171 + var p,lonlat,d,pos;
1179 1172 if(modoAtual === "move")
1180 1173 {return;}
1181 1174 p = e.xy;
... ... @@ -1202,7 +1195,9 @@ i3GEO.Interface = {
1202 1195 },
1203 1196 ativaBotoes: function(){
1204 1197 if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.openlayers.ativaBotoes()");}
1205   - var imagemxy,x1,y1,x2,y2;
  1198 + var imagemxy,
  1199 + x2 = 0,
  1200 + y2 = 0;
1206 1201 imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));
1207 1202 if ($i("barraDeBotoes2") || i3GEO.barraDeBotoes.AUTO === true){
1208 1203 x2 = imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;
... ... @@ -1343,7 +1338,7 @@ i3GEO.Interface = {
1343 1338 i3GEO.Interface.googlemaps.criaLayers();
1344 1339 },
1345 1340 cria: function(w,h){
1346   - var i,f,ins,js;
  1341 + var i,f,ins;
1347 1342 posfixo = "&nd=0";
1348 1343 i = $i(i3GEO.Interface.IDCORPO);
1349 1344 if(i){
... ... @@ -1372,11 +1367,11 @@ i3GEO.Interface = {
1372 1367 });
1373 1368 },
1374 1369 inicia: function(){
1375   - var pol,ret,pt1,pt2,bottomLeft,bottomRight,i3GEOTile;
  1370 + var pol,ret;
1376 1371 pol = i3GEO.parametros.mapexten;
1377 1372 ret = pol.split(" ");
1378 1373 function montaMapa(retorno){
1379   - var pos, sw,ne,z,myMapType,
  1374 + var sw,ne,
1380 1375 dobra = $i("i3GEOdobraPagina");
1381 1376 try{
1382 1377 i3GeoMap = new google.maps.Map($i(i3GEO.Interface.IDMAPA),{scaleControl:true});
... ... @@ -1450,8 +1445,7 @@ i3GEO.Interface = {
1450 1445 }
1451 1446 },
1452 1447 criaImageMap: function(nomeLayer){
1453   - var i3GEOTileO,s;
1454   -
  1448 + var i3GEOTileO = "",s;
1455 1449 s = "i3GEOTileO = new google.maps.ImageMapType({ "+
1456 1450 "getTileUrl: function(coord, zoom) {" +
1457 1451 " var url = '" + i3GEO.configura.locaplic +"/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid +
... ... @@ -1462,20 +1456,6 @@ i3GEO.Interface = {
1462 1456 "isPng: true," +
1463 1457 "name: '" + nomeLayer + "'" +
1464 1458 "});";
1465   -
1466   -/*
1467   - s = "i3GEOTileO = new google.maps.ImageMapType({ "+
1468   - "getTileUrl: function(coord, zoom) {" +
1469   - " var url = '" + i3GEO.configura.locaplic +"/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid +
1470   - "&WIDTH=512&HEIGHT=512&BBOX=' + i3GEO.Interface.googlemaps.bbox() + '"+
1471   - "&Z=' + zoom + '&X=' + (coord.x) + '&Y=' + (coord.y) + '&layer=" + nomeLayer + i3GEO.Interface.googlemaps.PARAMETROSLAYER + '&r='+Math.random()+"';" +
1472   - " return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; " +
1473   - "}, "+
1474   - "tileSize: new google.maps.Size(512,512)," +
1475   - "isPng: true," +
1476   - "name: '" + nomeLayer + "'" +
1477   - "});";
1478   -*/
1479 1459 eval(s);
1480 1460 return i3GEOTileO;
1481 1461 },
... ... @@ -1576,8 +1556,6 @@ i3GEO.Interface = {
1576 1556 retornaDivLayer: function(nomeLayer){
1577 1557 var i,
1578 1558 divmapa = $i("googlemapsdiv"),
1579   - divlayer,
1580   - divs,
1581 1559 divimg,
1582 1560 n;
1583 1561 divimg = divmapa.getElementsByTagName("img");
... ... @@ -1596,7 +1574,6 @@ i3GEO.Interface = {
1596 1574 desligar = "",
1597 1575 ligar = "",
1598 1576 n,
1599   - listac,
1600 1577 i,
1601 1578 lista = [],
1602 1579 listatemp;
... ... @@ -1643,7 +1620,9 @@ i3GEO.Interface = {
1643 1620 },
1644 1621 ativaBotoes: function(){
1645 1622 if(typeof(console) !== 'undefined'){console.info("i3GEO.Interface.googlemaps.ativaBotoes()");}
1646   - var imagemxy,x1,y1,x2,y2;
  1623 + var imagemxy,
  1624 + x2 = 0,
  1625 + y2 = 0;
1647 1626 imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));
1648 1627 if ($i("barraDeBotoes2") || i3GEO.barraDeBotoes.AUTO === true){
1649 1628 x2 = imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;
... ... @@ -1675,8 +1654,7 @@ i3GEO.Interface = {
1675 1654 },
1676 1655 recalcPar: function(){
1677 1656 try{
1678   - var bounds,
1679   - sw,
  1657 + var sw,
1680 1658 ne,
1681 1659 escalaAtual = i3GEO.parametros.mapscale;
1682 1660 sw = i3GeoMap.getBounds().getSouthWest();
... ... @@ -1711,16 +1689,10 @@ i3GEO.Interface = {
1711 1689 }
1712 1690 },
1713 1691 zoom2extent:function(mapexten){
1714   - var pol,ret,pt1,pt2,sw,ne,z;
1715   - pol = mapexten;
1716   - ret = pol.split(" ");
1717   - //
1718   - //verifica se é geo
1719   - //
1720   - pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1;
1721   - pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1;
1722   - sw = new google.maps.LatLng(ret[1],ret[0]);
1723   - ne = new google.maps.LatLng(ret[3],ret[2]);
  1692 + var pol = mapexten,
  1693 + ret = pol.split(" "),
  1694 + sw = new google.maps.LatLng(ret[1],ret[0]),
  1695 + ne = new google.maps.LatLng(ret[3],ret[2]);
1724 1696 i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));
1725 1697 },
1726 1698 pan2ponto: function(x,y){
... ... @@ -1746,7 +1718,7 @@ i3GEO.Interface = {
1746 1718 ativo {boolean} - indica se a camada estará ativa ou não. Se não for definido, será considerado como true
1747 1719 */
1748 1720 adicionaKml: function(pan,url,titulo,ativo){
1749   - var ngeoxml,i,zoom;
  1721 + var ngeoxml,i;
1750 1722 if(!$i("arvoreCamadasKml"))
1751 1723 {i3GEO.Interface.googlemaps.criaArvoreKML();}
1752 1724 ngeoxml = "geoXml_"+i3GEO.mapa.GEOXML.length;
... ... @@ -1804,7 +1776,7 @@ i3GEO.Interface = {
1804 1776 id {string} - nome do objeto GGeoXml
1805 1777 */
1806 1778 adicionaNoArvoreGoogle: function(url,nomeOverlay,ativo,id){
1807   - var root,node,d,nodekml;
  1779 + var node,d,nodekml;
1808 1780 if(!$i("arvoreCamadasKml"))
1809 1781 {i3GEO.Interface.googlemaps.criaArvoreKML();}
1810 1782 if(arguments.length === 2){
... ... @@ -1813,7 +1785,6 @@ i3GEO.Interface = {
1813 1785 }
1814 1786 if(arguments.length === 2)
1815 1787 {id = nomeOverlay;}
1816   - root = i3GEO.Interface.googlemaps.ARVORE.getRoot();
1817 1788 node = i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");
1818 1789 html = "<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";
1819 1790 if(ativo === true)
... ... @@ -1996,7 +1967,7 @@ i3GEO.Interface = {
1996 1967 i3GEO.Interface.googleearth.criaLayers();
1997 1968 },
1998 1969 cria: function(w,h){
1999   - var i,i3GeoMap3d,i3GeoMap,texto;
  1970 + var i,i3GeoMap3d,texto;
2000 1971 i3GEO.configura.listaDePropriedadesDoMapa = {
2001 1972 "propriedades": [
2002 1973 { text: "p2", url: "javascript:i3GEO.mapa.dialogo.tipoimagem()"},
... ... @@ -2101,7 +2072,6 @@ i3GEO.Interface = {
2101 2072 i3GeoMap3d.style.zIndex = 0;
2102 2073 i.appendChild(i3GeoMap3d);
2103 2074 }
2104   - i3GeoMap = null;
2105 2075 google.load("earth", "1");
2106 2076 },
2107 2077 inicia: function(){
... ... @@ -2115,13 +2085,8 @@ i3GEO.Interface = {
2115 2085 i3GEO.Interface.googleearth.criaLayers();
2116 2086  
2117 2087 var options = i3GeoMap.getOptions(),
2118   - layerRoot = i3GeoMap.getLayerRoot(),
2119   - evento = function(e){
2120   - i3GEO.Interface.googleearth.recalcPar();
2121   - g_operacao = "";
2122   - g_tipoacao = "";
2123   - };
2124   -
  2088 + layerRoot = i3GeoMap.getLayerRoot();
  2089 +
2125 2090 options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);
2126 2091 options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);
2127 2092 options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);
... ... @@ -2190,16 +2155,20 @@ i3GEO.Interface = {
2190 2155 },
2191 2156 retornaIndiceLayer: function(nomeLayer){
2192 2157 var n = i3GeoMap.getFeatures().getChildNodes().getLength(),
2193   - indice = false;
2194   - for(i=0;i<n;i++){
2195   - if(i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer)
2196   - {indice = i;}
  2158 + indice = 0,
  2159 + i = 0;
  2160 + if(n > 0){
  2161 + for(i=0;i<n;i++){
  2162 + if(i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer)
  2163 + {indice = i;}
  2164 + }
  2165 + return indice;
2197 2166 }
2198   - return indice;
  2167 + else
  2168 + {return false;}
2199 2169 },
2200 2170 aplicaOpacidade: function(opacidade){
2201 2171 var n = i3GeoMap.getFeatures().getChildNodes().getLength(),
2202   - indice = false,
2203 2172 i;
2204 2173 for(i=0;i<n;i++){
2205 2174 i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade);
... ... @@ -2332,11 +2301,9 @@ i3GEO.Interface = {
2332 2301 }
2333 2302 var polygonPlacemark = i3GeoMap.createPlacemark(''),
2334 2303 poly = i3GeoMap.createPolygon(''),
2335   - outer,
2336 2304 polyStyle;
2337 2305 poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);
2338 2306 polygonPlacemark.setGeometry(poly);
2339   - outer = i3GeoMap.createLinearRing('');
2340 2307 polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat, centerLng, radius));
2341 2308 polygonPlacemark.setName(name);
2342 2309 polygonPlacemark.setSnippet(snippet);
... ... @@ -2403,7 +2370,7 @@ i3GEO.Interface = {
2403 2370 ativo {boolean} - indica se a camada estará ativa ou não. Se não for definido, será considerado como true
2404 2371 */
2405 2372 adicionaKml: function(pan,url,titulo,ativo){
2406   - var ngeoxml,i,zoom;
  2373 + var ngeoxml,i;
2407 2374 if(!$i("arvoreCamadasKml"))
2408 2375 {i3GEO.Interface.googleearth.criaArvoreKML();}
2409 2376 ngeoxml = "geoXml_"+i3GEO.mapa.GEOXML.length;
... ... @@ -2468,7 +2435,7 @@ i3GEO.Interface = {
2468 2435 id {string} - nome do objeto GGeoXml
2469 2436 */
2470 2437 adicionaNoArvoreGoogle: function(url,nomeOverlay,ativo,id){
2471   - var root,node,d,nodekml;
  2438 + var node,d,nodekml;
2472 2439 if(!$i("arvoreCamadasKml"))
2473 2440 {i3GEO.Interface.googleearth.criaArvoreKML();}
2474 2441 if(arguments.length === 2){
... ... @@ -2477,7 +2444,6 @@ i3GEO.Interface = {
2477 2444 }
2478 2445 if(arguments.length === 2)
2479 2446 {id = nomeOverlay;}
2480   - root = i3GEO.Interface.googleearth.ARVORE.getRoot();
2481 2447 node = i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");
2482 2448 html = "<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";
2483 2449 if(ativo === true)
... ...
classesjs/classe_janela.js
... ... @@ -249,7 +249,7 @@ i3GEO.janela = {
249 249 janela.bringToTop();
250 250 return;
251 251 }
252   - var i,wlargurA,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr,janela;
  252 + var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;
253 253 if(navm && !chro)
254 254 {this.TRANSICAOSUAVE = false;}
255 255 //executa as funções default de antes de qualquer criação de janela
... ... @@ -480,7 +480,7 @@ i3GEO.janela = {
480 480 */
481 481 abreAguarde: function(id,texto){
482 482 if(typeof(console) !== 'undefined'){console.info("i3GEO.janela.abreAguarde("+id+")");}
483   - var pos,index,temp,janela;
  483 + var pos,temp,janela;
484 484 if(!id || id == undefined)
485 485 {return;}
486 486 janela = YAHOO.i3GEO.janela.managerAguarde.find(id);
... ... @@ -701,7 +701,7 @@ i3GEO.janela = {
701 701 }
702 702 },
703 703 slider: function(funcao,inicial){
704   - var tickSize,keyIncrement,scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,Dom,lang,slider,bg,thumb,valuearea,textfield;
  704 + var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider = "",bg,thumb;
705 705 janela = i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");
706 706 novoel = document.createElement("div");
707 707 novoel.id = "slider-bg";
... ... @@ -709,12 +709,8 @@ i3GEO.janela = {
709 709 novoel.innerHTML = '<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';
710 710 janela[2].appendChild(novoel);
711 711 Event = YAHOO.util.Event;
712   - Dom = YAHOO.util.Dom;
713   - lang = YAHOO.lang;
714 712 bg="slider-bg";
715 713 thumb="slider-thumb";
716   - valuearea="slider-value";
717   - textfield="slider-converted-value";
718 714 novoel.style.position = "relative";
719 715 novoel.style.background= 'url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';
720 716 novoel.style.height = "28px";
... ... @@ -727,8 +723,6 @@ i3GEO.janela = {
727 723 scaleFactor = 1;
728 724 // The amount the slider moves when the value is changed with the arrow
729 725 // keys
730   - keyIncrement = 20;
731   - tickSize = 20;
732 726 Event.onDOMReady(function() {
733 727 slider = YAHOO.widget.Slider.getHorizSlider(bg,thumb, topConstraint, bottomConstraint, 20);
734 728 slider.setValue(parseInt(inicial,10));
... ... @@ -827,7 +821,6 @@ try{
827 821 YAHOO.widget.ResizePanel.superclass.init.call(this, el);
828 822 this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);
829 823 var Dom = YAHOO.util.Dom,
830   - Event = YAHOO.util.Event,
831 824 oInnerElement = this.innerElement,
832 825 oResizeHandle = document.createElement("DIV"),
833 826 sResizeHandleId = this.id + "_resizehandle";
... ... @@ -842,12 +835,12 @@ try{
842 835 oFooter = this.footer,
843 836 nStartWidth,
844 837 nStartHeight,
845   - aStartPos,
  838 + aStartPos = 0,
846 839 nBodyBorderTopWidth,
847 840 nBodyBorderBottomWidth,
848 841 nBodyTopPadding,
849 842 nBodyBottomPadding,
850   - nBodyOffset;
  843 + nBodyOffset = 0;
851 844 oInnerElement.appendChild(oResizeHandle);
852 845 this.ddResize = new YAHOO.util.DragDrop(sResizeHandleId, this.id);
853 846 this.ddResize.setHandleElId(sResizeHandleId);
... ...
classesjs/classe_mapa.js
... ... @@ -112,7 +112,7 @@ i3GEO.mapa = {
112 112 */
113 113 ativaAutoResize: function(){
114 114 window.onresize = function(){
115   - var temp,Dw,Dh, r = false;
  115 + var Dw,Dh, r = false;
116 116 Dw = YAHOO.util.Dom.getViewportWidth();
117 117 Dh = YAHOO.util.Dom.getViewportHeight();
118 118 if(Math.abs(Dw - i3GEO.tamanhodoc[0]) > 50){
... ... @@ -124,7 +124,7 @@ i3GEO.mapa = {
124 124 if(r === false)
125 125 {return;}
126 126 i3GEO.tamanhodoc = [Dw,Dh];
127   - temp = setTimeout(function(){
  127 + setTimeout(function(){
128 128 i3GEO.reCalculaTamanho();
129 129 i3GEO.barraDeBotoes.recria("i3geo_barra2");
130 130 if(i3GEO.Interface.TABLET === true)
... ... @@ -153,8 +153,6 @@ i3GEO.mapa = {
153 153 if(arguments.length === 0){return;}
154 154 var imagemxi = 0,
155 155 imagemyi = 0,
156   - imagemxref = 0,
157   - imagemyref = 0,
158 156 dc = $i(elemento),
159 157 c;
160 158 if(!dc){return;}
... ... @@ -358,11 +356,10 @@ i3GEO.mapa = {
358 356 if(typeof(console) !== 'undefined'){console.info("i3GEO.mapa.legendaHTML.atualiza()");}
359 357 var idleg,
360 358 temp = function(retorno){
361   - var s,ins,elementos,i,temp,re;
  359 + var ins,elementos,i,temp,re;
362 360 re = new RegExp("<img src='' />", "g");
363 361 if(i3GEO.mapa.legendaHTML.ID !== "" && $i(i3GEO.mapa.legendaHTML.ID)){
364 362 if ((retorno.data !== "erro") && (retorno.data !== undefined)){
365   - s = i3GEO.configura.locaplic+"/imagens/branco.gif";
366 363 ins = "";
367 364 if(i3GEO.mapa.legendaHTML.incluiBotaoLibera === true)
368 365 {ins += '<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -45px; top: -22px;">Mostra a legenda em uma janela</p></div>';}
... ... @@ -738,7 +735,7 @@ i3GEO.mapa = {
738 735 if(i3GEO.Interface.ATUAL === "googleearth")
739 736 {i3GEO.Interface.googleearth.aguarde.visibility = "visible";}
740 737 retorna = function(retorno){
741   - var pos,temp,rfes,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,
  738 + var pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,
742 739 configura = i3GEO.configura,
743 740 tipotip = configura.tipotip;
744 741 i = $i("i3geo_rosa");
... ...
classesjs/classe_maparef.js
... ... @@ -258,8 +258,7 @@ i3GEO.maparef = {
258 258 if(arguments.length === 0)
259 259 {forca = false;}
260 260 if(typeof(console) !== 'undefined'){console.info("i3GEO.maparef.atualiza()");}
261   - var dinamico,tiporef,temp,re;
262   - dinamico = false;
  261 + var tiporef,temp,re;
263 262 temp = $i("refDinamico") ? tiporef = $i("refDinamico").value : tiporef = "fixo";
264 263 if ($i("mapaReferencia")){
265 264 temp = $i("maparefmaismenosZoom");
... ... @@ -308,8 +307,8 @@ i3GEO.maparef = {
308 307 */
309 308 processaImagem: function(retorno){
310 309 if(typeof(console) !== 'undefined'){console.info("i3GEO.maparef.processaImagem()");}
311   - var w,m,novoel,boxrefdd,box,temp,
312   - tiporef = "fixo";
  310 + var m,box,temp,
  311 + tiporef = "fixo";
313 312 //i3GEO.janela.fechaAguarde("ajaxreferencia1");
314 313 if ((retorno.data !== "erro") && (retorno.data !== undefined)){
315 314 eval(retorno.data);
... ... @@ -380,7 +379,7 @@ i3GEO.maparef = {
380 379 //atualiza o mapa principal quando o box é modificado manualmente
381 380 //
382 381 novoel.onmouseup = function(){
383   - var rect,telaminx,telaminxy,telamaxx,telaminy,m,x,ext;
  382 + var rect,telaminx,telamaxx,telaminy,m,x,ext;
384 383 rect = $i("boxref");
385 384 telaminx = parseInt(rect.style.left,10);
386 385 telamaxy = parseInt(rect.style.top,10);
... ...
classesjs/classe_navega.js
... ... @@ -395,7 +395,7 @@ i3GEO.navega = {
395 395 panFixo: function(locaplic,sid,direcao,w,h,escala){
396 396 if(typeof(console) !== 'undefined'){console.info("i3GEO.navega.panFixo()");}
397 397 //YAHOO.log("panfixo", "i3geo");
398   - var x,y,f;
  398 + var x = 0,y = 0,f;
399 399 if(locaplic !== "")
400 400 {i3GEO.configura.locaplic = locaplic;}
401 401 if(sid !== "")
... ... @@ -698,7 +698,7 @@ i3GEO.navega = {
698 698 if(typeof(console) !== 'undefined'){console.info("i3GEO.navega.zoomBox.criaBox()");}
699 699 if(i3GEO.navega.timerNavega !== null){return;}
700 700 if(!$i("i3geoboxZoom")){
701   - var novoel,temp;
  701 + var novoel;
702 702 novoel = document.createElement("div");
703 703 novoel.style.width = "0px";
704 704 novoel.style.height = "0px";
... ... @@ -777,7 +777,8 @@ i3GEO.navega = {
777 777 */
778 778 termina: function(){
779 779 if(typeof(console) !== 'undefined'){console.info("i3GEO.navega.zoomBox.termina()");}
780   - var valor,v,x1,y1,x2,y2,limpa,f;
  780 + var valor,v,x1,y1,x2,y2,f,
  781 + limpa = function(){};
781 782 if(g_tipoacao !== 'zoomli'){
782 783 i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");
783 784 i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");
... ... @@ -793,11 +794,13 @@ i3GEO.navega = {
793 794 x2 = valor[3];
794 795 y2 = valor[4];
795 796 limpa = function(){
796   - var bxs = $i("i3geoboxZoom").style;
797   - bxs.display="none";
798   - bxs.visibility="hidden";
799   - bxs.width = 0 + "px";
800   - bxs.height = 0 + "px";
  797 + var bxs = $i("i3geoboxZoom");
  798 + if(bxs){
  799 + bxs.style.display="none";
  800 + bxs.style.visibility="hidden";
  801 + bxs.style.width = 0 + "px";
  802 + bxs.style.height = 0 + "px";
  803 + }
801 804 };
802 805 if((x1 === x2) || (y1 === y2))
803 806 {limpa.call();return;}
... ... @@ -963,7 +966,8 @@ i3GEO.navega = {
963 966 movimenta: function(){
964 967 try{
965 968 if(i3GEO.navega.lente.ESTAATIVA === "sim"){
966   - var pos,esq,topo,clipt,i;
  969 + var pos = [0,0],
  970 + esq,topo,clipt,i;
967 971 if ($i("lente").style.visibility === "visible")
968 972 {pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));}
969 973 esq = (objposicaocursor.telax - pos[0]) * 2.25;
... ... @@ -1245,7 +1249,9 @@ i3GEO.navega = {
1245 1249 if($i("vertHandleDivZoom")){
1246 1250 $i("vertHandleDivZoom").onmousemove = function(){
1247 1251 try{
1248   - var iclone,corpo,nt,nl,velhoh,velhow,nh,nw,t,l,fatorEscala;
  1252 + var iclone,corpo,nt,nl,velhoh,velhow,
  1253 + nh = 0,nw = 0,
  1254 + t,l,fatorEscala;
1249 1255 iclone = $i("imgtemp");
1250 1256 corpo = $i("img");
1251 1257 if(!corpo)
... ...
classesjs/classe_php.js
... ... @@ -611,7 +611,7 @@ i3GEO.php = {
611 611 <MUDAEXT>
612 612 */
613 613 mudaext: function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){
614   - var retorno,p;
  614 + var retorno;
615 615 if(arguments.length === 3){
616 616 i3GEO.php.verifica();
617 617 locaplic = i3GEO.configura.locaplic;
... ...
classesjs/classe_selecao.js
... ... @@ -196,7 +196,9 @@ i3GEO.selecao = {
196 196 termina: function(){
197 197 if(g_tipoacao !== 'selecaobox')
198 198 {return;}
199   - var valor,v,x1,y1,x2,y2,limpa,doc,tipo;
  199 + var valor,v,x1,y1,x2,y2,
  200 + limpa = function(){},
  201 + doc,tipo;
200 202 try{
201 203 valor = i3GEO.calculo.rect2ext("i3geoboxSel",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);
202 204 v = valor[0];
... ...
classesjs/classe_tema.js
... ... @@ -57,9 +57,7 @@ i3GEO.tema = {
57 57 if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.exclui()");}
58 58 g_operacao = "excluitema";
59 59 //remove o tema do DOM e seus filhos
60   - var layer,
61   - indice,
62   - p;
  60 + var p;
63 61 try{
64 62 p = document.getElementById("idx"+tema).parentNode.parentNode.parentNode;
65 63 do
... ... @@ -195,7 +193,7 @@ i3GEO.tema = {
195 193 if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.mudatransp()");}
196 194 i3GEO.mapa.ativaTema(idtema);
197 195 g_operacao = "transparencia";
198   - var valor,
  196 + var valor = "",
199 197 temp = function(retorno){
200 198 i3GEO.atualiza(retorno);
201 199 i3GEO.Interface.atualizaTema(retorno,idtema);
... ... @@ -203,8 +201,6 @@ i3GEO.tema = {
203 201 //o campo input com o valor possui o prefixo 'tr' seguido pelo código do tema
204 202 if ($i("tr"+idtema))
205 203 {valor = $i("tr"+idtema).value;}
206   - else
207   - {alert("Ocorreu um erro");}
208 204 if (valor !== ""){
209 205 i3GEO.php.mudatransp(temp,idtema,valor);
210 206 }
... ... @@ -267,11 +263,9 @@ i3GEO.tema = {
267 263 if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.mudanome()");}
268 264 i3GEO.mapa.ativaTema(idtema);
269 265 g_operacao = "mudanome";
270   - var valor;
  266 + var valor = "";
271 267 if($i("nn"+idtema))
272 268 {valor = $i("nn"+idtema).value;}
273   - else
274   - {alert("Ocorreu um erro");}
275 269 if (valor !== ""){
276 270 i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor);
277 271 }
... ...
classesjs/classe_util.js
... ... @@ -252,7 +252,7 @@ i3GEO.util = {
252 252 */
253 253 listaChaves: function (obj) {
254 254 if(typeof(console) !== 'undefined'){console.info("i3GEO.util.listaChaves()");}
255   - var keys,key;
  255 + var keys,key = "";
256 256 keys = [];
257 257 for(key in obj){
258 258 if(obj[key])
... ... @@ -360,11 +360,11 @@ i3GEO.util = {
360 360 */
361 361 arvore: function(titulo,onde,obj){
362 362 if(typeof(console) !== 'undefined'){console.info("i3GEO.util.arvore()");}
363   - var arvore,root,tempNode,currentIconMode,d,c,i,linha,conteudo,j,temaNode;
  363 + var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;
364 364 if(!$i(onde)){return;}
  365 + arvore = new YAHOO.widget.TreeView(onde);
  366 + root = arvore.getRoot();
365 367 try{
366   - arvore = new YAHOO.widget.TreeView(onde);
367   - root = arvore.getRoot();
368 368 tempNode = new YAHOO.widget.TextNode('', root, false);
369 369 tempNode.isLeaf = false;
370 370 tempNode.enableHighlight = false;
... ... @@ -453,7 +453,7 @@ i3GEO.util = {
453 453 {
454 454 if(!obj.style)
455 455 {return [0,0];}
456   - var curleft = 0,curtop = 0,teste;
  456 + var curleft = 0,curtop = 0;
457 457 if(obj){
458 458 if (obj.offsetParent) {
459 459 do {
... ... @@ -484,18 +484,23 @@ i3GEO.util = {
484 484 */
485 485 pegaElementoPai: function(e){
486 486 if(typeof(console) !== 'undefined'){console.info("i3GEO.util.pegaElementoPai()");}
487   - var targ;
  487 + var targ = document;
488 488 if (!e)
489 489 {e = window.event;}
490 490 if (e.target)
491 491 {targ = e.target;}
492   - else
493   - if (e.srcElement)
494   - {targ = e.srcElement;}
  492 + else{
  493 + if (e.srcElement)
  494 + {targ = e.srcElement;}
  495 + }
495 496 if (targ.nodeType === 3)
496 497 {targ = targ.parentNode;}
497   - tparent=targ.parentNode;
498   - return(tparent);
  498 + if(targ.parentNode){
  499 + tparent=targ.parentNode;
  500 + return(tparent);
  501 + }
  502 + else
  503 + {return targ;}
499 504 },
500 505 /*
501 506 Function: mudaCursor
... ... @@ -521,9 +526,8 @@ i3GEO.util = {
521 526 var os = [],
522 527 o,
523 528 i,
524   - c,
  529 + c = "",
525 530 n,
526   - layers,
527 531 cursor="",
528 532 ext = ".ff";
529 533 //
... ... @@ -951,18 +955,11 @@ i3GEO.util = {
951 955 {tipo = "rgb";}
952 956 var janela,
953 957 ins,
954   - temp,
955 958 novoel,
956 959 wdocaiframe,
957   - fix = false,
958   - wlargura = "300",
959   - waltura = "280",
960 960 wsrc = i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,
961   - nx = "",
962   - ny = "",
963 961 texto = "Cor",
964 962 id = "i3geo_janelaCor",
965   - modal = true,
966 963 classe = "hd";
967 964 if($i(id)){
968 965 YAHOO.i3GEO.janela.manager.find(id).show();
... ... @@ -1037,7 +1034,7 @@ i3GEO.util = {
1037 1034 O resultado em um objeto DOM. Se o retorno contiver a palavra "Erro", é gerado um alert.
1038 1035 */
1039 1036 ajaxexecASXml: function(programa,funcao){
1040   - var h,ohttp,retorno;
  1037 + var h,ohttp;
1041 1038 if (programa.search("http") === 0){
1042 1039 h = window.location.host;
1043 1040 if (programa.search(h) < 0){
... ... @@ -1047,7 +1044,6 @@ i3GEO.util = {
1047 1044 }
1048 1045 ohttp = i3GEO.util.ajaxhttp();
1049 1046 ohttp.open("GET",programa,true);
1050   - retorno = "";
1051 1047 ohttp.onreadystatechange=function(){
1052 1048 var retorno,parser,dom;
1053 1049 if (ohttp.readyState === 4){
... ... @@ -1064,7 +1060,7 @@ i3GEO.util = {
1064 1060 }
1065 1061 }
1066 1062 else
1067   - {dom = "erro";}
  1063 + {return "erro";}
1068 1064 if (funcao !== "volta")
1069 1065 {eval(funcao+'(dom)');}
1070 1066 else
... ... @@ -1088,7 +1084,7 @@ i3GEO.util = {
1088 1084 */
1089 1085 aparece: function(id,tempo,intervalo){
1090 1086 if(typeof(console) !== 'undefined'){console.info("i3GEO.util.aparece("+id+")");}
1091   - var n,obj,opacidade,fadei,tempoFadei;
  1087 + var n,obj,opacidade,fadei = 0,tempoFadei = null;
1092 1088 n = parseInt(tempo / intervalo,10);
1093 1089 obj = $i(id);
1094 1090 if(n === 1){
... ... @@ -1115,7 +1111,8 @@ i3GEO.util = {
1115 1111 if(opacidade < 100)
1116 1112 {tempoFadei = setTimeout(fadei, tempo);}
1117 1113 else{
1118   - clearTimeout(tempoFadei);
  1114 + if(tempoFadei)
  1115 + {clearTimeout(tempoFadei);}
1119 1116 if (navm)
1120 1117 {obj.style.filter='alpha(opacity=100)';}
1121 1118 else
... ... @@ -1140,7 +1137,7 @@ i3GEO.util = {
1140 1137 removeobj {Boolean} - remove ou não o objeto no final
1141 1138 */
1142 1139 desaparece: function(id,tempo,intervalo,removeobj){
1143   - var n,obj,opacidade,fade,p,tempoFade;
  1140 + var n,obj,opacidade,fade = 0,p,tempoFade = null;
1144 1141 n = parseInt(tempo / intervalo,10);
1145 1142 obj = $i(id);
1146 1143 if(n === 1){
... ... @@ -1170,7 +1167,8 @@ i3GEO.util = {
1170 1167 tempoFade = setTimeout(fade, tempo);
1171 1168 }
1172 1169 else{
1173   - clearTimeout(tempoFade);
  1170 + if(tempoFade)
  1171 + {clearTimeout(tempoFade);}
1174 1172 obj.style.display = "none";
1175 1173 if (navm)
1176 1174 {obj.style.filter='alpha(opacity=100)';}
... ... @@ -1505,9 +1503,9 @@ i3GEO.util = {
1505 1503 {nome = "";}
1506 1504 if (arguments.length < 5)
1507 1505 {multiplo = false;}
1508   - var monta, lista, temp, temp1, temp2;
  1506 + var monta, temp, temp1, temp2;
1509 1507 monta = function(retorno){
1510   - var i,comboTemas,temp,n,nome;
  1508 + var i,comboTemas,n,nome = "";
1511 1509 if (retorno !== undefined)
1512 1510 {
1513 1511 if(retorno.data)
... ... @@ -1663,10 +1661,10 @@ i3GEO.util = {
1663 1661 {$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>";}
1664 1662 if (arguments.length === 3)
1665 1663 {nome = "";}
1666   - var monta, lista, temp, temp1, n, i;
  1664 + var monta, temp, temp1, n, i;
1667 1665 monta = function(retorno){
1668 1666 try{
1669   - var i,comboTemas,temp,n,nome;
  1667 + var i,comboTemas,n,nome;
1670 1668 if (retorno !== undefined)
1671 1669 {
1672 1670 if(retorno.data)
... ... @@ -1843,13 +1841,9 @@ i3GEO.util = {
1843 1841 }
1844 1842 else
1845 1843 {temp = {dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"};}
1846   - eval("funcao(temp)");
  1844 + funcao.apply(funcao,temp);
1847 1845 };
1848 1846 i3GEO.php.listaValoresItensTema(monta,tema,itemTema);
1849   - //cp = new cpaint();
1850   - //cp.set_debug(2)
1851   - //cp.set_response_type("JSON");
1852   - //cp.call( g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema,"listaRegistros",monta);
1853 1847 },
1854 1848 /*
1855 1849 Function: comboFontes
... ... @@ -1953,7 +1947,7 @@ i3GEO.util = {
1953 1947 }
1954 1948 else
1955 1949 {temp = {dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"};}
1956   - eval("funcao(temp)");
  1950 + funcao.apply(funcao,temp);
1957 1951 };
1958 1952 i3GEO.php.listaItensTema(monta,tema);
1959 1953 },
... ... @@ -1977,7 +1971,7 @@ i3GEO.util = {
1977 1971 radioEpsg: function (funcao,onde,prefixo){
1978 1972 if (arguments.length === 2)
1979 1973 {$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>";}
1980   - var cp,monta = function(retorno){
  1974 + var monta = function(retorno){
1981 1975 var ins = [],
1982 1976 i,n,temp;
1983 1977 if (retorno.data !== undefined){
... ... @@ -1997,7 +1991,7 @@ i3GEO.util = {
1997 1991 }
1998 1992 else
1999 1993 {temp = {dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"};}
2000   - eval("funcao(temp)");
  1994 + funcao.apply(funcao,temp);
2001 1995 };
2002 1996 i3GEO.php.listaEpsg(monta);
2003 1997 },
... ... @@ -2026,8 +2020,7 @@ i3GEO.util = {
2026 2020 ndiv = document.createElement("div"),
2027 2021 nids,
2028 2022 i,
2029   - fundo,
2030   - b;
  2023 + fundo;
2031 2024  
2032 2025 if(temp){$i(container).removeChild(temp);}
2033 2026 if (!document.getElementById(idatual))
... ... @@ -2043,13 +2036,13 @@ i3GEO.util = {
2043 2036  
2044 2037 $i(container).appendChild(ndiv);
2045 2038  
2046   - b = new YAHOO.widget.Button(idatual+"anterior_",{
  2039 + new YAHOO.widget.Button(idatual+"anterior_",{
2047 2040 onclick:{fn: function(){
2048 2041 eval(anterior+"()");
2049 2042 },
2050 2043 lazyloadmenu:true
2051 2044 }});
2052   - b = new YAHOO.widget.Button(idatual+"proxima_",
  2045 + new YAHOO.widget.Button(idatual+"proxima_",
2053 2046 {onclick:{fn: function(){
2054 2047 eval(proxima+"()");
2055 2048 },
... ... @@ -2125,8 +2118,7 @@ i3GEO.util = {
2125 2118 var box1i = box2,
2126 2119 box2i = box1,
2127 2120 coordx,
2128   - coordy,
2129   - i;
  2121 + coordy;
2130 2122 coordx = box1[0]*1;
2131 2123 coordy = box1[1]*1;
2132 2124 if(coordx >= box2[0]*1 && coordx <= box2[2]*1 && coordy >= box2[1]*1 && coordy <= box2[3]*1){
... ... @@ -2185,18 +2177,13 @@ i3GEO.util = {
2185 2177 if(typeof(console) !== 'undefined'){console.info("i3GEO.util.abreColourRamp()");}
2186 2178 var janela,
2187 2179 ins,
2188   - temp,
2189 2180 novoel,
2190 2181 wdocaiframe,
2191 2182 fix = false,
2192   - wlargura = "350",
2193   - waltura = "480",
2194 2183 wsrc = i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento, //+janela+"&elemento="+elemento+"&tipo="+tipo,
2195 2184 nx = "",
2196   - ny = "",
2197 2185 texto = "Cor",
2198 2186 id = "i3geo_janelaCorRamp",
2199   - modal = true,
2200 2187 classe = "hd";
2201 2188 if($i(id)){
2202 2189 janela = YAHOO.i3GEO.janela.manager.find(id);
... ... @@ -2477,7 +2464,6 @@ i3GEO.util = {
2477 2464 Retorna algumas versões de navegador
2478 2465 */
2479 2466 versaoNavegador: function(){
2480   - var v = "";
2481 2467 if(navm && navigator.userAgent.toLowerCase().indexOf('msie 8.') > -1)
2482 2468 {return "IE8";}
2483 2469 if(navn && navigator.userAgent.toLowerCase().indexOf('3.') > -1)
... ... @@ -2528,17 +2514,14 @@ try{
2528 2514 this.properties.ativa = ativa;
2529 2515 }
2530 2516 var accordionObject = document.getElementById(this.properties.Id),
2531   - headers,
2532   - bodies;
  2517 + headers;
2533 2518 if(accordionObject) {
2534 2519 if(accordionObject.nodeName === "DL") {
2535 2520 headers = accordionObject.getElementsByTagName("dt");
2536   - bodies = headers[0].parentNode.getElementsByTagName("dd");
  2521 + this.attachEvents(headers,0);
2537 2522 }
2538   - this.attachEvents(headers,0);
2539 2523 }
2540 2524 },
2541   -
2542 2525 attachEvents : function(headers,nr) {
2543 2526 var i,headerProperties,parentObj,header;
2544 2527 for(i=0; i<headers.length; i++) {
... ...
classesjs/datadownload.js
... ... @@ -49,27 +49,27 @@ No caso do datadownload.htm ser disparado de outro local, é necessário definir e
49 49 */
50 50 var loc = window.location.href;
51 51 g_locaplic = loc.split("/datadownload.htm");
52   -g_locaplic = g_locaplic[0]
  52 +g_locaplic = g_locaplic[0];
53 53  
54 54 var temp = loc.split("?");
55 55 if(temp[1])
56   -{temaDownload = temp[1]}
  56 +{temaDownload = temp[1];}
57 57 else
58   -{temaDownload = ""}
  58 +{temaDownload = "";}
59 59  
60 60 //
61 61 //para efeitos de compatibilidade
62 62 //
63   -try{i3GEO.configura.locaplic = g_locaplic}
  63 +try{i3GEO.configura.locaplic = g_locaplic;}
64 64 catch(e){}
65 65 //
66 66 //diretorio onde esta o i3geo
67 67 //
68   -g_i3geo = ""
  68 +g_i3geo = "";
69 69 //
70 70 //função que será utilizada quando o usuário clicar na árvore
71 71 //
72   -g_arvoreClicks = ""
  72 +g_arvoreClicks = "";
73 73 /*
74 74 Propriedade: g_tipo
75 75  
... ... @@ -102,7 +102,7 @@ dir - indica que os dados serão buscados em diretórios no servidor.
102 102 menutemas - indica que os dados serão buscados no arquivo menutemas/menutemas.xml ou
103 103 no sistema de administração do i3geo
104 104 */
105   -g_tipo = "menutemas"
  105 +g_tipo = "menutemas";
106 106 /*
107 107 Propriedade: g_dirbaseDown
108 108  
... ... @@ -113,7 +113,7 @@ Tipo:
113 113 {string}
114 114  
115 115 */
116   -g_dirbaseDown = ""
  116 +g_dirbaseDown = "";
117 117  
118 118 /*
119 119 Propriedade: g_dirbase
... ... @@ -124,7 +124,7 @@ Tipo:
124 124 {string}
125 125  
126 126 */
127   -g_dirbase = ""
  127 +g_dirbase = "";
128 128 /*
129 129 Propriedade: g_dirarquivos
130 130  
... ... @@ -134,7 +134,7 @@ Tipo:
134 134 {string}
135 135  
136 136 */
137   -g_dirarquivos = ""
  137 +g_dirarquivos = "";
138 138 /*
139 139 Function: DDinicia
140 140  
... ... @@ -151,11 +151,11 @@ function DDinicia()
151 151 }
152 152 if (g_tipo == "menutemas")
153 153 {
154   - i3GEO.arvoreDeTemas.INCLUISISTEMAS = false
155   - i3GEO.arvoreDeTemas.FILTRADOWNLOAD = true
156   - i3GEO.arvoreDeTemas.INCLUIWMS = false
157   - i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore = false
158   - i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca = false
  154 + i3GEO.arvoreDeTemas.INCLUISISTEMAS = false;
  155 + i3GEO.arvoreDeTemas.FILTRADOWNLOAD = true;
  156 + i3GEO.arvoreDeTemas.INCLUIWMS = false;
  157 + i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore = false;
  158 + i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca = false;
159 159 //i3GEO.arvoreDeTemas.TIPOBOTAO = "radio";
160 160 i3GEO.arvoreDeTemas.cria("",g_locaplic,"arvoreTemas","datadownload_download\(this.title\)");
161 161 }
... ... @@ -167,7 +167,7 @@ function DDinicia()
167 167 cp.set_response_type("JSON");
168 168 cp.call(p,"listaDiretorios",processaDiretorios);
169 169 }
170   - dataDownloadLinks(g_RSSl)
  170 + dataDownloadLinks(g_RSSl);
171 171 if(temaDownload != ""){
172 172 datadownload_download(temaDownload);
173 173 }
... ... @@ -226,9 +226,9 @@ function expandeDiretorio(id)
226 226 if (!document.getElementById(id+"/"+nomeDir))
227 227 treeDir.createItem(id+"/"+nomeDir, nomeDir, g_locaplic+"/imagens/folder-s.gif", true, true, true, id);
228 228 }
229   - listaArquivos(id)
  229 + listaArquivos(id);
230 230 }
231   - }
  231 + };
232 232 var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=listaDiretorios&map_file=&diretorio="+id;
233 233 var cp = new cpaint();
234 234 //cp.set_debug(2)
... ... @@ -253,27 +253,27 @@ function listaArquivos(dir)
253 253 alert("Nao foi encontrado o DIV corpo");
254 254 return;
255 255 }
256   - document.getElementById("corpo").innerHTML = ""
  256 + document.getElementById("corpo").innerHTML = "";
257 257 var re = new RegExp(g_dirbase, "g");
258   - var d = dir.replace(re,'')
259   - var ins = "<div style=text-align:left; >Diretório: "+d+"<br><br>"
  258 + var d = dir.replace(re,'');
  259 + var ins = "<div style=text-align:left; >Diretório: "+d+"<br><br>";
260 260 var volta = function (retorno)
261 261 {
262 262 if ((retorno.data != "erro") && (retorno.data != undefined))
263 263 {
264   - ins += "<b>Diretórios:</b><br><br>"
  264 + ins += "<b>Diretórios:</b><br><br>";
265 265 for (var ig=0;ig<retorno.data.diretorios.length; ig++)
266 266 {
267   - ins += "<span style=cursor:pointer onclick=listaArquivos('"+g_dirbase+d+"/"+retorno.data.diretorios[ig]+"') ><img src="+g_locaplic+"/imagens/folder-s.gif />"+retorno.data.diretorios[ig]+"</span><br><br>"
  267 + ins += "<span style=cursor:pointer onclick=listaArquivos('"+g_dirbase+d+"/"+retorno.data.diretorios[ig]+"') ><img src="+g_locaplic+"/imagens/folder-s.gif />"+retorno.data.diretorios[ig]+"</span><br><br>";
268 268 }
269   - ins += "<b>Arquivos:</b><br><br>"
  269 + ins += "<b>Arquivos:</b><br><br>";
270 270 for (var ig=0;ig<retorno.data.arquivos.length; ig++)
271 271 {
272   - ins += "<a href='"+g_dirbaseDown+d+"/"+retorno.data.arquivos[ig]+"' target=new >"+retorno.data.arquivos[ig]+"</a><br><br>"
  272 + ins += "<a href='"+g_dirbaseDown+d+"/"+retorno.data.arquivos[ig]+"' target=new >"+retorno.data.arquivos[ig]+"</a><br><br>";
273 273 }
274   - document.getElementById("corpo").innerHTML = ins
  274 + document.getElementById("corpo").innerHTML = ins;
275 275 }
276   - }
  276 + };
277 277 var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=listaArquivos&map_file=&diretorio="+dir;
278 278 var cp = new cpaint();
279 279 //cp.set_debug(2)
... ... @@ -317,22 +317,23 @@ Mostra na tela os arquivos convertidos para shape file com link para download.
317 317 */
318 318 function mostraDownload(retorno)
319 319 {
  320 + var ins = "";
320 321 if (retorno.data != undefined)
321 322 {
322   - var retorno = retorno.data
323   - var arqs = retorno.arquivos.split(",")
  323 + retorno = retorno.data;
  324 + var arqs = retorno.arquivos.split(",");
324 325 var n = arqs.length;
325 326 if(retorno == "erro")
326   - {var ins = "<p style=color:red >Ocorreu um erro. O tema não foi encontrado. Pode ser que o código do tema não existe na definição do mapfile. Informe o administrador do sistema.<br>";}
  327 + {ins = "<p style=color:red >Ocorreu um erro. O tema não foi encontrado. Pode ser que o código do tema não existe na definição do mapfile. Informe o administrador do sistema.<br>";}
327 328 else
328 329 {
329   - var ins = "<b>Clique nos links para pegar os arquivos.</b><br><br>"
  330 + ins = "<b>Clique nos links para pegar os arquivos.</b><br><br>";
330 331 ins += "<a href='"+window.location.protocol+"//"+window.location.host+"/"+retorno.mapfileurl+"' target=blank >Arquivo de configuração Mapfile</a><br>";
331 332 ins += "<a href='"+g_locaplic+"/classesphp/mapa_controle.php?funcao=TEMA2SLD&tema="+retorno.tema+"&map_file="+retorno.mapfile+"' target=blank >Arquivo de legenda SLD</a><br><br>";
332 333  
333 334 for (var arq=0;arq<n;arq++)
334 335 {
335   - ins += "<a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[arq]+"'>"+arqs[arq]+"</a><br>"
  336 + ins += "<a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[arq]+"'>"+arqs[arq]+"</a><br>";
336 337 }
337 338 ins += "<br><a href='"+g_locaplic+"/fontetema.php?tema="+temaEscolhidoDownload+"' target=blank >Fonte</a>";
338 339 if(retorno.nreg)
... ... @@ -341,7 +342,7 @@ function mostraDownload(retorno)
341 342 }
342 343 else
343 344 {
344   - var ins = "<p style=color:red >Ocorreu um erro<br>"
  345 + ins = "<p style=color:red >Ocorreu um erro<br>";
345 346 }
346 347 YAHOO.datadownloadLista.panel.setBody(ins);
347 348 YAHOO.datadownloadLista.panel.show();
... ... @@ -369,23 +370,23 @@ function dataDownloadLinks(rss)
369 370 alert("OOps! Ocorreu um erro\n"+retorno.data);
370 371 return;
371 372 }
372   - var linhas = retorno.data.split("|")
373   - var ins = ""
  373 + var linhas = retorno.data.split("|");
  374 + var ins = "";
374 375 var n = linhas.length;
375 376 if(n == 1){return;}
376 377 for (var i=0;i<n; i++)
377 378 {
378   - var caso = linhas[i].split("#")
  379 + var caso = linhas[i].split("#");
379 380 if (i > 0)
380 381 {
381   - ins += "<a style=text-align:left href='"+caso[2]+"' target=blank >"+caso[0]+"&nbsp;("+caso[1]+")</a>"
382   - ins += "<br>"
  382 + ins += "<a style=text-align:left href='"+caso[2]+"' target=blank >"+caso[0]+"&nbsp;("+caso[1]+")</a>";
  383 + ins += "<br>";
383 384 }
384 385 else
385   - {ins += "<p class=clique ><b>"+caso[0]+"</b>&nbsp;"+caso[1]+"&nbsp;</p>"}
  386 + {ins += "<p class=clique ><b>"+caso[0]+"</b>&nbsp;"+caso[1]+"&nbsp;</p>";}
386 387 }
387   - document.getElementById("RSSl").innerHTML = ins
388   - }
  388 + document.getElementById("RSSl").innerHTML = ins;
  389 + };
389 390 if (document.getElementById("RSSl"))
390 391 {
391 392 if (rss.length > 0)
... ...
classesjs/geradordelinks.js
... ... @@ -64,9 +64,9 @@ for (var i = 0; i &lt; scripts.length; i++) {
64 64 }
65 65 }
66 66 var allScriptTags = "";
67   -var jsfiles = []
  67 +var jsfiles = [];
68 68 //jsfiles[0] = "i3geo_tudo_compacto.js.php"
69   -jsfiles[0] = "../pacotes/openlayers/OpenLayers211.js.php"
  69 +jsfiles[0] = "../pacotes/openlayers/OpenLayers211.js.php";
70 70 for (var i = 0; i < jsfiles.length; i++)
71 71 {
72 72 var currentScriptTag = "<script src='" + scriptLocation + jsfiles[i] + "'></script>";
... ... @@ -154,47 +154,47 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
154 154 this.seltema = function(idtema)
155 155 {
156 156 var novodiv = document.createElement("div");
157   - novodiv.style.textAlign="left"
158   - novodiv.id = idtema
  157 + novodiv.style.textAlign="left";
  158 + novodiv.id = idtema;
159 159 $i($i3geo_gl.temasa).appendChild(novodiv);
160 160 var novoel = document.createElement("img");
161   - novoel.title = "excluir"
  161 + novoel.title = "excluir";
162 162 //novoel.onclick = excluir
163   - eval("novoel.onclick = $i3geo_gl.excluir")
164   - novoel.src = "imagens/x.png"
  163 + eval("novoel.onclick = $i3geo_gl.excluir");
  164 + novoel.src = "imagens/x.png";
165 165 novodiv.appendChild(novoel);
166 166 var novoel = document.createElement("img");
167   - novoel.title = "subir"
168   - novoel.src = "imagens/sobe.gif"
  167 + novoel.title = "subir";
  168 + novoel.src = "imagens/sobe.gif";
169 169 //novoel.onclick = subir
170   - eval("novoel.onclick = $i3geo_gl.subir")
  170 + eval("novoel.onclick = $i3geo_gl.subir");
171 171 novodiv.appendChild(novoel);
172 172 var novoel = document.createElement("img");
173   - novoel.title = "descer"
174   - novoel.src = "imagens/desce.gif"
  173 + novoel.title = "descer";
  174 + novoel.src = "imagens/desce.gif";
175 175 //novoel.onclick = descer
176   - eval("novoel.onclick = $i3geo_gl.descer")
  176 + eval("novoel.onclick = $i3geo_gl.descer;");
177 177 novodiv.appendChild(novoel);
178 178 var novoel = document.createElement("input");
179   - eval("novoel.onclick = function(){$i3geo_gl.crialink()}")
180   - novoel.title = "visível/não visível"
181   - novoel.type = "checkbox"
182   - novoel.style.cursor="pointer"
183   - novoel.style.top="3px"
184   - novoel.style.position="relative"
185   - novoel.style.border="0px"
186   - novoel.value=idtema
  179 + eval("novoel.onclick = function(){$i3geo_gl.crialink()}");
  180 + novoel.title = "visível/não visível";
  181 + novoel.type = "checkbox";
  182 + novoel.style.cursor="pointer";
  183 + novoel.style.top="3px";
  184 + novoel.style.position="relative";
  185 + novoel.style.border="0px";
  186 + novoel.value=idtema;
187 187 novodiv.appendChild(novoel);
188 188 var novoel = document.createElement("span");
189 189 novoel.style.cursor="pointer";
190 190 novoel.title="preview";
191 191 novoel.style.textDecoration = "underline";
192   - novoel.innerHTML = idtema
193   - eval("novoel.onclick = $i3geo_gl.preview")
  192 + novoel.innerHTML = idtema;
  193 + eval("novoel.onclick = $i3geo_gl.preview");
194 194 novodiv.appendChild(novoel);
195 195 novodiv.appendChild(document.createElement("br"));
196   - this.crialink()
197   - }
  196 + this.crialink();
  197 + };
198 198 /*
199 199 Function: crialink
200 200  
... ... @@ -206,7 +206,7 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
206 206 var iguias = $i($i3geo_gl.temasa).getElementsByTagName("input");
207 207 var tsl = []; //temas ligados
208 208 var tsd = []; //temas
209   - for (i=0;i<iguias.length; i++)
  209 + for (var i=0;i<iguias.length; i++)
210 210 {
211 211 if (iguias[i].type == "checkbox")
212 212 {
... ... @@ -216,35 +216,35 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
216 216 }
217 217 }
218 218 if(tsd.length > 0)
219   - {ins += "&temasa="+tsd.join(" ")}
  219 + {ins += "&temasa="+tsd.join(" ");}
220 220 if(tsl.length > 0)
221   - {ins += "&layers="+tsl.join(" ")}
  221 + {ins += "&layers="+tsl.join(" ");}
222 222 if($i("pontos").value != "")
223 223 {
224   - ins += "&pontos="+$i("pontos").value
225   - ins += "&nometemapontos="+$i("nometemapontos").value
  224 + ins += "&pontos="+$i("pontos").value;
  225 + ins += "&nometemapontos="+$i("nometemapontos").value;
226 226 }
227 227 if($i("perfili") && $i("perfili").value != "")
228 228 {
229   - ins += "&perfil="+$i("perfili").value
  229 + ins += "&perfil="+$i("perfili").value;
230 230 }
231 231 if($i("interface").value != "")
232 232 {
233   - ins += "&interface="+$i("interface").value
  233 + ins += "&interface="+$i("interface").value;
234 234 }
235 235 if($i($i3geo_gl.buscageo))
236 236 {
237 237 if($i("i3geo_gl_xmin").value != "")
238 238 {
239   - ins += "&mapext="+$i("i3geo_gl_xmin").value+" "
240   - ins += $i("i3geo_gl_ymin").value+" "
241   - ins += $i("i3geo_gl_xmax").value+" "
242   - ins += $i("i3geo_gl_ymax").value
  239 + ins += "&mapext="+$i("i3geo_gl_xmin").value+" ";
  240 + ins += $i("i3geo_gl_ymin").value+" ";
  241 + ins += $i("i3geo_gl_xmax").value+" ";
  242 + ins += $i("i3geo_gl_ymax").value;
243 243 }
244 244 }
245   - $i($i3geo_gl.link).href = ins
246   - $i($i3geo_gl.link).innerHTML = ins
247   - }
  245 + $i($i3geo_gl.link).href = ins;
  246 + $i($i3geo_gl.link).innerHTML = ins;
  247 + };
248 248 /*
249 249 Function: combogrupos
250 250  
... ... @@ -257,8 +257,8 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
257 257 this.combogrupos = function(idMenu)
258 258 {
259 259 $i($i3geo_gl.grupo).innerHTML = "<span style=color:red >Aguarde...</span>";
260   - i3GEO.arvoreDeTemas.comboGruposMenu($i3geo_gl.loc_i3geo,"$i3geo_gl.combosubgrupos",$i3geo_gl.grupo,"","530","1",idMenu)
261   - }
  260 + i3GEO.arvoreDeTemas.comboGruposMenu($i3geo_gl.loc_i3geo,"$i3geo_gl.combosubgrupos",$i3geo_gl.grupo,"","530","1",idMenu);
  261 + };
262 262 /*
263 263 Function: combosubgrupos
264 264  
... ... @@ -275,8 +275,8 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
275 275 //if(dados != undefined)
276 276 //{$i3geo_gl.combotemas(idGrupo,$i3geo_gl.subgrupo,dados.temasgrupo);}
277 277 $i($i3geo_gl.subgrupo).innerHTML = "<span style=color:red >Aguarde...</span>";
278   - i3GEO.arvoreDeTemas.comboSubGruposMenu($i3geo_gl.loc_i3geo,"$i3geo_gl.combotemas",$i3geo_gl.subgrupo,"",idGrupo,"530","1")
279   - }
  278 + i3GEO.arvoreDeTemas.comboSubGruposMenu($i3geo_gl.loc_i3geo,"$i3geo_gl.combotemas",$i3geo_gl.subgrupo,"",idGrupo,"530","1");
  279 + };
280 280 /*
281 281 Function: combotemas
282 282  
... ... @@ -295,8 +295,8 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
295 295 if(temas == undefined)
296 296 {temas = "";}
297 297 $i($i3geo_gl.tema).innerHTML = "<span style=color:red >Aguarde...</span>";
298   - i3GEO.arvoreDeTemas.comboTemasMenu($i3geo_gl.loc_i3geo,"$i3geo_gl.preseltema",$i3geo_gl.tema,"",idGrupo,idSubGrupo,"530","5","",temas)
299   - }
  298 + i3GEO.arvoreDeTemas.comboTemasMenu($i3geo_gl.loc_i3geo,"$i3geo_gl.preseltema",$i3geo_gl.tema,"",idGrupo,idSubGrupo,"530","5","",temas);
  299 + };
300 300 /*
301 301 Function: preseltema
302 302  
... ... @@ -304,8 +304,8 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
304 304 */
305 305 this.preseltema = function(idgrupo,idsubgrupo,idtema)
306 306 {
307   - $i3geo_gl.seltema(idtema)
308   - }
  307 + $i3geo_gl.seltema(idtema);
  308 + };
309 309 /*
310 310 Function: preview
311 311  
... ... @@ -317,9 +317,9 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
317 317 */
318 318 this.preview = function(e)
319 319 {
320   - var id = i3GEO.util.pegaElementoPai(e).id
321   - window.open("testamapfile.php?map="+id+".map&tipo=grande")
322   - }
  320 + var id = i3GEO.util.pegaElementoPai(e).id;
  321 + window.open("testamapfile.php?map="+id+".map&tipo=grande");
  322 + };
323 323 /*
324 324 Function: descer
325 325  
... ... @@ -331,12 +331,12 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
331 331 */
332 332 this.descer = function(e)
333 333 {
334   - var pai = i3GEO.util.pegaElementoPai(e)
335   - divpai = pai.parentNode
  334 + var pai = i3GEO.util.pegaElementoPai(e);
  335 + divpai = pai.parentNode;
336 336 if(pai.nextSibling)
337   - divpai.insertBefore(pai,pai.nextSibling.nextSibling)
  337 + divpai.insertBefore(pai,pai.nextSibling.nextSibling);
338 338 $i3geo_gl.crialink();
339   - }
  339 + };
340 340 /*
341 341 Function: subir
342 342  
... ... @@ -348,11 +348,11 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
348 348 */
349 349 this.subir = function(e)
350 350 {
351   - var pai = i3GEO.util.pegaElementoPai(e)
352   - divpai = pai.parentNode
353   - divpai.insertBefore(pai,pai.previousSibling)
354   - $i3geo_gl.crialink()
355   - }
  351 + var pai = i3GEO.util.pegaElementoPai(e);
  352 + divpai = pai.parentNode;
  353 + divpai.insertBefore(pai,pai.previousSibling);
  354 + $i3geo_gl.crialink();
  355 + };
356 356 /*
357 357 Function: excluir
358 358  
... ... @@ -364,10 +364,10 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
364 364 */
365 365 this.excluir = function(e)
366 366 {
367   - var pai = i3GEO.util.pegaElementoPai(e)
368   - pai.parentNode.removeChild(pai)
369   - $i3geo_gl.crialink()
370   - }
  367 + var pai = i3GEO.util.pegaElementoPai(e);
  368 + pai.parentNode.removeChild(pai);
  369 + $i3geo_gl.crialink();
  370 + };
371 371 /*
372 372 Function: buscageo_init
373 373  
... ... @@ -375,31 +375,31 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
375 375 */
376 376 this.buscageo_init = function()
377 377 {
378   - var ins = "<div style=margin:10px;text-align:left; >"
379   - ins += "<p class=paragrafo ><b>Utilize o mapa abaixo para definir as coordenadas geográficas do seu mapa, ou digite os valores desejados (opcional):</b></p>"
380   - ins += "<div id=i3geo_gl_mapa1 style='width:250px;height:250px;border:1px solid blue;display:none'></div>"
381   - ins += "<div style=position:absolute;top:40px;left:270px;text-align:left; >"
382   - ins += "Coordenadas geográficas:<br><br>"
  378 + var ins = "<div style=margin:10px;text-align:left; >";
  379 + ins += "<p class=paragrafo ><b>Utilize o mapa abaixo para definir as coordenadas geográficas do seu mapa, ou digite os valores desejados (opcional):</b></p>";
  380 + ins += "<div id=i3geo_gl_mapa1 style='width:250px;height:250px;border:1px solid blue;display:none'></div>";
  381 + ins += "<div style=position:absolute;top:40px;left:270px;text-align:left; >";
  382 + ins += "Coordenadas geográficas:<br><br>";
383 383 ins += "<table style=text-align:left >";
384   - ins += "<tr><td style=text-align:left >Longitude mínima:</td>"
385   - ins += "<td><div style=padding:5px;width:80px; id=paiXmin >"
386   - ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_xmin />"
387   - ins += "</div></td></tr>"
388   - ins += "<tr><td style=text-align:left >Longitude máxima:</td>"
389   - ins += "<td><div style=padding:5px;width:80px; id=paiXmax >"
390   - ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_xmax />"
391   - ins += "</div></td></tr>"
392   - ins += "<tr><td style=text-align:left >Latitude mínima:</td>"
393   - ins += "<td><div style=padding:5px;width:80px; id=paiYmin >"
394   - ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_ymin />"
395   - ins += "</div></td></tr>"
396   - ins += "<tr><td style=text-align:left >Latitude máxima:</td>"
397   - ins += "<td><div style=padding:5px;width:80px; id=paiYmax >"
398   - ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_ymax />"
399   - ins += "</div></td></tr></table>"
400   - ins += "<input style='position:relative;top:10px;left:-10px' class=aplicar size='20' type='button' value='capturar' onclick='$i3geo_gl.OL.capturageo()' />"
401   - ins += "</div></div>"
402   - document.getElementById(this.buscageo).innerHTML = ins
  384 + ins += "<tr><td style=text-align:left >Longitude mínima:</td>";
  385 + ins += "<td><div style=padding:5px;width:80px; id=paiXmin >";
  386 + ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_xmin />";
  387 + ins += "</div></td></tr>";
  388 + ins += "<tr><td style=text-align:left >Longitude máxima:</td>";
  389 + ins += "<td><div style=padding:5px;width:80px; id=paiXmax >";
  390 + ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_xmax />";
  391 + ins += "</div></td></tr>";
  392 + ins += "<tr><td style=text-align:left >Latitude mínima:</td>";
  393 + ins += "<td><div style=padding:5px;width:80px; id=paiYmin >";
  394 + ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_ymin />";
  395 + ins += "</div></td></tr>";
  396 + ins += "<tr><td style=text-align:left >Latitude máxima:</td>";
  397 + ins += "<td><div style=padding:5px;width:80px; id=paiYmax >";
  398 + ins += "<input onchange='$i3geo_gl.crialink()' type=text size=10 value='' id=i3geo_gl_ymax />";
  399 + ins += "</div></td></tr></table>";
  400 + ins += "<input style='position:relative;top:10px;left:-10px' class=aplicar size='20' type='button' value='capturar' onclick='$i3geo_gl.OL.capturageo()' />";
  401 + ins += "</div></div>";
  402 + document.getElementById(this.buscageo).innerHTML = ins;
403 403 $i("i3geo_gl_mapa1").style.display = "block";
404 404 $i3geo_gl.OL = new OpenLayers.Map('i3geo_gl_mapa1',{controls:[],numZoomLevels: 13});
405 405 //
... ... @@ -417,7 +417,7 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
417 417 //
418 418 //zoom e controle de layers
419 419 //
420   - var ls = new OpenLayers.Control.LayerSwitcher()
  420 + var ls = new OpenLayers.Control.LayerSwitcher();
421 421 $i3geo_gl.OL.addControl(ls);
422 422 $i(ls.id).style.zIndex=2000;
423 423 $i3geo_gl.OL.setCenter(new OpenLayers.LonLat(-55,-14), 2);
... ... @@ -433,24 +433,24 @@ function i3geo_gl_configura(loc_i3geo,nomeseltema,temasa,link,grupo,subgrupo,tem
433 433 $i("OpenLayers_Control_PanZoom_panleft").style.display="none"
434 434 $i("OpenLayers_Control_PanZoom_panright").style.display="none"
435 435 */
436   - $i("OpenLayers.Control.NavToolbar_36").style.display="none"
437   - zb.div.style.left="0px"
  436 + $i("OpenLayers.Control.NavToolbar_36").style.display="none";
  437 + zb.div.style.left="0px";
438 438 $i3geo_gl.OL.capturageo = function()
439 439 {
440 440 var b = $i3geo_gl.OL.getExtent();
441   - $i("i3geo_gl_xmin").value = b.left
442   - $i("i3geo_gl_xmax").value = b.right
443   - $i("i3geo_gl_ymin").value = b.bottom
444   - $i("i3geo_gl_ymax").value = b.top
445   - $i3geo_gl.crialink()
446   - }
  441 + $i("i3geo_gl_xmin").value = b.left;
  442 + $i("i3geo_gl_xmax").value = b.right;
  443 + $i("i3geo_gl_ymin").value = b.bottom;
  444 + $i("i3geo_gl_ymax").value = b.top;
  445 + $i3geo_gl.crialink();
  446 + };
447 447 /*
448 448 $inputText("paiXmin","","i3geo_gl_xmin","","","")
449 449 $inputText("paiXmax","","i3geo_gl_xmax","","","")
450 450 $inputText("paiYmin","","i3geo_gl_ymin","","","")
451 451 $inputText("paiYmax","","i3geo_gl_ymax","","","")
452 452 */
453   - }
  453 + };
454 454 }
455 455  
456 456 /*
... ... @@ -472,9 +472,9 @@ function i3geo_gl_inicia(objeto_i3geo_gl_configura)
472 472 i3GEO.configura.sid = "";
473 473 $i3geo_gl = objeto_i3geo_gl_configura;
474 474 if(document.getElementById($i3geo_gl.buscageo))
475   - $i3geo_gl.buscageo_init()
476   - $i3geo_gl.seltema($i3geo_gl.nomeseltema)
477   - i3GEO.arvoreDeTemas.comboMenus($i3geo_gl.loc_i3geo,"$i3geo_gl.combogrupos",$i3geo_gl.menu,"","530","1","")
  475 + $i3geo_gl.buscageo_init();
  476 + $i3geo_gl.seltema($i3geo_gl.nomeseltema);
  477 + i3GEO.arvoreDeTemas.comboMenus($i3geo_gl.loc_i3geo,"$i3geo_gl.combogrupos",$i3geo_gl.menu,"","530","1","");
478 478 /*
479 479 $inputText("paiPontos","","pontos","","","")
480 480 $inputText("paiNometemapontos","","nometemapontos","","","")
... ...
classesjs/i3geo.js
... ... @@ -69,4 +69,4 @@ var $i = function(id)
69 69 document.write("<link rel='stylesheet' type='text/css' href='" + scriptLocation + "../css/i3geo47.css.php'></link>");
70 70 document.write("<link rel='stylesheet' type='text/css' href='" + scriptLocation + "../pacotes/yui290/build/button/assets/skins/sam/button.css'></link>");
71 71 document.write("<script src='" + scriptLocation + "i3geo_tudo_compacto47.js.php'></script>");
72   -})()
73 72 \ No newline at end of file
  73 +})();
74 74 \ No newline at end of file
... ...
classesjs/wscliente.js
... ... @@ -51,13 +51,13 @@ for (var i = 0; i &lt; scripts.length; i++) {
51 51 }
52 52 }
53 53 var allScriptTags = "";
54   -var jsfiles = []
  54 +var jsfiles = [];
55 55 if(typeof(testafuncoes) == 'undefined')
56   -{jsfiles[0] = "compactados/classe_calculo_compacto.js"}
  56 +{jsfiles[0] = "compactados/classe_calculo_compacto.js";}
57 57 if(typeof(cpaint) == 'undefined')
58   -{jsfiles[1] = "../pacotes/cpaint/cpaint2.inc.compressed.js"}
  58 +{jsfiles[1] = "../pacotes/cpaint/cpaint2.inc.compressed.js";}
59 59 if(typeof(OpenLayers) == 'undefined')
60   -{jsfiles[2] = "../pacotes/openlayers/OpenLayers.js"}
  60 +{jsfiles[2] = "../pacotes/openlayers/OpenLayers.js";};
61 61 for (var i = 0; i < jsfiles.length; i++)
62 62 {
63 63 var currentScriptTag = "<script src='" + scriptLocation + jsfiles[i] + "'></script>";
... ... @@ -125,19 +125,19 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
125 125 /*
126 126 Tipo de serviço wms ativo
127 127 */
128   - this.tipo = ""
  128 + this.tipo = "";
129 129 /*
130 130 Código do tema wms escolhido
131 131 */
132   - this.tema = ""
  132 + this.tema = "";
133 133 /*
134 134 Nome do tema wms escolhido
135 135 */
136   - this.nometema = ""
  136 + this.nometema = "";
137 137 /*
138 138 Função do ws escolhida.
139 139 */
140   - this.funcao = ""
  140 + this.funcao = "";
141 141 /*
142 142 Function: inicia
143 143  
... ... @@ -145,15 +145,15 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
145 145 */
146 146 this.inicia = function()
147 147 {
148   - var ins = ""
149   - var i = "&nbsp;&nbsp;<img style=position:relative;top:3px; src='"+this.loc_i3geo+"/imagens/new.gif' >"
150   - var ii = "onmouseover='javascript:this.style.textDecoration=\"underline\"' onmouseout='javascript:this.style.textDecoration=\"none\"'"
  148 + var ins = "";
  149 + var i = "&nbsp;&nbsp;<img style=position:relative;top:3px; src='"+this.loc_i3geo+"/imagens/new.gif' >";
  150 + var ii = "onmouseover='javascript:this.style.textDecoration=\"underline\"' onmouseout='javascript:this.style.textDecoration=\"none\"'";
151 151 ins += "<b>&nbsp;Ajuda</b><br>";
152 152 ins += i+"<span "+ii+" class=clique onclick='$i3geo_wscliente.ativa(\"oquews\")'>Web Services</span><br>";
153 153 ins += i+"<span "+ii+" class=clique onclick='$i3geo_wscliente.ativa(\"oqueogc\")'>Padrões OGC</span><br>";
154 154 ins += i+"<span "+ii+" class=clique onclick='$i3geo_wscliente.ativa(\"oquecarto\")'>WS cartográfico</span><br><br>";
155   - ins += "</table>"
156   - ins += "<b>&nbsp;Mapas</b><br>"
  155 + ins += "</table>";
  156 + ins += "<b>&nbsp;Mapas</b><br>";
157 157 ins += i+"<span "+ii+" class=clique onclick='$i3geo_wscliente.servicoswms()'>Escolher serviço</span><br>";
158 158 ins += i+"<span "+ii+" class=clique onclick='$i3geo_wscliente.listatemas()'>Escolher um tema</span><br>";
159 159 ins += i+"<span "+ii+" class=clique onclick='$i3geo_wscliente.getcapabilities(\"WMS\")'>Resposta XML (WMS)</span><br>";
... ... @@ -185,12 +185,12 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
185 185 {
186 186 if (valores[0] == "wms")
187 187 {
188   - $i(this.enderecowms).value = valores[1]
189   - this.listatemas()
  188 + $i(this.enderecowms).value = valores[1];
  189 + this.listatemas();
190 190 }
191 191 }
192 192 }
193   - }
  193 + };
194 194 /*
195 195 Function: ativa
196 196  
... ... @@ -206,9 +206,9 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
206 206 */
207 207 this.ativa = function (id)
208 208 {
209   - var novo = document.getElementById(id)
210   - $i(this.corpo).innerHTML = novo.innerHTML
211   - }
  209 + var novo = document.getElementById(id);
  210 + $i(this.corpo).innerHTML = novo.innerHTML;
  211 + };
212 212 /*
213 213 Function: listaLinkServicos
214 214  
... ... @@ -221,16 +221,17 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
221 221 */
222 222 this.listaLinkServicos = function(tipo)
223 223 {
  224 + var lista = "",i,ins= "";
224 225 if (tipo == ("ws"))
225   - {var lista = this.rssws}
  226 + {lista = this.rssws;}
226 227 else
227   - {var lista = this.rsswms}
  228 + {lista = this.rsswms;}
228 229 for (i=0;i<lista.length; i++)
229 230 {
230   - var ins = "<p class=clique onclick=\"window.open('"+lista[i]+"')\" ><img src="+this.loc_i3geo+"/imagens/xml.gif >&nbsp;"+lista[i]+"</p>"
  231 + ins = "<p class=clique onclick=\"window.open('"+lista[i]+"')\" ><img src="+this.loc_i3geo+"/imagens/xml.gif >&nbsp;"+lista[i]+"</p>";
231 232 }
232   - $i(this.corpo).innerHTML = ins
233   - }
  233 + $i(this.corpo).innerHTML = ins;
  234 + };
234 235 /*
235 236 Function: servicosws
236 237  
... ... @@ -243,28 +244,29 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
243 244 //monta a lista retornada pela função ajax
244 245 var monta = function(retorno)
245 246 {
246   - var linhas = retorno.data.split("|")
247   - var ins = ""
  247 + var linhas = retorno.data.split("|"),
  248 + ins = "",
  249 + i;
248 250 if(linhas.length == 1)
249   - {var ins = "<br><span style=color:red >"+retorno.data+"</span>"}
  251 + {ins = "<br><span style=color:red >"+retorno.data+"</span>";}
250 252 else
251 253 {
252 254 for (i=0;i<linhas.length; i++)
253 255 {
254   - var caso = linhas[i].split("#")
255   - var clique = "javascript:document.getElementById(\""+$i3geo_wscliente.enderecows+"\").value='"+caso[2]+"';document.getElementById('"+$i3geo_wscliente.enderecows+"').value='"+caso[2]+"'"
256   - ins += "<p class=clique onclick="+clique+" ><b>"+caso[0]+"</b><span style=color:gray ><br>&nbsp;"+caso[1]+"<br>&nbsp;("+caso[3]+")</span>"
  256 + var caso = linhas[i].split("#");
  257 + var clique = "javascript:document.getElementById(\""+$i3geo_wscliente.enderecows+"\").value='"+caso[2]+"';document.getElementById('"+$i3geo_wscliente.enderecows+"').value='"+caso[2]+"'";
  258 + ins += "<p class=clique onclick="+clique+" ><b>"+caso[0]+"</b><span style=color:gray ><br>&nbsp;"+caso[1]+"<br>&nbsp;("+caso[3]+")</span>";
257 259 if (caso[4])
258 260 {ins += " <span style=color:gray >(disponibilidade: "+parseInt(caso[4])+"%, dias considerados: "+caso[5]+")</span></p>";}
259   - else {ins += "</p>"}
  261 + else {ins += "</p>";}
260 262 }
261 263 }
262   - $i("resultadoRSSws").innerHTML = ins
263   - $i($i3geo_wscliente.corpo).style.display="none"
264   - $i("RSSwms").style.display="none"
265   - $i("RSSws").style.display="block"
  264 + $i("resultadoRSSws").innerHTML = ins;
  265 + $i($i3geo_wscliente.corpo).style.display="none";
  266 + $i("RSSwms").style.display="none";
  267 + $i("RSSws").style.display="block";
266 268 aguardeTotal("none");
267   - }
  269 + };
268 270 if (this.rssws.length > 0)
269 271 {
270 272 aguardeTotal("block");
... ... @@ -274,7 +276,7 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
274 276 cp.set_response_type("JSON");
275 277 cp.call(p,"listaRSSwsARRAY",monta);
276 278 }
277   - }
  279 + };
278 280 /*
279 281 Function: servicoswms
280 282  
... ... @@ -298,9 +300,9 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
298 300 }
299 301 catch(e){alert(e);}
300 302  
301   - var canais = retorno.data.canais
302   - var ncanais = canais.length
303   - var ins = "<br>"+retorno.data.rss
  303 + var canais = retorno.data.canais;
  304 + var ncanais = canais.length;
  305 + var ins = "<br>"+retorno.data.rss;
304 306 /*
305 307 for (i=0;i<linhas.length; i++)
306 308 {
... ... @@ -317,26 +319,26 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
317 319 {{ins += ""}}
318 320 }
319 321 */
320   - for (i=0;i<ncanais; i++){
321   - var caso = canais[i]
322   - var clique = "javascript:document.getElementById(\""+$i3geo_wscliente.enderecowms+"\").value='"+caso.link+"';document.getElementById('"+$i3geo_wscliente.enderecowms+"').value='"+caso.link+"'"
323   - ins += "<p class=clique onclick="+clique+" ><b>"+caso.title+"</b>"
  322 + for (var i=0;i<ncanais; i++){
  323 + var caso = canais[i];
  324 + var clique = "javascript:document.getElementById(\""+$i3geo_wscliente.enderecowms+"\").value='"+caso.link+"';document.getElementById('"+$i3geo_wscliente.enderecowms+"').value='"+caso.link+"'";
  325 + ins += "<p class=clique onclick="+clique+" ><b>"+caso.title+"</b>";
324 326  
325 327 //ins += "\<p class=clique onclick=\"registraws('"+caso.link+"','"+caso.id_ws+"')\" \>\<b\>"+caso.title+"\<\/b\>&nbsp;"+caso.description+"&nbsp;("+caso.author+")"
326 328 if(caso.nacessos > 0)
327 329 {
328   - var pc = (parseInt(caso.nacessosok) * 100) / parseInt(caso.nacessos)
  330 + var pc = (parseInt(caso.nacessosok) * 100) / parseInt(caso.nacessos);
329 331 ins += " \<span style=color:gray \>(disponibilidade: "+pc+"%, acessos considerados: "+caso.nacessos+")\<\/span>\<\/p\>";
330 332 }
331 333 }
332 334  
333 335 $i("resultadoRSSwms").innerHTML = ins+"<br.<br>";
334   - $i($i3geo_wscliente.corpo).style.display="none"
335   - $i("RSSws").style.display="none"
336   - $i("RSSwms").style.display="block"
  336 + $i($i3geo_wscliente.corpo).style.display="none";
  337 + $i("RSSws").style.display="none";
  338 + $i("RSSwms").style.display="block";
337 339  
338 340 aguardeTotal("none");
339   - }
  341 + };
340 342 if ($i("RSSwms"))
341 343 {
342 344 aguardeTotal("block");
... ... @@ -346,7 +348,7 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
346 348 cp.set_response_type("JSON");
347 349 cp.call(p,"listaRSSwsARRAY",mostraRetornowmsRSS);
348 350 }
349   - }
  351 + };
350 352 /*
351 353 Function: getcapabilities
352 354  
... ... @@ -359,14 +361,14 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
359 361 */
360 362 this.getcapabilities = function(tipo)
361 363 {
362   - $i("RSSws").style.display="none"
363   - $i("RSSwms").style.display="none"
364   - $i($i3geo_wscliente.corpo).style.display="block"
  364 + $i("RSSws").style.display="none";
  365 + $i("RSSwms").style.display="none";
  366 + $i($i3geo_wscliente.corpo).style.display="block";
365 367 var monta = function (retorno)
366 368 {
367 369 aguardeTotal("none");
368   - $i($i3geo_wscliente.corpo).innerHTML = "<div class=listaAjuda ><p>"+retorno.data+"</div>"
369   - }
  370 + $i($i3geo_wscliente.corpo).innerHTML = "<div class=listaAjuda ><p>"+retorno.data+"</div>";
  371 + };
370 372 if ($i(this.enderecowms).value != "")
371 373 {
372 374 aguardeTotal("block");
... ... @@ -377,8 +379,8 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
377 379 cp.call(p,"getcapabilities",monta);
378 380 }
379 381 else
380   - $i(this.corpo).innerHTML = "<p>Nenhum serviço foi escolhido.</p>"
381   - }
  382 + $i(this.corpo).innerHTML = "<p>Nenhum serviço foi escolhido.</p>";
  383 + };
382 384 /*
383 385 Function: listatemas
384 386  
... ... @@ -386,34 +388,34 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
386 388 */
387 389 this.listatemas = function()
388 390 {
389   - var WCservico = $i(this.enderecowms).value
  391 + var WCservico = $i(this.enderecowms).value;
390 392 var WCmostraTemas = function(retorno)
391 393 {
392 394 aguardeTotal("none");
393 395 document.cookie = 'i3GeoPHP=; expires=Thu, 2 Aug 2001 20:47:11 UTC; path=/';
394   - var ins = "<div style='text-align:left'><p>Selecione a camada que ser&aacute; adicionada ao mapa e depois clique em Aplicar.<br></div>"
395   - ins += '<p><div onclick="$i3geo_wscliente.verMapa()" ><input id=botao3 type="button" class=executar value="Aplicar&nbsp;&nbsp;" /></div>'
396   - ins += '<br><div style="text-align:left;height:260px;overflow:auto;width:555px;" >'
397   - $i($i3geo_wscliente.corpo).innerHTML = ins+"<p>"+retorno.data+"</div>"
  396 + var ins = "<div style='text-align:left'><p>Selecione a camada que ser&aacute; adicionada ao mapa e depois clique em Aplicar.<br></div>";
  397 + ins += '<p><div onclick="$i3geo_wscliente.verMapa()" ><input id=botao3 type="button" class=executar value="Aplicar&nbsp;&nbsp;" /></div>';
  398 + ins += '<br><div style="text-align:left;height:260px;overflow:auto;width:555px;" >';
  399 + $i($i3geo_wscliente.corpo).innerHTML = ins+"<p>"+retorno.data+"</div>";
398 400 YAHOO.example.init = function ()
399 401 {
400 402 function onPushButtonsMarkupReady()
401 403 {new YAHOO.widget.Button("botao3");}
402 404 YAHOO.util.Event.onContentReady("botao3", onPushButtonsMarkupReady);
403   - }()
404   - }
405   - $i("RSSws").style.display="none"
406   - $i("RSSwms").style.display="none"
407   - $i(this.corpo).style.display="block"
  405 + }();
  406 + };
  407 + $i("RSSws").style.display="none";
  408 + $i("RSSwms").style.display="none";
  409 + $i(this.corpo).style.display="block";
408 410 if(WCservico == "")
409   - {$i(this.corpo).innerHTML = "<p>Nenhum serviço foi escolhido.</p>"}
  411 + {$i(this.corpo).innerHTML = "<p>Nenhum serviço foi escolhido.</p>";}
410 412 aguardeTotal("block");
411   - var p = this.loc_i3geo+"/classesphp/mapa_controle.php?map_file=&funcao=temaswms&servico="+WCservico+"&g_sid="
  413 + var p = this.loc_i3geo+"/classesphp/mapa_controle.php?map_file=&funcao=temaswms&servico="+WCservico+"&g_sid=";
412 414 var cp = new cpaint();
413 415 //cp.set_debug(2)
414 416 cp.set_response_type("JSON");
415 417 cp.call(p,"temaswms",WCmostraTemas);
416   - }
  418 + };
417 419 /*
418 420 Function: verMapa
419 421  
... ... @@ -422,57 +424,59 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
422 424 */
423 425 this.verMapa = function()
424 426 {
425   - var WCservico = $i(this.enderecowms).value
426   - var epsg = $i("proj").value.split(",")
427   - var epsg = epsg[0]
428   - var epsg = epsg.split(":")
429   - var epsg = epsg[1]
430   - $i(this.corpo).innerHTML = "<div style=text-align:left id=i3geo_wscliente_id_mapa ></div><div style=width:550px;text-align:left id=localizarxy ></div><div style=text-align:left ><iframe width=400 id=desc ></iframe></div>"
  427 + var WCservico = $i(this.enderecowms).value,
  428 + epsg = $i("proj").value.split(","),
  429 + wms;
  430 + epsg = epsg[0];
  431 + epsg = epsg.split(":");
  432 + epsg = epsg[1];
  433 + $i(this.corpo).innerHTML = "<div style=text-align:left id=i3geo_wscliente_id_mapa ></div><div style=width:550px;text-align:left id=localizarxy ></div><div style=text-align:left ><iframe width=400 id=desc ></iframe></div>";
431 434 var map = new OpenLayers.Map('i3geo_wscliente_id_mapa');
432 435 var bounds = new OpenLayers.Bounds(-73,5,-27,-34);
433 436 if (this.tipo != "estilo")
434   - {var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",WCservico, {layers: this.tema, srs: epsg} );}
  437 + {wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",WCservico, {layers: this.tema, srs: epsg} );}
435 438 else
436 439 {
437   - var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",WCservico, {layers: this.tema, styles: this.nometema, srs: epsg});
  440 + wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",WCservico, {layers: this.tema, styles: this.nometema, srs: epsg});
438 441 }
439 442 map.addLayer(wms);
440 443 map.zoomToExtent(bounds);
441 444 map.events.register("mousemove", map, function(e)
442 445 {
  446 + var p;
443 447 //pega as coordenadas do cursor
444 448 if(e.xy)
445   - {var p = e.xy;}
  449 + {p = e.xy;}
446 450 else
447   - {var p = new OpenLayers.Pixel(e.x,e.y);}
  451 + {p = new OpenLayers.Pixel(e.x,e.y);}
448 452 //altera o indicador de localizacao
449 453 var lonlat = map.getLonLatFromViewPortPx(p);
450 454 var d = i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);
451   - $i("localizarxy").innerHTML = d[0]+" , "+d[1]
452   - })
  455 + $i("localizarxy").innerHTML = d[0]+" , "+d[1];
  456 + });
453 457 map.events.register("click", map, function(e)
454 458 {
  459 + var p;
455 460 //pega as coordenadas do cursor
456 461 if(e.xy)
457   - {var p = e.xy;}
  462 + {p = e.xy;}
458 463 else
459   - {var p = new OpenLayers.Pixel(e.x,e.y);}
  464 + {p = new OpenLayers.Pixel(e.x,e.y);}
460 465 //altera o indicador de localizacao
461   - var lonlat = map.getLonLatFromViewPortPx(p);
462   - var url = wms.getFullRequestString()
463   - url = url.replace("GetMap","getfeatureinfo")
464   - url += "&QUERY_LAYERS="+$i3geo_wscliente.tema
465   - var bb = map.getExtent()
466   - url += "&BBOX="+bb.toBBOX()
  466 + var url = wms.getFullRequestString();
  467 + url = url.replace("GetMap","getfeatureinfo");
  468 + url += "&QUERY_LAYERS="+$i3geo_wscliente.tema;
  469 + var bb = map.getExtent();
  470 + url += "&BBOX="+bb.toBBOX();
467 471 //var xy = p.split(",")
468   - url += "&x="+p.x
469   - url += "&y="+p.y
470   - var size = map.getSize()
471   - url += "&WIDTH="+size.w
472   - url += "&HEIGHT="+size.h
473   - $i("desc").src = url
474   - })
475   - }
  472 + url += "&x="+p.x;
  473 + url += "&y="+p.y;
  474 + var size = map.getSize();
  475 + url += "&WIDTH="+size.w;
  476 + url += "&HEIGHT="+size.h;
  477 + $i("desc").src = url;
  478 + });
  479 + };
476 480 /*
477 481 Function: listafuncoes
478 482  
... ... @@ -484,43 +488,43 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
484 488 var WCmostraFuncoes = function(retorno)
485 489 {
486 490 aguardeTotal("none");
487   - var ins = "<p>Selecione a fun&ccedil;&atilde;o que ser&aacute; acionada depois clique em Aplicar.<br></div>"
488   - ins += '<p><div onclick="$i3geo_wscliente.selParFuncao()" ><input id=botao4 type="buttom" class=executar value="Aplicar&nbsp;&nbsp;" /></div>'
489   - ins += '<br><div style="text-align:left;height:260px;overflow:auto;width:555px;" >'
  491 + var ins = "<p>Selecione a fun&ccedil;&atilde;o que ser&aacute; acionada depois clique em Aplicar.<br></div>";
  492 + ins += '<p><div onclick="$i3geo_wscliente.selParFuncao()" ><input id=botao4 type="buttom" class=executar value="Aplicar&nbsp;&nbsp;" /></div>';
  493 + ins += '<br><div style="text-align:left;height:260px;overflow:auto;width:555px;" >';
490 494 if(!retorno.data)
491 495 {$i($i3geo_wscliente.corpo).innerHTML="<br><span style=color:red ><b>Erro ao acessar o servi&ccedil;o!</span>";return;}
492 496 var funcs = retorno.data.split("|");
493   - for (i=0;i<funcs.length; i++)
  497 + for (var i=0;i<funcs.length; i++)
494 498 {
495   - var f = funcs[i].split("#")
496   - ins += "<br><b><input style='cursor:pointer' type=radio name='funcao' onclick=\"$i3geo_wscliente.selParFuncao('"+f[0]+"')\" />&nbsp;"+f[0]+"</b>&nbsp;"+f[3]+"<br>"
497   - ins += "<i>Entrada:</i>"+f[1]
498   - ins += "<br><i>Sa&iacute;da:</i>"+f[2]+"<br>"
  499 + var f = funcs[i].split("#");
  500 + ins += "<br><b><input style='cursor:pointer' type=radio name='funcao' onclick=\"$i3geo_wscliente.selParFuncao('"+f[0]+"')\" />&nbsp;"+f[0]+"</b>&nbsp;"+f[3]+"<br>";
  501 + ins += "<i>Entrada:</i>"+f[1];
  502 + ins += "<br><i>Sa&iacute;da:</i>"+f[2]+"<br>";
499 503 }
500   - $i($i3geo_wscliente.corpo).innerHTML = ins+"</div>"
  504 + $i($i3geo_wscliente.corpo).innerHTML = ins+"</div>";
501 505 YAHOO.example.init = function ()
502 506 {
503 507 function onPushButtonsMarkupReady()
504 508 {new YAHOO.widget.Button("botao4");}
505 509 YAHOO.util.Event.onContentReady("botao4", onPushButtonsMarkupReady);
506   - }()
507   - $i("RSSws").style.display="none"
508   - $i("RSSwms").style.display="none"
509   - $i($i3geo_wscliente.corpo).style.display="block"
510   - }
511   - var WCservico = $i(this.enderecows).value
  510 + }();
  511 + $i("RSSws").style.display="none";
  512 + $i("RSSwms").style.display="none";
  513 + $i($i3geo_wscliente.corpo).style.display="block";
  514 + };
  515 + var WCservico = $i(this.enderecows).value;
512 516 if (WCservico != "")
513 517 {
514 518 aguardeTotal("block");
515   - var p = this.loc_i3geo+"/classesphp/wscliente.php?funcao=funcoesws&servico="+WCservico+"&g_sid="
  519 + var p = this.loc_i3geo+"/classesphp/wscliente.php?funcao=funcoesws&servico="+WCservico+"&g_sid=";
516 520 var cp = new cpaint();
517 521 //cp.set_debug(2)
518 522 cp.set_response_type("JSON");
519 523 cp.call(p,"funcoesws",WCmostraFuncoes);
520 524 }
521 525 else
522   - $i(this.corpo).innerHTML = "<p>Nenhum serviço foi escolhido.</p>"
523   - }
  526 + $i(this.corpo).innerHTML = "<p>Nenhum serviço foi escolhido.</p>";
  527 + };
524 528 /*
525 529 Function: selParFuncao
526 530  
... ... @@ -536,32 +540,32 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
536 540 var WCmostraParFuncoes = function (retorno)
537 541 {
538 542 aguardeTotal("none");
539   - if (retorno.data == ""){$i3geo_wscliente.chamadados(retorno.data)}
  543 + if (retorno.data == ""){$i3geo_wscliente.chamadados(retorno.data);}
540 544 else
541 545 {
542   - var pars = retorno.data.split("|")
543   - var ins = "<p>Digite os valores dos par&acirc;metros e depois em clique em 'Aplicar'.<br>"
544   - ins += '<p><input type="button" class=executar value="Aplicar&nbsp;&nbsp;" onclick=$i3geo_wscliente.chamadados(\"'+retorno.data+'\") />'
545   - ins += '<br><div style="text-align:left;height:260px;overflow:auto;width:555px;" >'
546   - for (i=0;i<pars.length; i++)
  546 + var pars = retorno.data.split("|");
  547 + var ins = "<p>Digite os valores dos par&acirc;metros e depois em clique em 'Aplicar'.<br>";
  548 + ins += '<p><input type="button" class=executar value="Aplicar&nbsp;&nbsp;" onclick=$i3geo_wscliente.chamadados(\"'+retorno.data+'\") />';
  549 + ins += '<br><div style="text-align:left;height:260px;overflow:auto;width:555px;" >';
  550 + for (var i=0;i<pars.length; i++)
547 551 {
548   - var temp = pars[i].split("#")
549   - ins+= "<br>"+temp[0]+"&nbsp("+temp[1]+")<input type=text size=20 value='' id=xxx"+temp[0]+" /><br>"
  552 + var temp = pars[i].split("#");
  553 + ins+= "<br>"+temp[0]+"&nbsp("+temp[1]+")<input type=text size=20 value='' id=xxx"+temp[0]+" /><br>";
550 554 }
551   - $i($i3geo_wscliente.corpo).innerHTML = ins+"</div>"
  555 + $i($i3geo_wscliente.corpo).innerHTML = ins+"</div>";
552 556 }
553   - $i("RSSws").style.display="none"
554   - $i("RSSwms").style.display="none"
555   - $i($i3geo_wscliente.corpo).style.display="block"
556   - }
  557 + $i("RSSws").style.display="none";
  558 + $i("RSSwms").style.display="none";
  559 + $i($i3geo_wscliente.corpo).style.display="block";
  560 + };
557 561 aguardeTotal("block");
558 562 this.funcao = funcao;
559   - var p = this.loc_i3geo+"/classesphp/wscliente.php?funcao=parfuncoesws&servico="+$i(this.enderecows).value+"&funcaows="+funcao+"&g_sid="
  563 + var p = this.loc_i3geo+"/classesphp/wscliente.php?funcao=parfuncoesws&servico="+$i(this.enderecows).value+"&funcaows="+funcao+"&g_sid=";
560 564 var cp = new cpaint();
561 565 //cp.set_debug(2)
562 566 cp.set_response_type("JSON");
563 567 cp.call(p,"parFuncoesws",WCmostraParFuncoes);
564   - }
  568 + };
565 569 /*
566 570 Function: chamadados
567 571  
... ... @@ -573,28 +577,28 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
573 577 var monta = function (retorno)
574 578 {
575 579 aguardeTotal("none");
576   - $i($i3geo_wscliente.corpo).innerHTML = "<div style='text-align:left;height:320px;overflow:auto;width:555px;' >"+retorno.data+ "</div>"
577   - $i("RSSws").style.display="none"
578   - $i("RSSwms").style.display="none"
579   - $i($i3geo_wscliente.corpo).style.display="block"
580   - }
  580 + $i($i3geo_wscliente.corpo).innerHTML = "<div style='text-align:left;height:320px;overflow:auto;width:555px;' >"+retorno.data+ "</div>";
  581 + $i("RSSws").style.display="none";
  582 + $i("RSSwms").style.display="none";
  583 + $i($i3geo_wscliente.corpo).style.display="block";
  584 + };
581 585 aguardeTotal("block");
582   - var par = []
  586 + var par = [];
583 587 if (retorno != "")
584 588 {
585   - var pars = retorno.split("|")
586   - for (i=0;i<pars.length; i++)
  589 + var pars = retorno.split("|");
  590 + for (var i=0;i<pars.length; i++)
587 591 {
588   - var temp = pars[i].split("#")
589   - par.push(temp[0]+"*"+$i("xxx"+temp[0]).value)
  592 + var temp = pars[i].split("#");
  593 + par.push(temp[0]+"*"+$i("xxx"+temp[0]).value);
590 594 }
591 595 }
592   - var p = this.loc_i3geo+"/classesphp/wscliente.php?funcao=dadosws&servico="+$i(this.enderecows).value+"&funcaows="+this.funcao+"&param="+par.join("|")+"&g_sid="
  596 + var p = this.loc_i3geo+"/classesphp/wscliente.php?funcao=dadosws&servico="+$i(this.enderecows).value+"&funcaows="+this.funcao+"&param="+par.join("|")+"&g_sid=";
593 597 var cp = new cpaint();
594 598 //cp.set_debug(2)
595 599 cp.set_response_type("JSON");
596 600 cp.call(p,"dadosWS",monta);
597   - }
  601 + };
598 602 /*
599 603 Function: wsdl
600 604  
... ... @@ -602,7 +606,7 @@ function i3geo_wscliente_configura(loc_i3geo,corpo,enderecows,enderecowms,rssws,
602 606  
603 607 */
604 608 this.wsdl = function()
605   - {window.open($i(this.enderecows).value)}
  609 + {window.open($i(this.enderecows).value);};
606 610 }
607 611  
608 612 /*
... ...
temas/.project 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>i3Geo mapfiles</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + </buildSpec>
  9 + <natures>
  10 + </natures>
  11 +</projectDescription>
... ...