Commit 362fca007806b76f6863a8068499c82c454a8668
1 parent
be27b4fa
Exists in
master
and in
6 other branches
i3geo/i3geo#91 correção Zoom por box não mostra o retângulo
Showing
12 changed files
with
105 additions
and
73 deletions
Show diff stats
admin/black_editor.php
... | ... | @@ -645,7 +645,7 @@ session_write_close(); |
645 | 645 | //parametros aplicados na criacao do arquivo mapfile |
646 | 646 | var parametrosMapa = { |
647 | 647 | //arquivo mapfile que servira de base para a criacao do mapa. Por default, sao utilizados os arquivos existentes em i3geo/aplicmap (geral1windows, geral1,...) |
648 | - //Essa variavel pode ser definida em ms_configura tambem. Se nao estiver definida em nenhum lugar, o i3Geo tentara descobrir o arquivo adequado a ser utilizado. Voce pode utilizar essa opcao para abrir um mapa com as camadas que voce quiser, mas para evitar redundâncias, prefira o uso de &temasa | |
648 | + //Essa variavel pode ser definida em ms_configura tambem. Se nao estiver definida em nenhum lugar, o i3Geo tentara descobrir o arquivo adequado a ser utilizado. Voce pode utilizar essa opcao para abrir um mapa com as camadas que voce quiser, mas para evitar redund�ncias, prefira o uso de &temasa | |
649 | 649 | mapfilebase: "", |
650 | 650 | //extensao geografica do mapa |
651 | 651 | //deve ser definida em coordenadas no formato decimos de grau e na projecao geografica na sequencia xmin ymin xmax ymax |
... | ... | @@ -836,7 +836,8 @@ session_write_close(); |
836 | 836 | new ol.interaction.MouseWheelZoom(), |
837 | 837 | new ol.interaction.PinchRotate(), |
838 | 838 | new ol.interaction.PinchZoom(), |
839 | - new ol.interaction.DragZoom(), | |
839 | + //new ol.interaction.DragZoom(), | |
840 | + i3GEO.navega.dragZoom(), | |
840 | 841 | new ol.interaction.DragPan() |
841 | 842 | ] |
842 | 843 | }, | ... | ... |
ferramentas/selecao/index.js
... | ... | @@ -63,6 +63,9 @@ i3GEOF.selecao = |
63 | 63 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.selecao.dicionario); |
64 | 64 | dicionario["locaplic"] = i3GEO.configura.locaplic; |
65 | 65 | dicionario["p8"] = $trad("p8"); |
66 | + if(i3GEO.Interface.ATUAL === "googlemaps"){ | |
67 | + dicionario["i3GEOselecaoboxHidden"] = "hidden"; | |
68 | + } | |
66 | 69 | return dicionario; |
67 | 70 | }, |
68 | 71 | /* | ... | ... |
interface/carto_ol.htm
... | ... | @@ -863,7 +863,8 @@ |
863 | 863 | new ol.interaction.MouseWheelZoom(), |
864 | 864 | new ol.interaction.PinchRotate(), |
865 | 865 | new ol.interaction.PinchZoom(), |
866 | - new ol.interaction.DragZoom(), | |
866 | + //new ol.interaction.DragZoom(), | |
867 | + i3GEO.navega.dragZoom(), | |
867 | 868 | new ol.interaction.DragPan() ] |
868 | 869 | }, |
869 | 870 | //opcoes para o objeto view, que e uma instancia de MapOptions | ... | ... |
interface/ol.htm
... | ... | @@ -915,7 +915,8 @@ |
915 | 915 | new ol.interaction.MouseWheelZoom(), |
916 | 916 | new ol.interaction.PinchRotate(), |
917 | 917 | new ol.interaction.PinchZoom(), |
918 | - new ol.interaction.DragZoom(), | |
918 | + //new ol.interaction.DragZoom(), | |
919 | + i3GEO.navega.dragZoom(), | |
919 | 920 | new ol.interaction.DragPan() ] |
920 | 921 | }, |
921 | 922 | //opcoes para o objeto view, que e uma instancia de MapOptions | ... | ... |
interface/openlayersdebug.htm
... | ... | @@ -21,7 +21,6 @@ |
21 | 21 | <script src="../pacotes/bootstrap-tour/build/js/bootstrap-tour.js"></script> |
22 | 22 | <link href="../pacotes/bootstrap-tour/build/css/bootstrap-tour.css" rel="stylesheet"> |
23 | 23 | <script src="tutorial.js"></script> |
24 | - | |
25 | 24 | <style> |
26 | 25 | .ol-attribution.ol-uncollapsible { |
27 | 26 | height: 2.1em; |
... | ... | @@ -29,7 +28,6 @@ |
29 | 28 | background: none; |
30 | 29 | margin-bottom: 15px; |
31 | 30 | } |
32 | - | |
33 | 31 | .foraDoMapa+span>span { |
34 | 32 | background-color: yellow; |
35 | 33 | } |
... | ... | @@ -920,8 +918,9 @@ |
920 | 918 | new ol.interaction.MouseWheelZoom(), |
921 | 919 | new ol.interaction.PinchRotate(), |
922 | 920 | new ol.interaction.PinchZoom(), |
923 | - new ol.interaction.DragZoom(), | |
924 | - new ol.interaction.DragPan() ] | |
921 | + //new ol.interaction.DragZoom(), | |
922 | + i3GEO.navega.dragZoom(), | |
923 | + new ol.interaction.DragPan()] | |
925 | 924 | }, |
926 | 925 | //opcoes para o objeto view, que e uma instancia de MapOptions |
927 | 926 | //ver https://openlayers.org/en/latest/apidoc/ol.View.html | ... | ... |
interface/osm.htm
... | ... | @@ -915,7 +915,8 @@ |
915 | 915 | new ol.interaction.MouseWheelZoom(), |
916 | 916 | new ol.interaction.PinchRotate(), |
917 | 917 | new ol.interaction.PinchZoom(), |
918 | - new ol.interaction.DragZoom(), | |
918 | + //new ol.interaction.DragZoom(), | |
919 | + i3GEO.navega.dragZoom(), | |
919 | 920 | new ol.interaction.DragPan() ] |
920 | 921 | }, |
921 | 922 | //opcoes para o objeto view, que e uma instancia de MapOptions | ... | ... |
interface/osmdebug.htm
... | ... | @@ -882,7 +882,8 @@ |
882 | 882 | new ol.interaction.MouseWheelZoom(), |
883 | 883 | new ol.interaction.PinchRotate(), |
884 | 884 | new ol.interaction.PinchZoom(), |
885 | - new ol.interaction.DragZoom(), | |
885 | + //new ol.interaction.DragZoom(), | |
886 | + i3GEO.navega.dragZoom(), | |
886 | 887 | new ol.interaction.DragPan() ] |
887 | 888 | }, |
888 | 889 | //opcoes para o objeto view, que e uma instancia de MapOptions | ... | ... |
js/compactados/navega_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:[],redo:[],posicao:0,emAcao:false},ativaPan:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}if(i3GEO.Interface.ATUAL==="openlayers"){marcadorZoom="";i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}},registraExt:function(ext){if(i3GEO.navega.EXTENSOES.emAcao==false){var l=i3GEO.navega.EXTENSOES.lista,n=l.length;if(n>10){l.shift()}n=l.length;if(n>0&&l[n-1]===ext){return}l.push(ext)}else{i3GEO.navega.EXTENSOES.emAcao=false}},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;if(l.length>0){if(l.length>1){e=l.pop();i3GEO.navega.zoomExt("","","",e);if(r.length>10){r.shift()}if(r.length>0&&r[r.length-1]===e){return}else{r.push(a)}}}else{l.push(i3GEO.parametros.mapexten)}},extensaoProximo:function(){var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;i3GEO.navega.EXTENSOES.emAcao=true;if(r.length>0){i3GEO.navega.zoomExt("","","",r[r.length-1]);e=r.pop();if(l.length>10){l.pop()}if(l.length>0&&l[l.length-1]===e){return}l.push(a)}},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){var t=$i("i3GeoCentroDoMapa");if(t&&t.style.display==="block"){return}if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},removeCookieExtensao:function(){var nomecookie="i3geoOLUltimaExtensao";if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}i3GEO.util.insereCookie(nomecookie,"")},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);i3GEO.php.mudaext(function(retorno){i3GEO.atualiza(retorno)},tipoimagem,ext)},aplicaEscala:function(escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true);i3GEO.parametros.mapscale=parseInt(i3geoOL.getScale(),10)}},atualizaEscalaNumerica:function(escala){var e=$i("i3GEOescalanum");if(!e){return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},panFixo:function(){alert("panFixo foi depreciado na versao 6.0")},mostraRosaDosVentos:function(){alert("mostraRosaDosVentos foi depreciado na versao 6.0")},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){alert("zoomBox depreciado na versao 6.0")}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){if(i3GEO.navega.lente.ESTAATIVA!="nao"){i3GEO.navega.lente.desativa();return}var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"])},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"]);i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"])},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)'}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(200,150,"","center","center","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x50")+"</span></div>","ativadesativaDestaque",false,"hd","","","",true,"","","","");$i(janela[2].id).innerHTML="<div class='container-fluid'>"+"<h5 class='alert alert-info'>"+$trad("x91")+"</h5>"+"<div class='form-group condensed'>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO + 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO - 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>"+"</div></div>";$(janela[0].close).click(i3GEO.navega.destacaTema.desativa);i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"])},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"]);i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){alert("barraDeZoom depreciado na versao 6.0")}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos","dependencias.php","i3GEOF.buscaFotos.iniciaJanelaFlutuante()")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;var temp,janela,idgoogle="googlemaps"+Math.random();janela=i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >Google maps</span></div>",idgoogle,false,"hd","","","",false,"","","","","68");temp=function(){i3GEO.desenho.removePins("boxOndeGoogle");i3GEO.desenho.removePins("googlemaps")};$(janela[0].close).click(temp)},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}},atualizaGoogle:function(idgoogle){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.atualizaGoogle('"+idgoogle+"')"]);i3GEO.desenho.removePins("googlemaps");i3GEO.desenho.removePins("boxOndeGoogle")}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:[],redo:[],posicao:0,emAcao:false},ativaPan:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}if(i3GEO.Interface.ATUAL==="openlayers"){marcadorZoom="";i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}},registraExt:function(ext){if(i3GEO.navega.EXTENSOES.emAcao==false){var l=i3GEO.navega.EXTENSOES.lista,n=l.length;if(n>10){l.shift()}n=l.length;if(n>0&&l[n-1]===ext){return}l.push(ext)}else{i3GEO.navega.EXTENSOES.emAcao=false}},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;if(l.length>0){if(l.length>1){e=l.pop();i3GEO.navega.zoomExt("","","",e);if(r.length>10){r.shift()}if(r.length>0&&r[r.length-1]===e){return}else{r.push(a)}}}else{l.push(i3GEO.parametros.mapexten)}},extensaoProximo:function(){var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;i3GEO.navega.EXTENSOES.emAcao=true;if(r.length>0){i3GEO.navega.zoomExt("","","",r[r.length-1]);e=r.pop();if(l.length>10){l.pop()}if(l.length>0&&l[l.length-1]===e){return}l.push(a)}},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){var t=$i("i3GeoCentroDoMapa");if(t&&t.style.display==="block"){return}if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},removeCookieExtensao:function(){var nomecookie="i3geoOLUltimaExtensao";if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}i3GEO.util.insereCookie(nomecookie,"")},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);i3GEO.php.mudaext(function(retorno){i3GEO.atualiza(retorno)},tipoimagem,ext)},aplicaEscala:function(escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true);i3GEO.parametros.mapscale=parseInt(i3geoOL.getScale(),10)}},atualizaEscalaNumerica:function(escala){var e=$i("i3GEOescalanum");if(!e){return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},panFixo:function(){alert("panFixo foi depreciado na versao 6.0")},mostraRosaDosVentos:function(){alert("mostraRosaDosVentos foi depreciado na versao 6.0")},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){alert("zoomBox depreciado na versao 6.0")}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){if(i3GEO.navega.lente.ESTAATIVA!="nao"){i3GEO.navega.lente.desativa();return}var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"])},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"]);i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"])},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)'}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(200,150,"","center","center","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x50")+"</span></div>","ativadesativaDestaque",false,"hd","","","",true,"","","","");$i(janela[2].id).innerHTML="<div class='container-fluid'>"+"<h5 class='alert alert-info'>"+$trad("x91")+"</h5>"+"<div class='form-group condensed'>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO + 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO - 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>"+"</div></div>";$(janela[0].close).click(i3GEO.navega.destacaTema.desativa);i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"])},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"]);i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){alert("barraDeZoom depreciado na versao 6.0")}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos","dependencias.php","i3GEOF.buscaFotos.iniciaJanelaFlutuante()")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;var temp,janela,idgoogle="googlemaps"+Math.random();janela=i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >Google maps</span></div>",idgoogle,false,"hd","","","",false,"","","","","68");temp=function(){i3GEO.desenho.removePins("boxOndeGoogle");i3GEO.desenho.removePins("googlemaps")};$(janela[0].close).click(temp)},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}},atualizaGoogle:function(idgoogle){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.atualizaGoogle('"+idgoogle+"')"]);i3GEO.desenho.removePins("googlemaps");i3GEO.desenho.removePins("boxOndeGoogle")}},dragZoom:function(){i3GEO.navega.dragZoom.draw=new ol.interaction.Draw({type:"Circle",freehand:false,geometryFunction:ol.interaction.Draw.createRegularPolygon(4)});i3GEO.navega.dragZoom.draw.setActive(false);i3GEO.navega.dragZoom.draw.on("drawend",function(evt){var pol=evt.feature.getGeometry();i3geoOL.getView().fit(pol);i3GEO.navega.dragZoom.draw.setActive(false)});document.body.addEventListener('keydown',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(true)}});document.body.addEventListener('keyup',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(false)}});return i3GEO.navega.dragZoom.draw}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
js/i3geo_tudo_compacto7.js
... | ... | @@ -259,7 +259,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={LARGURAGUIAMOVEL:350,C |
259 | 259 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true,storymap:true,animagif:true},CAMADAS:"",FILTRO:"",CAMADASINDEXADAS:[],config:{"idOnde":"listaTemas","aposIniciar":"","templateCamada":"templates/camada.html","idListaFundo":"","templateCamadaFundo":"templates/camadaFundo.html","verificaAbrangencia":""},nget:0,carregaTemplates:function(){if(i3GEO.arvoreDeCamadas.nget==0){i3GEO.arvoreDeCamadas.nget=2;if(!i3GEO.template.camada){$.get(i3GEO.arvoreDeCamadas.config.templateCamada,function(template){i3GEO.template.camada=template;i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1;if(i3GEO.arvoreDeCamadas.nget==0){i3GEO.arvoreDeCamadas.inicia()}})}else{i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1}if(!i3GEO.template.camadaFundo){$.get(i3GEO.arvoreDeCamadas.config.templateCamadaFundo,function(template){i3GEO.template.camadaFundo=template;i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1;if(i3GEO.arvoreDeCamadas.nget==0){i3GEO.arvoreDeCamadas.inicia()}})}else{i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1}}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.arvoreDeCamadas.config[i]=v})}if(!i3GEO.template.camada||!i3GEO.template.camadaFundo){i3GEO.arvoreDeCamadas.carregaTemplates();return}else{config=i3GEO.arvoreDeCamadas.config;var novoel,temp;i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS);if(!$i(config.idOnde)){return}if(config.verificaAbrangencia!=""){i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"])}if(config.aposIniciar!==""){if(jQuery.isFunction(config.aposIniciar)){config.aposIniciar.call()}}}},atualiza:function(temas,forca){if(i3GEO.template.camada==undefined){return}if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var clone=[],camada={},config=i3GEO.arvoreDeCamadas.config,temp;temp=$i(config.idOnde);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}i3GEO.arvoreDeCamadas.CAMADAS=temas;i3GEO.arvoreDeCamadas.CAMADASINDEXADAS=[];$.each(i3GEO.arvoreDeCamadas.CAMADAS,function(i,tema){var mostra=true;i3GEO.pluginI3geo.aplicaPropriedades(tema);camada={};camada.name=tema.name;camada.tema=tema.tema;if(tema.status!=0){camada.checked="checked"}else{camada.checked=""}if(tema.sel&&tema.sel.toLowerCase()==="sim"){camada.classeCss="camadaSelecionada"}else{camada.classeCss=""}if(temp&&i3GEO.arvoreDeCamadas.FILTRO!==""){if(i3GEO.arvoreDeCamadas.FILTRO==="desligados"&&camada.checked=="checked"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="ligados"&&camada.checked==""){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="wms"&&tema.connectiontype*1!==7){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="raster"&&tema.type*1!==3){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="toponimia"&&tema.type*1!==4){mostra=false}}if(temp&&mostra==true){i3GEO.arvoreDeCamadas.montaIconesTema(tema,camada);i3GEO.arvoreDeCamadas.montaOpcoesTema(tema,camada);if(tema.iconetema!==""){camada.iconetema="<img class='i3GEOiconeTema' src='"+tema.iconetema+"' />"}if(tema.escondido.toLowerCase()!=="sim"){clone.push(camada)}}i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[camada.name]=tema});if(temp){var t=Mustache.render("{{#data}}"+i3GEO.template.camada+"{{/data}}",{"data":clone});$("#"+config.idOnde).html(t);$("#"+config.idOnde).sortable({scroll:false,axis:"y",revert:true,update:function(event,ui){var els=i3GEO.arvoreDeCamadas.listaLigadosDesligadosArvore(config.idOnde);var lista=els[2].join(",");var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)};i3GEO.php.reordenatemas(temp,lista)}})}i3GEO.arvoreDeCamadas.adicionaCamadasDeFundo(config);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},adicionaCamadasDeFundo:function(config){if(i3GEO.Interface.ATUAL=="openlayers"){var temp=temp=$i(config.idOnde);if(temp&&$("#"+config.idListaFundo).html()==""){clone=[{"name":"camadaDeFundo","value":"nenhum","title":$trad("nenhum")}];$.each(i3GEO.Interface.openlayers.LAYERSADICIONAIS,function(i,layer){camada={};temp=layer.getProperties();camada.name="camadaDeFundo";if(temp.preview){camada.preview=temp.preview}else{camada.preview=""}camada.value=temp.name;camada.title=temp.title;if(temp.visible===true){camada.checked="checked"}else{camada.checked=""}clone.push(camada)});var t=Mustache.to_html("{{#data}}"+i3GEO.template.camadaFundo+"{{/data}}",{"data":clone});$("#"+config.idListaFundo).html(t);$("#"+config.idListaFundo+" label").tooltip({animation:false,trigger:"hover",placement:"auto",html:true,template:"<div class='tooltip ' ><div class='tooltip-inner'></div></div>"})}}},ligaDesligaTemas:function(lista,status){},atualizaLegenda:function(idtema){},montaTextoTema:function(tema){if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},montaOpcoesTema:function(temaObj,camada){camada.ferramentasTexto=$trad("u15a");camada.ferramentasTitle=$trad("ferramCamadas");camada.removerTexto=$trad("t12");camada.removerTitle=$trad("t12a");camada.sobeTexto=$trad("t13");camada.sobeTitle=$trad("t14");camada.desceTexto=$trad("t15");camada.desceTitle=$trad("t16");camada.tabelaTexto=$trad("tabela");camada.tabelaTitle=$trad("t30");camada.editorlegendaTexto=$trad("t33");if(temaObj.zoomtema.toLowerCase()==="sim"){camada.zoomtemaTexto=$trad("t17");camada.zoomtemaTitle=$trad("t18")}else{camada.zoomtema="hidden"}if(temaObj.sel.toLowerCase()==="sim"){camada.selTexto=$trad("t5");camada.selTitle=$trad("t4")}else{camada.sel="hidden"}if(temaObj.sel.toLowerCase()==="sim"){camada.zoomSelTexto=$trad("t4a")}else{camada.zoomsel="hidden"}if(temaObj.link_tema!=""&&temaObj.features.toLowerCase()!=="sim"&&temaObj.name!="mundo"){camada.linkTexto=$trad("a9");camada.linkTitle=$trad("a9")}else{camada.link="hidden"}if(temaObj.download.toLowerCase()==="sim"||temaObj.download===""&&temaObj.features.toLowerCase()!=="sim"){camada.downloadTexto="Download";camada.downloadTitle=$trad("t6")}else{camada.download="hidden"}if(temaObj.permiteogc.toLowerCase()==="sim"){camada.permiteogcTexto="OGC"}else{camada.permiteogc="hidden"}return camada},montaIconesTema:function(temaObj,camada){if(temaObj.escala!=0){if(temaObj.escala*1<i3GEO.parametros.mapscale*1){camada.farol="green";camada.farolTitle=$trad("t9")}if(temaObj.escala*1>i3GEO.parametros.mapscale*1){camada.farol="red";camada.farolTitle=$trad("t10")}if(temaObj.escala===0){camada.farol="yellow";camada.farolTitle=$trad("t11")}}else{camada.farol="hidden"}if(temaObj.contextoescala.toLowerCase()==="sim"){camada.contextoescala="";camada.contextoescalaTitle=$trad("t36")}else{camada.contextoescala="hidden"}if(temaObj.plugini3geo){var iconePlugin=i3GEO.pluginI3geo.clickArvoreDeCamadas(temaObj);if(iconePlugin!=false){camada.iconePlugin=iconePlugin}}if(temaObj.ferramentas){var html="",fer="",fers=temaObj.ferramentas;for(fer in fers){if(i3GEO.configura.ferramentasLayers[fer]){html+=i3GEO.configura.ferramentasLayers[fer].icone(temaObj.name)}}camada.iconeFerramentas=html}return camada},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca")}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca")}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(){if(!i3GEO.arvoreDeCamadas.CAMADAS){return[[],[],[]]}var i=0,ligados=[],desligados=[],todos=[],camada,camadas=i3GEO.arvoreDeCamadas.CAMADAS;i=camadas.length;while(i>0){i-=1;camada=camadas[i];todos.push(camada["name"]);if(parseInt(camada["status"],10)===2){ligados.push(camada["name"])}else{desligados.push(camada["name"])}}return([ligados,desligados,todos])},listaLigadosDesligadosArvore:function(onde){if(!i3GEO.arvoreDeCamadas.CAMADAS){return[[],[],[]]}var n,i,ligados=[],desligados=[],todos=[],camada,camadas;camadas=$i(onde).getElementsByTagName("input");n=camadas.length;for(i=0;i<n;i++){camada=camadas[i];todos.push(camada.value);if(camada.checked==true){ligados.push(camada["name"])}else{desligados.push(camada["name"])}}return([ligados,desligados,todos])},capturaCheckBox:function(tema){var onde=$i(i3GEO.arvoreDeCamadas.config.idOnde),camadas,n,i;if(onde){camadas=onde.getElementsByTagName("input");n=camadas.length;for(i=0;i<n;i++){if(camadas[i].name==tema){return camadas[i]}}}return false},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}var resultado,i=0,temp,nelementos=camadas.length,ltema;resultado=[];if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp+"".toLowerCase()==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="diferente"){if(temp+"".toLowerCase()!==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="menor"){if(temp+"".toLowerCase()<valor+"".toLowerCase()){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){var nos=$("#"+i3GEO.arvoreDeCamadas.config.idOnde).find("input");$.each(nos,function(i,no){var ltema=i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[no.value];var temp=ltema.exttema;if(temp!==""&&temp!=undefined){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$(no).addClass(i3GEO.arvoreDeCamadas.config.verificaAbrangencia)}else{$(no).removeClass(i3GEO.arvoreDeCamadas.config.verificaAbrangencia)}}})},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore","dependencias.php","i3GEOF.excluirarvore.iniciaJanelaFlutuante()")}}}; |
260 | 260 | // |
261 | 261 | //compactados/navega_compacto.js |
262 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:[],redo:[],posicao:0,emAcao:false},ativaPan:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}if(i3GEO.Interface.ATUAL==="openlayers"){marcadorZoom="";i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}},registraExt:function(ext){if(i3GEO.navega.EXTENSOES.emAcao==false){var l=i3GEO.navega.EXTENSOES.lista,n=l.length;if(n>10){l.shift()}n=l.length;if(n>0&&l[n-1]===ext){return}l.push(ext)}else{i3GEO.navega.EXTENSOES.emAcao=false}},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;if(l.length>0){if(l.length>1){e=l.pop();i3GEO.navega.zoomExt("","","",e);if(r.length>10){r.shift()}if(r.length>0&&r[r.length-1]===e){return}else{r.push(a)}}}else{l.push(i3GEO.parametros.mapexten)}},extensaoProximo:function(){var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;i3GEO.navega.EXTENSOES.emAcao=true;if(r.length>0){i3GEO.navega.zoomExt("","","",r[r.length-1]);e=r.pop();if(l.length>10){l.pop()}if(l.length>0&&l[l.length-1]===e){return}l.push(a)}},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){var t=$i("i3GeoCentroDoMapa");if(t&&t.style.display==="block"){return}if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},removeCookieExtensao:function(){var nomecookie="i3geoOLUltimaExtensao";if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}i3GEO.util.insereCookie(nomecookie,"")},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);i3GEO.php.mudaext(function(retorno){i3GEO.atualiza(retorno)},tipoimagem,ext)},aplicaEscala:function(escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true);i3GEO.parametros.mapscale=parseInt(i3geoOL.getScale(),10)}},atualizaEscalaNumerica:function(escala){var e=$i("i3GEOescalanum");if(!e){return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},panFixo:function(){alert("panFixo foi depreciado na versao 6.0")},mostraRosaDosVentos:function(){alert("mostraRosaDosVentos foi depreciado na versao 6.0")},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){alert("zoomBox depreciado na versao 6.0")}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){if(i3GEO.navega.lente.ESTAATIVA!="nao"){i3GEO.navega.lente.desativa();return}var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"])},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"]);i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"])},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)'}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(200,150,"","center","center","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x50")+"</span></div>","ativadesativaDestaque",false,"hd","","","",true,"","","","");$i(janela[2].id).innerHTML="<div class='container-fluid'>"+"<h5 class='alert alert-info'>"+$trad("x91")+"</h5>"+"<div class='form-group condensed'>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO + 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO - 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>"+"</div></div>";$(janela[0].close).click(i3GEO.navega.destacaTema.desativa);i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"])},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"]);i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){alert("barraDeZoom depreciado na versao 6.0")}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos","dependencias.php","i3GEOF.buscaFotos.iniciaJanelaFlutuante()")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;var temp,janela,idgoogle="googlemaps"+Math.random();janela=i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >Google maps</span></div>",idgoogle,false,"hd","","","",false,"","","","","68");temp=function(){i3GEO.desenho.removePins("boxOndeGoogle");i3GEO.desenho.removePins("googlemaps")};$(janela[0].close).click(temp)},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}},atualizaGoogle:function(idgoogle){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.atualizaGoogle('"+idgoogle+"')"]);i3GEO.desenho.removePins("googlemaps");i3GEO.desenho.removePins("boxOndeGoogle")}}}; | |
262 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:[],redo:[],posicao:0,emAcao:false},ativaPan:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}if(i3GEO.Interface.ATUAL==="openlayers"){marcadorZoom="";i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}},registraExt:function(ext){if(i3GEO.navega.EXTENSOES.emAcao==false){var l=i3GEO.navega.EXTENSOES.lista,n=l.length;if(n>10){l.shift()}n=l.length;if(n>0&&l[n-1]===ext){return}l.push(ext)}else{i3GEO.navega.EXTENSOES.emAcao=false}},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;if(l.length>0){if(l.length>1){e=l.pop();i3GEO.navega.zoomExt("","","",e);if(r.length>10){r.shift()}if(r.length>0&&r[r.length-1]===e){return}else{r.push(a)}}}else{l.push(i3GEO.parametros.mapexten)}},extensaoProximo:function(){var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;i3GEO.navega.EXTENSOES.emAcao=true;if(r.length>0){i3GEO.navega.zoomExt("","","",r[r.length-1]);e=r.pop();if(l.length>10){l.pop()}if(l.length>0&&l[l.length-1]===e){return}l.push(a)}},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){var t=$i("i3GeoCentroDoMapa");if(t&&t.style.display==="block"){return}if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},removeCookieExtensao:function(){var nomecookie="i3geoOLUltimaExtensao";if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}i3GEO.util.insereCookie(nomecookie,"")},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);i3GEO.php.mudaext(function(retorno){i3GEO.atualiza(retorno)},tipoimagem,ext)},aplicaEscala:function(escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true);i3GEO.parametros.mapscale=parseInt(i3geoOL.getScale(),10)}},atualizaEscalaNumerica:function(escala){var e=$i("i3GEOescalanum");if(!e){return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},panFixo:function(){alert("panFixo foi depreciado na versao 6.0")},mostraRosaDosVentos:function(){alert("mostraRosaDosVentos foi depreciado na versao 6.0")},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){alert("zoomBox depreciado na versao 6.0")}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){if(i3GEO.navega.lente.ESTAATIVA!="nao"){i3GEO.navega.lente.desativa();return}var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"])},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"]);i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"])},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)'}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(200,150,"","center","center","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x50")+"</span></div>","ativadesativaDestaque",false,"hd","","","",true,"","","","");$i(janela[2].id).innerHTML="<div class='container-fluid'>"+"<h5 class='alert alert-info'>"+$trad("x91")+"</h5>"+"<div class='form-group condensed'>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO + 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO - 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>"+"</div></div>";$(janela[0].close).click(i3GEO.navega.destacaTema.desativa);i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"])},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"]);i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){alert("barraDeZoom depreciado na versao 6.0")}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos","dependencias.php","i3GEOF.buscaFotos.iniciaJanelaFlutuante()")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;var temp,janela,idgoogle="googlemaps"+Math.random();janela=i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >Google maps</span></div>",idgoogle,false,"hd","","","",false,"","","","","68");temp=function(){i3GEO.desenho.removePins("boxOndeGoogle");i3GEO.desenho.removePins("googlemaps")};$(janela[0].close).click(temp)},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}},atualizaGoogle:function(idgoogle){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.atualizaGoogle('"+idgoogle+"')"]);i3GEO.desenho.removePins("googlemaps");i3GEO.desenho.removePins("boxOndeGoogle")}},dragZoom:function(){i3GEO.navega.dragZoom.draw=new ol.interaction.Draw({type:"Circle",freehand:false,geometryFunction:ol.interaction.Draw.createRegularPolygon(4)});i3GEO.navega.dragZoom.draw.setActive(false);i3GEO.navega.dragZoom.draw.on("drawend",function(evt){var pol=evt.feature.getGeometry();i3geoOL.getView().fit(pol);i3GEO.navega.dragZoom.draw.setActive(false)});document.body.addEventListener('keydown',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(true)}});document.body.addEventListener('keyup',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(false)}});return i3GEO.navega.dragZoom.draw}}; | |
263 | 263 | // |
264 | 264 | //compactados/eventos_compacto.js |
265 | 265 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}var objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={CONTATOUCH:0,RESIZE:[],SELECAO:[],ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:[],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:["i3GEO.eventos.cliquePerm.executa()"],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],MOUSECLIQUEPERM:["i3GEO.mapa.dialogo.verificaTipDefault()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(exy){if(!exy){i3GEO.eventos.executaEventos(this.MOUSEUP)}else{if(i3GEO.Interface.ATUAL==="googlemaps"&&exy.target&&!exy.target.src){if(i3GEOtouchesPosMapa===""){i3GEOtouchesPosMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}pos=i3GEOtouchesPosMapa;p=new google.maps.Point(exy.clientX-pos[0],exy.clientY-pos[1]);e=null;lonlat=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(p);if(lonlat){objposicaocursor.ddx=lonlat.lng();objposicaocursor.ddy=lonlat.lat()}i3GEO.eventos.executaEventos(this.MOUSEUP)}else if(i3GEO.Interface.ATUAL==="openlayers"&&exy.target&&exy.target.tagName==="CANVAS"){i3GEO.eventos.executaEventos(this.MOUSEUP)}}},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},resizeMapa:function(){i3GEO.eventos.executaEventos(this.RESIZE)},executaEventos:function(eventos){if(i3GEO.Interface.STATUS.pan===true){return}var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){if(typeof(eventos[f])==="function"){eventos[f].call()}else{eval(eventos[f])}}}while(f--)}}}catch(e){eventos[f]=""}},removeEventos:function(tipo,eventos){var i,n=eventos.length;for(i=0;i<n;i++){i3GEO.eventos[tipo].remove(eventos[i])}i3GEO.eventos[tipo].remove("");i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique()},adicionaEventos:function(tipo,eventos){if(eventos==""){i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique();return}var i,n=eventos.length;for(i=0;i<n;i++){i3GEO.eventos[tipo].push(eventos[i])}i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique()},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){return}if(container!=="mapaReferencia"){return}pos=i3GEO.util.pegaPosicaoObjeto(targ);mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){if(!docMapa){return}var timer=0;var delay=300;var prevent=false;docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.cliquePerm.status=true;i3GEO.eventos.posicaoMouseMapa(exy);try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=false};docMapa.onmousedown=function(exy){if(objposicaocursor.dentroDomapa===false){return}i3GEO.eventos.mousedownMapa()};docMapa.onclick=function(exy){if(objposicaocursor.dentroDomapa===false){return}i3GEO.eventos.mousecliqueMapa(exy)};docMapa.ondblclick=function(){if(objposicaocursor.dentroDomapa===false){return}clearTimeout(timer);prevent=true};docMapa.onmouseup=function(exy){if(objposicaocursor.dentroDomapa===false){return}if(i3GEO.Interface.ATUAL==="googlemaps"){if(modoAtual==="move"){modoAtual="";return}}i3GEO.eventos.cliquePerm.status=true;timer=setTimeout(function(){if(!prevent){i3GEO.eventos.mouseupMapa(exy)}prevent=false},delay)};docMapa.ontouchmove=function(exy){i3GEO.eventos.CONTATOUCH++;i3GEO.Interface.STATUS.pan=true;i3GEO.eventos.posicaoMouseMapa(exy)};docMapa.ontouchcancel=function(exy){i3GEO.eventos.CONTATOUCH=0}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}},cliquePerm:{ativo:true,status:true,executa:function(evt){if(i3GEO.eventos.cliquePerm.ativo===true&&i3GEO.eventos.cliquePerm.status===true){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUEPERM)}},ativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=true}},desativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=false}},ativoinicial:true}}; | ... | ... |
js/i3geo_tudo_compacto7.js.php
... | ... | @@ -259,7 +259,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={LARGURAGUIAMOVEL:350,C |
259 | 259 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true,storymap:true,animagif:true},CAMADAS:"",FILTRO:"",CAMADASINDEXADAS:[],config:{"idOnde":"listaTemas","aposIniciar":"","templateCamada":"templates/camada.html","idListaFundo":"","templateCamadaFundo":"templates/camadaFundo.html","verificaAbrangencia":""},nget:0,carregaTemplates:function(){if(i3GEO.arvoreDeCamadas.nget==0){i3GEO.arvoreDeCamadas.nget=2;if(!i3GEO.template.camada){$.get(i3GEO.arvoreDeCamadas.config.templateCamada,function(template){i3GEO.template.camada=template;i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1;if(i3GEO.arvoreDeCamadas.nget==0){i3GEO.arvoreDeCamadas.inicia()}})}else{i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1}if(!i3GEO.template.camadaFundo){$.get(i3GEO.arvoreDeCamadas.config.templateCamadaFundo,function(template){i3GEO.template.camadaFundo=template;i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1;if(i3GEO.arvoreDeCamadas.nget==0){i3GEO.arvoreDeCamadas.inicia()}})}else{i3GEO.arvoreDeCamadas.nget=i3GEO.arvoreDeCamadas.nget-1}}},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.arvoreDeCamadas.config[i]=v})}if(!i3GEO.template.camada||!i3GEO.template.camadaFundo){i3GEO.arvoreDeCamadas.carregaTemplates();return}else{config=i3GEO.arvoreDeCamadas.config;var novoel,temp;i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS);if(!$i(config.idOnde)){return}if(config.verificaAbrangencia!=""){i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"])}if(config.aposIniciar!==""){if(jQuery.isFunction(config.aposIniciar)){config.aposIniciar.call()}}}},atualiza:function(temas,forca){if(i3GEO.template.camada==undefined){return}if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var clone=[],camada={},config=i3GEO.arvoreDeCamadas.config,temp;temp=$i(config.idOnde);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}i3GEO.arvoreDeCamadas.CAMADAS=temas;i3GEO.arvoreDeCamadas.CAMADASINDEXADAS=[];$.each(i3GEO.arvoreDeCamadas.CAMADAS,function(i,tema){var mostra=true;i3GEO.pluginI3geo.aplicaPropriedades(tema);camada={};camada.name=tema.name;camada.tema=tema.tema;if(tema.status!=0){camada.checked="checked"}else{camada.checked=""}if(tema.sel&&tema.sel.toLowerCase()==="sim"){camada.classeCss="camadaSelecionada"}else{camada.classeCss=""}if(temp&&i3GEO.arvoreDeCamadas.FILTRO!==""){if(i3GEO.arvoreDeCamadas.FILTRO==="desligados"&&camada.checked=="checked"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="ligados"&&camada.checked==""){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="wms"&&tema.connectiontype*1!==7){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="raster"&&tema.type*1!==3){mostra=false}if(i3GEO.arvoreDeCamadas.FILTRO==="toponimia"&&tema.type*1!==4){mostra=false}}if(temp&&mostra==true){i3GEO.arvoreDeCamadas.montaIconesTema(tema,camada);i3GEO.arvoreDeCamadas.montaOpcoesTema(tema,camada);if(tema.iconetema!==""){camada.iconetema="<img class='i3GEOiconeTema' src='"+tema.iconetema+"' />"}if(tema.escondido.toLowerCase()!=="sim"){clone.push(camada)}}i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[camada.name]=tema});if(temp){var t=Mustache.render("{{#data}}"+i3GEO.template.camada+"{{/data}}",{"data":clone});$("#"+config.idOnde).html(t);$("#"+config.idOnde).sortable({scroll:false,axis:"y",revert:true,update:function(event,ui){var els=i3GEO.arvoreDeCamadas.listaLigadosDesligadosArvore(config.idOnde);var lista=els[2].join(",");var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)};i3GEO.php.reordenatemas(temp,lista)}})}i3GEO.arvoreDeCamadas.adicionaCamadasDeFundo(config);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},adicionaCamadasDeFundo:function(config){if(i3GEO.Interface.ATUAL=="openlayers"){var temp=temp=$i(config.idOnde);if(temp&&$("#"+config.idListaFundo).html()==""){clone=[{"name":"camadaDeFundo","value":"nenhum","title":$trad("nenhum")}];$.each(i3GEO.Interface.openlayers.LAYERSADICIONAIS,function(i,layer){camada={};temp=layer.getProperties();camada.name="camadaDeFundo";if(temp.preview){camada.preview=temp.preview}else{camada.preview=""}camada.value=temp.name;camada.title=temp.title;if(temp.visible===true){camada.checked="checked"}else{camada.checked=""}clone.push(camada)});var t=Mustache.to_html("{{#data}}"+i3GEO.template.camadaFundo+"{{/data}}",{"data":clone});$("#"+config.idListaFundo).html(t);$("#"+config.idListaFundo+" label").tooltip({animation:false,trigger:"hover",placement:"auto",html:true,template:"<div class='tooltip ' ><div class='tooltip-inner'></div></div>"})}}},ligaDesligaTemas:function(lista,status){},atualizaLegenda:function(idtema){},montaTextoTema:function(tema){if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},montaOpcoesTema:function(temaObj,camada){camada.ferramentasTexto=$trad("u15a");camada.ferramentasTitle=$trad("ferramCamadas");camada.removerTexto=$trad("t12");camada.removerTitle=$trad("t12a");camada.sobeTexto=$trad("t13");camada.sobeTitle=$trad("t14");camada.desceTexto=$trad("t15");camada.desceTitle=$trad("t16");camada.tabelaTexto=$trad("tabela");camada.tabelaTitle=$trad("t30");camada.editorlegendaTexto=$trad("t33");if(temaObj.zoomtema.toLowerCase()==="sim"){camada.zoomtemaTexto=$trad("t17");camada.zoomtemaTitle=$trad("t18")}else{camada.zoomtema="hidden"}if(temaObj.sel.toLowerCase()==="sim"){camada.selTexto=$trad("t5");camada.selTitle=$trad("t4")}else{camada.sel="hidden"}if(temaObj.sel.toLowerCase()==="sim"){camada.zoomSelTexto=$trad("t4a")}else{camada.zoomsel="hidden"}if(temaObj.link_tema!=""&&temaObj.features.toLowerCase()!=="sim"&&temaObj.name!="mundo"){camada.linkTexto=$trad("a9");camada.linkTitle=$trad("a9")}else{camada.link="hidden"}if(temaObj.download.toLowerCase()==="sim"||temaObj.download===""&&temaObj.features.toLowerCase()!=="sim"){camada.downloadTexto="Download";camada.downloadTitle=$trad("t6")}else{camada.download="hidden"}if(temaObj.permiteogc.toLowerCase()==="sim"){camada.permiteogcTexto="OGC"}else{camada.permiteogc="hidden"}return camada},montaIconesTema:function(temaObj,camada){if(temaObj.escala!=0){if(temaObj.escala*1<i3GEO.parametros.mapscale*1){camada.farol="green";camada.farolTitle=$trad("t9")}if(temaObj.escala*1>i3GEO.parametros.mapscale*1){camada.farol="red";camada.farolTitle=$trad("t10")}if(temaObj.escala===0){camada.farol="yellow";camada.farolTitle=$trad("t11")}}else{camada.farol="hidden"}if(temaObj.contextoescala.toLowerCase()==="sim"){camada.contextoescala="";camada.contextoescalaTitle=$trad("t36")}else{camada.contextoescala="hidden"}if(temaObj.plugini3geo){var iconePlugin=i3GEO.pluginI3geo.clickArvoreDeCamadas(temaObj);if(iconePlugin!=false){camada.iconePlugin=iconePlugin}}if(temaObj.ferramentas){var html="",fer="",fers=temaObj.ferramentas;for(fer in fers){if(i3GEO.configura.ferramentasLayers[fer]){html+=i3GEO.configura.ferramentasLayers[fer].icone(temaObj.name)}}camada.iconeFerramentas=html}return camada},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca")}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca")}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(){if(!i3GEO.arvoreDeCamadas.CAMADAS){return[[],[],[]]}var i=0,ligados=[],desligados=[],todos=[],camada,camadas=i3GEO.arvoreDeCamadas.CAMADAS;i=camadas.length;while(i>0){i-=1;camada=camadas[i];todos.push(camada["name"]);if(parseInt(camada["status"],10)===2){ligados.push(camada["name"])}else{desligados.push(camada["name"])}}return([ligados,desligados,todos])},listaLigadosDesligadosArvore:function(onde){if(!i3GEO.arvoreDeCamadas.CAMADAS){return[[],[],[]]}var n,i,ligados=[],desligados=[],todos=[],camada,camadas;camadas=$i(onde).getElementsByTagName("input");n=camadas.length;for(i=0;i<n;i++){camada=camadas[i];todos.push(camada.value);if(camada.checked==true){ligados.push(camada["name"])}else{desligados.push(camada["name"])}}return([ligados,desligados,todos])},capturaCheckBox:function(tema){var onde=$i(i3GEO.arvoreDeCamadas.config.idOnde),camadas,n,i;if(onde){camadas=onde.getElementsByTagName("input");n=camadas.length;for(i=0;i<n;i++){if(camadas[i].name==tema){return camadas[i]}}}return false},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}var resultado,i=0,temp,nelementos=camadas.length,ltema;resultado=[];if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp+"".toLowerCase()==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="diferente"){if(temp+"".toLowerCase()!==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="menor"){if(temp+"".toLowerCase()<valor+"".toLowerCase()){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){var nos=$("#"+i3GEO.arvoreDeCamadas.config.idOnde).find("input");$.each(nos,function(i,no){var ltema=i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[no.value];var temp=ltema.exttema;if(temp!==""&&temp!=undefined){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$(no).addClass(i3GEO.arvoreDeCamadas.config.verificaAbrangencia)}else{$(no).removeClass(i3GEO.arvoreDeCamadas.config.verificaAbrangencia)}}})},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore","dependencias.php","i3GEOF.excluirarvore.iniciaJanelaFlutuante()")}}}; |
260 | 260 | // |
261 | 261 | //compactados/navega_compacto.js |
262 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:[],redo:[],posicao:0,emAcao:false},ativaPan:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}if(i3GEO.Interface.ATUAL==="openlayers"){marcadorZoom="";i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}},registraExt:function(ext){if(i3GEO.navega.EXTENSOES.emAcao==false){var l=i3GEO.navega.EXTENSOES.lista,n=l.length;if(n>10){l.shift()}n=l.length;if(n>0&&l[n-1]===ext){return}l.push(ext)}else{i3GEO.navega.EXTENSOES.emAcao=false}},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;if(l.length>0){if(l.length>1){e=l.pop();i3GEO.navega.zoomExt("","","",e);if(r.length>10){r.shift()}if(r.length>0&&r[r.length-1]===e){return}else{r.push(a)}}}else{l.push(i3GEO.parametros.mapexten)}},extensaoProximo:function(){var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;i3GEO.navega.EXTENSOES.emAcao=true;if(r.length>0){i3GEO.navega.zoomExt("","","",r[r.length-1]);e=r.pop();if(l.length>10){l.pop()}if(l.length>0&&l[l.length-1]===e){return}l.push(a)}},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){var t=$i("i3GeoCentroDoMapa");if(t&&t.style.display==="block"){return}if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},removeCookieExtensao:function(){var nomecookie="i3geoOLUltimaExtensao";if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}i3GEO.util.insereCookie(nomecookie,"")},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);i3GEO.php.mudaext(function(retorno){i3GEO.atualiza(retorno)},tipoimagem,ext)},aplicaEscala:function(escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true);i3GEO.parametros.mapscale=parseInt(i3geoOL.getScale(),10)}},atualizaEscalaNumerica:function(escala){var e=$i("i3GEOescalanum");if(!e){return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},panFixo:function(){alert("panFixo foi depreciado na versao 6.0")},mostraRosaDosVentos:function(){alert("mostraRosaDosVentos foi depreciado na versao 6.0")},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){alert("zoomBox depreciado na versao 6.0")}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){if(i3GEO.navega.lente.ESTAATIVA!="nao"){i3GEO.navega.lente.desativa();return}var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"])},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"]);i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"])},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)'}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(200,150,"","center","center","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x50")+"</span></div>","ativadesativaDestaque",false,"hd","","","",true,"","","","");$i(janela[2].id).innerHTML="<div class='container-fluid'>"+"<h5 class='alert alert-info'>"+$trad("x91")+"</h5>"+"<div class='form-group condensed'>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO + 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO - 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>"+"</div></div>";$(janela[0].close).click(i3GEO.navega.destacaTema.desativa);i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"])},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"]);i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){alert("barraDeZoom depreciado na versao 6.0")}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos","dependencias.php","i3GEOF.buscaFotos.iniciaJanelaFlutuante()")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;var temp,janela,idgoogle="googlemaps"+Math.random();janela=i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >Google maps</span></div>",idgoogle,false,"hd","","","",false,"","","","","68");temp=function(){i3GEO.desenho.removePins("boxOndeGoogle");i3GEO.desenho.removePins("googlemaps")};$(janela[0].close).click(temp)},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}},atualizaGoogle:function(idgoogle){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.atualizaGoogle('"+idgoogle+"')"]);i3GEO.desenho.removePins("googlemaps");i3GEO.desenho.removePins("boxOndeGoogle")}}}; | |
262 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={EXTENSOES:{lista:[],redo:[],posicao:0,emAcao:false},ativaPan:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true})}if(i3GEO.Interface.ATUAL==="openlayers"){marcadorZoom="";i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}},registraExt:function(ext){if(i3GEO.navega.EXTENSOES.emAcao==false){var l=i3GEO.navega.EXTENSOES.lista,n=l.length;if(n>10){l.shift()}n=l.length;if(n>0&&l[n-1]===ext){return}l.push(ext)}else{i3GEO.navega.EXTENSOES.emAcao=false}},extensaoAnterior:function(){i3GEO.navega.EXTENSOES.emAcao=true;var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;if(l.length>0){if(l.length>1){e=l.pop();i3GEO.navega.zoomExt("","","",e);if(r.length>10){r.shift()}if(r.length>0&&r[r.length-1]===e){return}else{r.push(a)}}}else{l.push(i3GEO.parametros.mapexten)}},extensaoProximo:function(){var l=i3GEO.navega.EXTENSOES.lista,r=i3GEO.navega.EXTENSOES.redo,a=i3GEO.parametros.mapexten,e;i3GEO.navega.EXTENSOES.emAcao=true;if(r.length>0){i3GEO.navega.zoomExt("","","",r[r.length-1]);e=r.pop();if(l.length>10){l.pop()}if(l.length>0&&l[l.length-1]===e){return}l.push(a)}},pan2ponto:function(x,y){i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(x,y);i3GEO.Interface[i3GEO.Interface.ATUAL].recalcPar()},centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){var t=$i("i3GeoCentroDoMapa");if(t&&t.style.display==="block"){return}if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},removeCookieExtensao:function(){var nomecookie="i3geoOLUltimaExtensao";if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}i3GEO.util.insereCookie(nomecookie,"")},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.zoomponto(i3GEO.atualiza,x,y,tamanho,simbolo,cor)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{i3GEO.janela.tempoMsg("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){var f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}ext=i3GEO.util.extGeo2OSM(ext);i3GEO.php.mudaext(function(retorno){i3GEO.atualiza(retorno)},tipoimagem,ext)},aplicaEscala:function(escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true);i3GEO.parametros.mapscale=parseInt(i3geoOL.getScale(),10)}},atualizaEscalaNumerica:function(escala){var e=$i("i3GEOescalanum");if(!e){return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},panFixo:function(){alert("panFixo foi depreciado na versao 6.0")},mostraRosaDosVentos:function(){alert("mostraRosaDosVentos foi depreciado na versao 6.0")},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){alert("zoomBox depreciado na versao 6.0")}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){if(i3GEO.navega.lente.ESTAATIVA!="nao"){i3GEO.navega.lente.desativa();return}var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"])},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){i3GEO.janela.tempoMsg("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.lente.movimenta()"]);i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.lente.atualiza()"])},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0px 75px 75px 0px)'}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(200,150,"","center","center","<span class='i3GeoTituloJanelaBsNolink' >"+$trad("x50")+"</span></div>","ativadesativaDestaque",false,"hd","","","",true,"","","","");$i(janela[2].id).innerHTML="<div class='container-fluid'>"+"<h5 class='alert alert-info'>"+$trad("x91")+"</h5>"+"<div class='form-group condensed'>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO + 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>add_circle_outline</span></button>"+"<button onclick='i3GEO.navega.destacaTema.TAMANHO = i3GEO.navega.destacaTema.TAMANHO - 20' class='btn btn-xs' style='margin:2px;padding:2px;'><span class='material-icons'>remove_circle_outline</span></button>"+"</div></div>";$(janela[0].close).click(i3GEO.navega.destacaTema.desativa);i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"])},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.destacaTema.atualiza()"]);i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.navega.destacaTema.movimenta()"]);i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+"px "+(objposicaocursor.imgx-10)+"px "+(objposicaocursor.imgy-10)+"px "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+'px)'}}},barraDeZoom:{cria:function(){alert("barraDeZoom depreciado na versao 6.0")}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki","dependencias.php","i3GEOF.wiki.iniciaJanelaFlutuante()")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar","dependencias.php","i3GEOF.metar.iniciaJanelaFlutuante()")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos","dependencias.php","i3GEOF.buscaFotos.iniciaJanelaFlutuante()")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;var temp,janela,idgoogle="googlemaps"+Math.random();janela=i3GEO.janela.cria((i3GEO.parametros.w/2.5)+25+"px",(i3GEO.parametros.h/2.5)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps1/index.php","","","<span class='i3GeoTituloJanelaBsNolink' >Google maps</span></div>",idgoogle,false,"hd","","","",false,"","","","","68");temp=function(){i3GEO.desenho.removePins("boxOndeGoogle");i3GEO.desenho.removePins("googlemaps")};$(janela[0].close).click(temp)},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence","dependencias.php","i3GEOF.confluence.iniciaJanelaFlutuante()")}},atualizaGoogle:function(idgoogle){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.removeEventos("NAVEGAMAPA",["i3GEO.navega.atualizaGoogle('"+idgoogle+"')"]);i3GEO.desenho.removePins("googlemaps");i3GEO.desenho.removePins("boxOndeGoogle")}},dragZoom:function(){i3GEO.navega.dragZoom.draw=new ol.interaction.Draw({type:"Circle",freehand:false,geometryFunction:ol.interaction.Draw.createRegularPolygon(4)});i3GEO.navega.dragZoom.draw.setActive(false);i3GEO.navega.dragZoom.draw.on("drawend",function(evt){var pol=evt.feature.getGeometry();i3geoOL.getView().fit(pol);i3GEO.navega.dragZoom.draw.setActive(false)});document.body.addEventListener('keydown',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(true)}});document.body.addEventListener('keyup',function(event){if(event.keyCode==16){i3GEO.navega.dragZoom.draw.setActive(false)}});return i3GEO.navega.dragZoom.draw}}; | |
263 | 263 | // |
264 | 264 | //compactados/eventos_compacto.js |
265 | 265 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}var objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={CONTATOUCH:0,RESIZE:[],SELECAO:[],ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:[],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:["i3GEO.eventos.cliquePerm.executa()"],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],MOUSECLIQUEPERM:["i3GEO.mapa.dialogo.verificaTipDefault()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(exy){if(!exy){i3GEO.eventos.executaEventos(this.MOUSEUP)}else{if(i3GEO.Interface.ATUAL==="googlemaps"&&exy.target&&!exy.target.src){if(i3GEOtouchesPosMapa===""){i3GEOtouchesPosMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}pos=i3GEOtouchesPosMapa;p=new google.maps.Point(exy.clientX-pos[0],exy.clientY-pos[1]);e=null;lonlat=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(p);if(lonlat){objposicaocursor.ddx=lonlat.lng();objposicaocursor.ddy=lonlat.lat()}i3GEO.eventos.executaEventos(this.MOUSEUP)}else if(i3GEO.Interface.ATUAL==="openlayers"&&exy.target&&exy.target.tagName==="CANVAS"){i3GEO.eventos.executaEventos(this.MOUSEUP)}}},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},resizeMapa:function(){i3GEO.eventos.executaEventos(this.RESIZE)},executaEventos:function(eventos){if(i3GEO.Interface.STATUS.pan===true){return}var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){if(typeof(eventos[f])==="function"){eventos[f].call()}else{eval(eventos[f])}}}while(f--)}}}catch(e){eventos[f]=""}},removeEventos:function(tipo,eventos){var i,n=eventos.length;for(i=0;i<n;i++){i3GEO.eventos[tipo].remove(eventos[i])}i3GEO.eventos[tipo].remove("");i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique()},adicionaEventos:function(tipo,eventos){if(eventos==""){i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique();return}var i,n=eventos.length;for(i=0;i<n;i++){i3GEO.eventos[tipo].push(eventos[i])}i3GEO.eventos[tipo]=i3GEO.eventos[tipo].getUnique()},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){return}if(container!=="mapaReferencia"){return}pos=i3GEO.util.pegaPosicaoObjeto(targ);mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){if(!docMapa){return}var timer=0;var delay=300;var prevent=false;docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.cliquePerm.status=true;i3GEO.eventos.posicaoMouseMapa(exy);try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=false};docMapa.onmousedown=function(exy){if(objposicaocursor.dentroDomapa===false){return}i3GEO.eventos.mousedownMapa()};docMapa.onclick=function(exy){if(objposicaocursor.dentroDomapa===false){return}i3GEO.eventos.mousecliqueMapa(exy)};docMapa.ondblclick=function(){if(objposicaocursor.dentroDomapa===false){return}clearTimeout(timer);prevent=true};docMapa.onmouseup=function(exy){if(objposicaocursor.dentroDomapa===false){return}if(i3GEO.Interface.ATUAL==="googlemaps"){if(modoAtual==="move"){modoAtual="";return}}i3GEO.eventos.cliquePerm.status=true;timer=setTimeout(function(){if(!prevent){i3GEO.eventos.mouseupMapa(exy)}prevent=false},delay)};docMapa.ontouchmove=function(exy){i3GEO.eventos.CONTATOUCH++;i3GEO.Interface.STATUS.pan=true;i3GEO.eventos.posicaoMouseMapa(exy)};docMapa.ontouchcancel=function(exy){i3GEO.eventos.CONTATOUCH=0}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}},cliquePerm:{ativo:true,status:true,executa:function(evt){if(i3GEO.eventos.cliquePerm.ativo===true&&i3GEO.eventos.cliquePerm.status===true){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUEPERM)}},ativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=true}},desativa:function(){if(i3GEO.eventos.cliquePerm.ativoinicial===true){i3GEO.eventos.cliquePerm.ativo=false}},ativoinicial:true}}; | ... | ... |
js/navega.js
... | ... | @@ -33,7 +33,7 @@ if (typeof (i3GEO) === 'undefined') { |
33 | 33 | var i3GEO = {}; |
34 | 34 | } |
35 | 35 | i3GEO.navega = |
36 | - { | |
36 | +{ | |
37 | 37 | /** |
38 | 38 | * Guarda as ultimas extensoes geograficas das operacoes de navegacao |
39 | 39 | */ |
... | ... | @@ -66,7 +66,7 @@ i3GEO.navega = |
66 | 66 | |
67 | 67 | if(i3GEO.navega.EXTENSOES.emAcao == false){ |
68 | 68 | var l = i3GEO.navega.EXTENSOES.lista, |
69 | - n = l.length; | |
69 | + n = l.length; | |
70 | 70 | //precisa ter cuidado para nao registrar a mesma extensao atual |
71 | 71 | if (n > 10){ |
72 | 72 | l.shift(); |
... | ... | @@ -91,9 +91,9 @@ i3GEO.navega = |
91 | 91 | i3GEO.navega.EXTENSOES.emAcao = true; |
92 | 92 | |
93 | 93 | var l = i3GEO.navega.EXTENSOES.lista, |
94 | - r = i3GEO.navega.EXTENSOES.redo, | |
95 | - a = i3GEO.parametros.mapexten, | |
96 | - e; | |
94 | + r = i3GEO.navega.EXTENSOES.redo, | |
95 | + a = i3GEO.parametros.mapexten, | |
96 | + e; | |
97 | 97 | if(l.length > 0){ |
98 | 98 | if(l.length > 1){ |
99 | 99 | e = l.pop(); |
... | ... | @@ -172,7 +172,7 @@ i3GEO.navega = |
172 | 172 | return [ |
173 | 173 | xy.lon, |
174 | 174 | xy.lat |
175 | - ]; | |
175 | + ]; | |
176 | 176 | } else { |
177 | 177 | return false; |
178 | 178 | } |
... | ... | @@ -183,7 +183,7 @@ i3GEO.navega = |
183 | 183 | return [ |
184 | 184 | xy.lng(), |
185 | 185 | xy.lat() |
186 | - ]; | |
186 | + ]; | |
187 | 187 | } else { |
188 | 188 | return false; |
189 | 189 | } |
... | ... | @@ -203,11 +203,11 @@ i3GEO.navega = |
203 | 203 | if (xy != false) { |
204 | 204 | xy = |
205 | 205 | i3GEO.calculo.dd2tela( |
206 | - xy[0] * 1, | |
207 | - xy[1] * 1, | |
208 | - $i(i3GEO.Interface.IDMAPA), | |
209 | - i3GEO.parametros.mapexten, | |
210 | - i3GEO.parametros.pixelsize); | |
206 | + xy[0] * 1, | |
207 | + xy[1] * 1, | |
208 | + $i(i3GEO.Interface.IDMAPA), | |
209 | + i3GEO.parametros.mapexten, | |
210 | + i3GEO.parametros.pixelsize); | |
211 | 211 | i3GEO.util.criaPin("i3GeoCentroDoMapa", i3GEO.configura.locaplic + '/imagens/alvo.png', '30px', '30px'); |
212 | 212 | i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa", xy[0], xy[1]); |
213 | 213 | } |
... | ... | @@ -308,7 +308,7 @@ i3GEO.navega = |
308 | 308 | clearTimeout(i3GEO.navega.timerNavega); |
309 | 309 | } |
310 | 310 | i3GEO.navega.timerNavega = setTimeout(f, i3GEO.navega.TEMPONAVEGAR); |
311 | - */ | |
311 | + */ | |
312 | 312 | }, |
313 | 313 | /** |
314 | 314 | * Function: zoompontoIMG |
... | ... | @@ -471,11 +471,11 @@ i3GEO.navega = |
471 | 471 | // verifica se nao e necessario alterar as coordenadas |
472 | 472 | ext = i3GEO.util.extGeo2OSM(ext); |
473 | 473 | i3GEO.php.mudaext( |
474 | - function(retorno){ | |
475 | - i3GEO.atualiza(retorno); | |
476 | - }, | |
477 | - tipoimagem, | |
478 | - ext | |
474 | + function(retorno){ | |
475 | + i3GEO.atualiza(retorno); | |
476 | + }, | |
477 | + tipoimagem, | |
478 | + ext | |
479 | 479 | ); |
480 | 480 | }, |
481 | 481 | /** |
... | ... | @@ -780,7 +780,7 @@ i3GEO.navega = |
780 | 780 | var pos = [ |
781 | 781 | 0, |
782 | 782 | 0 |
783 | - ], esq, topo, clipt, i; | |
783 | + ], esq, topo, clipt, i; | |
784 | 784 | if ($i("lente").style.visibility === "visible") { |
785 | 785 | pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)); |
786 | 786 | } |
... | ... | @@ -863,23 +863,23 @@ i3GEO.navega = |
863 | 863 | i3GEO.navega.destacaTema.ESTAATIVO = "sim"; |
864 | 864 | i3GEO.navega.destacaTema.atualiza(); |
865 | 865 | janela = i3GEO.janela.cria( |
866 | - 200, | |
867 | - 150, | |
868 | - "", | |
869 | - "center", | |
870 | - "center", | |
871 | - "<span class='i3GeoTituloJanelaBsNolink' >" + $trad("x50") + "</span></div>", | |
872 | - "ativadesativaDestaque", | |
873 | - false, | |
874 | - "hd", | |
875 | - "", | |
876 | - "", | |
877 | - "", | |
878 | - true, | |
879 | - "", | |
880 | - "", | |
881 | - "", | |
882 | - "" | |
866 | + 200, | |
867 | + 150, | |
868 | + "", | |
869 | + "center", | |
870 | + "center", | |
871 | + "<span class='i3GeoTituloJanelaBsNolink' >" + $trad("x50") + "</span></div>", | |
872 | + "ativadesativaDestaque", | |
873 | + false, | |
874 | + "hd", | |
875 | + "", | |
876 | + "", | |
877 | + "", | |
878 | + true, | |
879 | + "", | |
880 | + "", | |
881 | + "", | |
882 | + "" | |
883 | 883 | ); |
884 | 884 | $i(janela[2].id).innerHTML = "<div class='container-fluid'>" |
885 | 885 | + "<h5 class='alert alert-info'>" + $trad("x91") + "</h5>" |
... | ... | @@ -946,7 +946,7 @@ i3GEO.navega = |
946 | 946 | if (i3GEO.navega.destacaTema.ESTAATIVO === "sim") { |
947 | 947 | $i("div_d").style.clip = |
948 | 948 | 'rect(' + (objposicaocursor.imgy - i3GEO.navega.destacaTema.TAMANHO) + "px " + (objposicaocursor.imgx - 10) + "px " |
949 | - + (objposicaocursor.imgy - 10) + "px " + (objposicaocursor.imgx - i3GEO.navega.destacaTema.TAMANHO) + 'px)'; | |
949 | + + (objposicaocursor.imgy - 10) + "px " + (objposicaocursor.imgx - i3GEO.navega.destacaTema.TAMANHO) + 'px)'; | |
950 | 950 | } |
951 | 951 | } |
952 | 952 | }, |
... | ... | @@ -968,11 +968,11 @@ i3GEO.navega = |
968 | 968 | */ |
969 | 969 | wiki : function() { |
970 | 970 | i3GEO.util.dialogoFerramenta( |
971 | - "i3GEO.navega.dialogo.wiki()", | |
972 | - "wiki", | |
973 | - "wiki", | |
974 | - "dependencias.php", | |
975 | - "i3GEOF.wiki.iniciaJanelaFlutuante()"); | |
971 | + "i3GEO.navega.dialogo.wiki()", | |
972 | + "wiki", | |
973 | + "wiki", | |
974 | + "dependencias.php", | |
975 | + "i3GEOF.wiki.iniciaJanelaFlutuante()"); | |
976 | 976 | }, |
977 | 977 | /** |
978 | 978 | * Function: metar |
... | ... | @@ -982,11 +982,11 @@ i3GEO.navega = |
982 | 982 | */ |
983 | 983 | metar : function() { |
984 | 984 | i3GEO.util.dialogoFerramenta( |
985 | - "i3GEO.navega.dialogo.metar()", | |
986 | - "metar", | |
987 | - "metar", | |
988 | - "dependencias.php", | |
989 | - "i3GEOF.metar.iniciaJanelaFlutuante()"); | |
985 | + "i3GEO.navega.dialogo.metar()", | |
986 | + "metar", | |
987 | + "metar", | |
988 | + "dependencias.php", | |
989 | + "i3GEOF.metar.iniciaJanelaFlutuante()"); | |
990 | 990 | }, |
991 | 991 | /** |
992 | 992 | * Function: buscaFotos |
... | ... | @@ -996,11 +996,11 @@ i3GEO.navega = |
996 | 996 | */ |
997 | 997 | buscaFotos : function() { |
998 | 998 | i3GEO.util.dialogoFerramenta( |
999 | - "i3GEO.navega.dialogo.buscaFotos()", | |
1000 | - "buscafotos", | |
1001 | - "buscaFotos", | |
1002 | - "dependencias.php", | |
1003 | - "i3GEOF.buscaFotos.iniciaJanelaFlutuante()" | |
999 | + "i3GEO.navega.dialogo.buscaFotos()", | |
1000 | + "buscafotos", | |
1001 | + "buscaFotos", | |
1002 | + "dependencias.php", | |
1003 | + "i3GEOF.buscaFotos.iniciaJanelaFlutuante()" | |
1004 | 1004 | ); |
1005 | 1005 | }, |
1006 | 1006 | /** |
... | ... | @@ -1054,11 +1054,11 @@ i3GEO.navega = |
1054 | 1054 | */ |
1055 | 1055 | confluence : function() { |
1056 | 1056 | i3GEO.util.dialogoFerramenta( |
1057 | - "i3GEO.navega.dialogo.confluence()", | |
1058 | - "confluence", | |
1059 | - "confluence", | |
1060 | - "dependencias.php", | |
1061 | - "i3GEOF.confluence.iniciaJanelaFlutuante()"); | |
1057 | + "i3GEO.navega.dialogo.confluence()", | |
1058 | + "confluence", | |
1059 | + "confluence", | |
1060 | + "dependencias.php", | |
1061 | + "i3GEOF.confluence.iniciaJanelaFlutuante()"); | |
1062 | 1062 | } |
1063 | 1063 | }, |
1064 | 1064 | atualizaGoogle : function(idgoogle) { |
... | ... | @@ -1069,5 +1069,30 @@ i3GEO.navega = |
1069 | 1069 | i3GEO.desenho.removePins("googlemaps"); |
1070 | 1070 | i3GEO.desenho.removePins("boxOndeGoogle"); |
1071 | 1071 | } |
1072 | + }, | |
1073 | + //implementado apenas para OpenLayers | |
1074 | + dragZoom : function(){ | |
1075 | + i3GEO.navega.dragZoom.draw = new ol.interaction.Draw({ | |
1076 | + type : "Circle", | |
1077 | + freehand: false, | |
1078 | + geometryFunction: ol.interaction.Draw.createRegularPolygon(4) | |
1079 | + }); | |
1080 | + i3GEO.navega.dragZoom.draw.setActive(false); | |
1081 | + i3GEO.navega.dragZoom.draw.on("drawend",function(evt){ | |
1082 | + var pol = evt.feature.getGeometry(); | |
1083 | + i3geoOL.getView().fit(pol); | |
1084 | + i3GEO.navega.dragZoom.draw.setActive(false); | |
1085 | + }); | |
1086 | + document.body.addEventListener('keydown', function(event) { | |
1087 | + if (event.keyCode == 16) { | |
1088 | + i3GEO.navega.dragZoom.draw.setActive(true); | |
1089 | + } | |
1090 | + }); | |
1091 | + document.body.addEventListener('keyup', function(event) { | |
1092 | + if (event.keyCode == 16) { | |
1093 | + i3GEO.navega.dragZoom.draw.setActive(false); | |
1094 | + } | |
1095 | + }); | |
1096 | + return i3GEO.navega.dragZoom.draw; | |
1072 | 1097 | } |
1073 | - }; | |
1074 | 1098 | \ No newline at end of file |
1099 | +}; | |
1075 | 1100 | \ No newline at end of file | ... | ... |
ms_configura.php
... | ... | @@ -168,7 +168,7 @@ $i3geoEsquemasWL = array(); |
168 | 168 | Para nao expor o endereco das pastas nos formularios, cada pasta recebe um apelido. |
169 | 169 | |
170 | 170 | No caso dos esquemas, o nome e o mesmo existente no banco. Alem dos esquemas e necessario fornecer os parametros de conexao |
171 | - com o banco de dados que permita a escrita nesses esquemas, pois a conversao de shapefile para Postgis exige a criação de tabela. | |
171 | + com o banco de dados que permita a escrita nesses esquemas, pois a conversao de shapefile para Postgis exige a cria��o de tabela. | |
172 | 172 | Esses parametros podem ser diferentes de outros existentes aqui no ms_configura e nao interferem em outras operacoes |
173 | 173 | |
174 | 174 | Exemplo: |
... | ... | @@ -300,7 +300,7 @@ colorpicker,colourramp,convertekml,download,editorgm,editorol,excluirarvore,opac |
300 | 300 | opcoes_autoredesenha,opcoes_label,salvamapfile,wmstime |
301 | 301 | |
302 | 302 | As seguintes ferramentas podem ser bloqueadas apenas impedindo-se a carga do javascript |
303 | -(as operacoes via PHP sao realizadas por outras classes que nao residem na pasta ferramentas ou não utiliza PHP) | |
303 | +(as operacoes via PHP sao realizadas por outras classes que nao residem na pasta ferramentas ou n�o utiliza PHP) | |
304 | 304 | |
305 | 305 | analisageometrias,animacao,atalhoscamada,atalhosedicao,atalhosmapa,bufferpt,busca,buscainde |
306 | 306 | buscarapida,conectarservicos,convertemapakml,cortina,editorsql,filtroarvore,geolocal,html2canvas,inseregrafico | ... | ... |