Commit f083859c2962e0a4593403bd577fcd7568739175

Authored by Edmar Moretti
1 parent 78eb07ba

--no commit message

classesjs/classe_interface.js
... ... @@ -711,9 +711,16 @@ i3GEO.Interface = {
711 711 var montaMapa = function(){
712 712 var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo,
713 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 723 openlayers.criaLayers();
715   - openlayers.registraEventos();
716   - openlayers.zoom2ext(i3GEO.parametros.mapexten);
717 724 if(openlayers.GADGETS.PanZoomBar === true){
718 725 pz = new OpenLayers.Control.PanZoomBar();
719 726 i3geoOL.addControl(pz);
... ... @@ -773,29 +780,32 @@ i3GEO.Interface = {
773 780  
774 781 };
775 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 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 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 809 nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length,
800 810 layer,
801 811 camada,
... ... @@ -856,8 +866,7 @@ i3GEO.Interface = {
856 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 870 if(camada.escondido === "sim")
862 871 {layer.transitionEffect = "null";}
863 872 i3geoOL.addLayer(layer);
... ... @@ -875,7 +884,6 @@ i3GEO.Interface = {
875 884 layer,
876 885 i,
877 886 camada;
878   -
879 887 if(i3GEO.Interface.openlayers.TILES === true)
880 888 {i3GEO.Interface.openlayers.TILES = false;}
881 889 else
... ... @@ -942,7 +950,7 @@ i3GEO.Interface = {
942 950 temp = function(){i3GEO.mapa.legendaHTML.atualiza();},
943 951 desligar = "",
944 952 ligar = "";
945   - if(layers.length > 0){
  953 + if(layers.length > 0){
946 954 layers[0].setVisibility(obj.checked);
947 955 if(obj.checked)
948 956 {
... ... @@ -955,6 +963,7 @@ i3GEO.Interface = {
955 963 i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);
956 964 }
957 965 i3GEO.php.ligatemas(temp,desligar,ligar);
  966 + //beacons pattern
958 967 }
959 968 },
960 969 ativaFundo: function(id){
... ... @@ -1006,16 +1015,11 @@ i3GEO.Interface = {
1006 1015 objposicaocursor.ddy = lonlat.lat;
1007 1016 objposicaocursor.dmsx = d[0];
1008 1017 objposicaocursor.dmsy = d[1];
1009   -
1010   - //d = i3geoOL.getViewPortPxFromLonLat(lonlat);
1011 1018 objposicaocursor.imgx = p.x;
1012 1019 objposicaocursor.imgy = p.y;
1013   -
1014 1020 pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));
1015 1021 objposicaocursor.telax = p.x + pos[0];
1016 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 1024 catch(e){
1021 1025 if(typeof(console) !== 'undefined'){console.error(e);}
... ...
classesjs/classe_mapa.js
... ... @@ -244,7 +244,7 @@ i3GEO.mapa = {
244 244 if(typeof(console) !== 'undefined'){console.info("i3GEO.mapa.legendaHTML.cria()");}
245 245 if(arguments.length === 0)
246 246 {id = "";}
247   - this.legendaHTML.ID = id;
  247 + i3GEO.mapa.legendaHTML.ID = id;
248 248 if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()") < 0)
249 249 {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()");}
250 250 i3GEO.mapa.legendaHTML.atualiza();
... ... @@ -275,7 +275,8 @@ i3GEO.mapa = {
275 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 282 Function: obtem
... ...