Commit f083859c2962e0a4593403bd577fcd7568739175

Authored by Edmar Moretti
1 parent 78eb07ba

--no commit message

classesjs/classe_interface.js
@@ -711,9 +711,16 @@ i3GEO.Interface = { @@ -711,9 +711,16 @@ i3GEO.Interface = {
711 var montaMapa = function(){ 711 var montaMapa = function(){
712 var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo, 712 var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo,
713 openlayers = i3GEO.Interface.openlayers; 713 openlayers = i3GEO.Interface.openlayers;
  714 + i3GEO.util.multiStep([
  715 + openlayers.registraEventos,
  716 + openlayers.zoom2ext
  717 + ],[
  718 + null,
  719 + [i3GEO.parametros.mapexten]
  720 + ],
  721 + function(){}
  722 + );
714 openlayers.criaLayers(); 723 openlayers.criaLayers();
715 - openlayers.registraEventos();  
716 - openlayers.zoom2ext(i3GEO.parametros.mapexten);  
717 if(openlayers.GADGETS.PanZoomBar === true){ 724 if(openlayers.GADGETS.PanZoomBar === true){
718 pz = new OpenLayers.Control.PanZoomBar(); 725 pz = new OpenLayers.Control.PanZoomBar();
719 i3geoOL.addControl(pz); 726 i3geoOL.addControl(pz);
@@ -773,29 +780,32 @@ i3GEO.Interface = { @@ -773,29 +780,32 @@ i3GEO.Interface = {
773 780
774 }; 781 };
775 i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.openlayers.ligaDesliga(this)"; 782 i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.openlayers.ligaDesliga(this)";
776 - i3GEO.util.multiStep(  
777 - [i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,  
778 - i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,  
779 - i3GEO.arvoreDeCamadas.cria,i3GEO.util.arvore],  
780 - [null,null,null,[i3GEO.parametros.mensagens],null,null,  
781 - ["",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic],  
782 - ["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa]], 783 + i3GEO.util.multiStep([
  784 + i3GEO.coordenadas.mostraCoordenadas,
  785 + montaMapa,
  786 + i3GEO.gadgets.mostraMenuSuspenso,
  787 + i3GEO.ajuda.ativaLetreiro,
  788 + i3GEO.idioma.mostraSeletor,
  789 + i3GEO.gadgets.mostraEscalaNumerica,
  790 + i3GEO.arvoreDeCamadas.cria,
  791 + i3GEO.util.arvore
  792 + ],[
  793 + null,
  794 + null,
  795 + null,
  796 + [i3GEO.parametros.mensagens],
  797 + null,
  798 + null,
  799 + ["",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic],
  800 + ["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa]
  801 + ],
783 function(){} 802 function(){}
784 ); 803 );
785 - /*  
786 - i3GEO.coordenadas.mostraCoordenadas();  
787 - montaMapa();  
788 - i3GEO.gadgets.mostraMenuSuspenso();  
789 - i3GEO.ajuda.ativaLetreiro(i3GEO.parametros.mensagens);  
790 - i3GEO.idioma.mostraSeletor();  
791 - i3GEO.gadgets.mostraEscalaNumerica();  
792 - i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);  
793 - i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);  
794 - */  
795 }, 804 },
796 criaLayers: function(){ 805 criaLayers: function(){
797 - var url = i3GEO.configura.locaplic+"/classesphp/mapa_openlayers.php?map="+i3GEO.parametros.mapfile+"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,  
798 - urlfundo = i3GEO.configura.locaplic+"/classesphp/mapa_openlayers.php?layer=&tipolayer=fundo&map="+i3GEO.parametros.mapfile.replace(".map","fundo.map")+"&TIPOIMAGEM="+i3GEO.configura.tipoimagem, 806 + var configura = i3GEO.configura,
  807 + url = configura.locaplic+"/classesphp/mapa_openlayers.php?map="+i3GEO.parametros.mapfile+"&TIPOIMAGEM="+configura.tipoimagem,
  808 + urlfundo = configura.locaplic+"/classesphp/mapa_openlayers.php?layer=&tipolayer=fundo&map="+i3GEO.parametros.mapfile.replace(".map","fundo.map")+"&TIPOIMAGEM="+configura.tipoimagem,
799 nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length, 809 nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length,
800 layer, 810 layer,
801 camada, 811 camada,
@@ -856,8 +866,7 @@ i3GEO.Interface = { @@ -856,8 +866,7 @@ i3GEO.Interface = {
856 layer = new OpenLayers.Layer.WMS(camada.name, urllayer,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes); 866 layer = new OpenLayers.Layer.WMS(camada.name, urllayer,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes);
857 } 867 }
858 } 868 }
859 - catch(e){}  
860 - 869 + catch(e){}
861 if(camada.escondido === "sim") 870 if(camada.escondido === "sim")
862 {layer.transitionEffect = "null";} 871 {layer.transitionEffect = "null";}
863 i3geoOL.addLayer(layer); 872 i3geoOL.addLayer(layer);
@@ -875,7 +884,6 @@ i3GEO.Interface = { @@ -875,7 +884,6 @@ i3GEO.Interface = {
875 layer, 884 layer,
876 i, 885 i,
877 camada; 886 camada;
878 -  
879 if(i3GEO.Interface.openlayers.TILES === true) 887 if(i3GEO.Interface.openlayers.TILES === true)
880 {i3GEO.Interface.openlayers.TILES = false;} 888 {i3GEO.Interface.openlayers.TILES = false;}
881 else 889 else
@@ -942,7 +950,7 @@ i3GEO.Interface = { @@ -942,7 +950,7 @@ i3GEO.Interface = {
942 temp = function(){i3GEO.mapa.legendaHTML.atualiza();}, 950 temp = function(){i3GEO.mapa.legendaHTML.atualiza();},
943 desligar = "", 951 desligar = "",
944 ligar = ""; 952 ligar = "";
945 - if(layers.length > 0){ 953 + if(layers.length > 0){
946 layers[0].setVisibility(obj.checked); 954 layers[0].setVisibility(obj.checked);
947 if(obj.checked) 955 if(obj.checked)
948 { 956 {
@@ -955,6 +963,7 @@ i3GEO.Interface = { @@ -955,6 +963,7 @@ i3GEO.Interface = {
955 i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value); 963 i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);
956 } 964 }
957 i3GEO.php.ligatemas(temp,desligar,ligar); 965 i3GEO.php.ligatemas(temp,desligar,ligar);
  966 + //beacons pattern
958 } 967 }
959 }, 968 },
960 ativaFundo: function(id){ 969 ativaFundo: function(id){
@@ -1006,16 +1015,11 @@ i3GEO.Interface = { @@ -1006,16 +1015,11 @@ i3GEO.Interface = {
1006 objposicaocursor.ddy = lonlat.lat; 1015 objposicaocursor.ddy = lonlat.lat;
1007 objposicaocursor.dmsx = d[0]; 1016 objposicaocursor.dmsx = d[0];
1008 objposicaocursor.dmsy = d[1]; 1017 objposicaocursor.dmsy = d[1];
1009 -  
1010 - //d = i3geoOL.getViewPortPxFromLonLat(lonlat);  
1011 objposicaocursor.imgx = p.x; 1018 objposicaocursor.imgx = p.x;
1012 objposicaocursor.imgy = p.y; 1019 objposicaocursor.imgy = p.y;
1013 -  
1014 pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); 1020 pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));
1015 objposicaocursor.telax = p.x + pos[0]; 1021 objposicaocursor.telax = p.x + pos[0];
1016 objposicaocursor.telay = p.y + pos[1]; 1022 objposicaocursor.telay = p.y + pos[1];
1017 - //i3GEO.ajuda.mostraJanela(p.x+" "+p.y);  
1018 - //console.error(objposicaocursor.telax+" "+objposicaocursor.telay);  
1019 } 1023 }
1020 catch(e){ 1024 catch(e){
1021 if(typeof(console) !== 'undefined'){console.error(e);} 1025 if(typeof(console) !== 'undefined'){console.error(e);}
classesjs/classe_mapa.js
@@ -244,7 +244,7 @@ i3GEO.mapa = { @@ -244,7 +244,7 @@ i3GEO.mapa = {
244 if(typeof(console) !== 'undefined'){console.info("i3GEO.mapa.legendaHTML.cria()");} 244 if(typeof(console) !== 'undefined'){console.info("i3GEO.mapa.legendaHTML.cria()");}
245 if(arguments.length === 0) 245 if(arguments.length === 0)
246 {id = "";} 246 {id = "";}
247 - this.legendaHTML.ID = id; 247 + i3GEO.mapa.legendaHTML.ID = id;
248 if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()") < 0) 248 if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()") < 0)
249 {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()");} 249 {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()");}
250 i3GEO.mapa.legendaHTML.atualiza(); 250 i3GEO.mapa.legendaHTML.atualiza();
@@ -275,7 +275,8 @@ i3GEO.mapa = { @@ -275,7 +275,8 @@ i3GEO.mapa = {
275 {elementos[i].style.display="none";} 275 {elementos[i].style.display="none";}
276 } 276 }
277 }; 277 };
278 - i3GEO.mapa.legendaHTML.obtem(temp); 278 + if(i3GEO.mapa.legendaHTML.ID !== "" || $i("wlegenda"))
  279 + {i3GEO.mapa.legendaHTML.obtem(temp);}
279 }, 280 },
280 /* 281 /*
281 Function: obtem 282 Function: obtem