Commit 9ee733b0965af1f430ad05b33ed64b8eb3fb6a94

Authored by Edmar Moretti
1 parent 9beba404

Inclusão na configuração do mapa, de opções de configuração dos botões da barra de edição

Showing 60 changed files with 201 additions and 164 deletions   Show diff stats
admin/admin.db
No preview for this file type
css/i3geo7.css.php 100755 → 100644
ferramentas/editorgm/editorgm_compacto.js 100755 → 100644
ferramentas/editorol/editorol_compacto.js 100755 → 100644
interface/openlayersdebug.htm
... ... @@ -779,6 +779,40 @@
779 779 //opcoes para o objeto view, que e uma instancia de MapOptions
780 780 ViewOptions : {
781 781  
  782 + },
  783 + //botoes que sao mostrados no editor vetorial
  784 + editorButtons : {
  785 + 'imprimir': false,
  786 + 'grid': false,
  787 + 'pan' : false,
  788 + 'zoombox' : false,
  789 + 'zoomtot' : false,
  790 + 'zoomin' : false,
  791 + 'zoomout' : false,
  792 + 'distancia' : false,
  793 + 'area' : false,
  794 + 'identifica' : false,
  795 + 'linha' : true,
  796 + 'ponto' : true,
  797 + 'poligono' : true,
  798 + 'texto' : true,
  799 + 'edita' : true,
  800 + 'listag' : true,
  801 + 'corta' : true,
  802 + 'apaga' : true,
  803 + 'procura' : false,
  804 + 'selecao' : true,
  805 + 'selecaotudo' : true,
  806 + 'salva' : true,
  807 + 'ajuda' : true,
  808 + 'propriedades' : true,
  809 + 'fecha' : true,
  810 + 'tools' : true,
  811 + 'undo' : false,
  812 + 'frente' : false,
  813 + 'legenda' : false,
  814 + 'rodadomouse' : true,
  815 + 'novaaba' : false
782 816 }
783 817 },
784 818 //configuracoes especificas para a interface GoogleMaps
... ...
js/compactados/ajuda_compacto.js 100755 → 100644
js/compactados/analise_compacto.js 100755 → 100644
js/compactados/arvoredecamadas_compacto.js 100755 → 100644
js/compactados/arvoredetemas_compacto.js 100755 → 100644
js/compactados/base64_compacto.js 100755 → 100644
js/compactados/busca_compacto.js 100755 → 100644
js/compactados/caixaDeFerramentas_compacto.js 100755 → 100644
js/compactados/calculo_compacto.js 100755 → 100644
js/compactados/catalogoDir_compacto.js 100755 → 100644
js/compactados/catalogoEstrelas_compacto.js 100755 → 100644
js/compactados/catalogoInde_compacto.js 100755 → 100644
js/compactados/catalogoMapas_compacto.js 100755 → 100644
js/compactados/catalogoMenus_compacto.js 100755 → 100644
js/compactados/catalogoMetaestat_compacto.js 100755 → 100644
js/compactados/catalogoOgc_compacto.js 100755 → 100644
js/compactados/catalogoRegioes_compacto.js 100755 → 100644
js/compactados/catalogoSistemas_compacto.js 100755 → 100644
js/compactados/configura_compacto.js 100755 → 100644
js/compactados/coordenadas_compacto.js 100755 → 100644
js/compactados/desenho_compacto.js 100755 → 100644
js/compactados/dicionario_ajuda_compacto.js 100755 → 100644
js/compactados/dicionario_compacto.js 100755 → 100644
js/compactados/editor_compacto.js 100755 → 100644
1   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","<div class='i3GeoTituloJanela'>Editor</div>","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};$(janela[0].close).click(fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorgm/editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorol/editorol.js","i3GEO.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false});i3GEO.editorOL.backup.setMap(i3geoOL);i3GEO.editorOL.backup.getFeatures=function(){return i3GEO.editorOL.backup.getSource().getFeatures()}}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'zoomin':false,'zoomout':false,'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':false,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={botoes:{'zoomin':false,'zoomout':false,'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':false,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true},inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","<div class='i3GeoTituloJanela'>Editor</div>","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};$(janela[0].close).click(fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorgm/editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorol/editorol.js","i3GEO.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false});i3GEO.editorOL.backup.setMap(i3geoOL);i3GEO.editorOL.backup.getFeatures=function(){return i3GEO.editorOL.backup.getSource().getFeatures()}}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editor.botoes)}}}};
3 3 \ No newline at end of file
... ...
js/compactados/eventos_compacto.js 100755 → 100644
js/compactados/guias_compacto.js 100755 → 100644
js/compactados/idioma_compacto.js 100755 → 100644
js/compactados/ini_i3geo_compacto.js 100755 → 100644
1   -var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,init:function(parametrosMapa,configMapa){$.material.init();if(parametrosMapa&&parametrosMapa!=""){i3GEO.configura.mashuppar=i3GEO.parametrosMapa2mashuppar(parametrosMapa)}else{i3GEO.configura.mashuppar=""}if(configMapa&&configMapa!=""){i3GEO.configMapa(configMapa)}i3GEO.cria();i3GEO.inicia();delete i3GEO.parametrosMapa2mashuppar;delete i3GEO.configMapa;delete i3GEO.init},configMapa:function(c){i3GEO.configura.guardaExtensao=(c.hasOwnProperty("saveExtension")&&c.saveExtension==true)?true:false;i3GEO.configura.tipoimagem=(c.hasOwnProperty("posRenderType")&&c.posRenderType!="")?c.posRenderType:"nenhum";i3GEO.configura.locaplic=(c.hasOwnProperty("i3GeoServer")&&c.i3GeoServer!="")?c.i3GeoServer:i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";if(c.hasOwnProperty("tools")){i3GEO.configura.ferramentas=c.tools}i3GEO.Interface.IDCORPO=(c.hasOwnProperty("mapBody")&&c.mapBody!="")?c.mapBody:"mapai3Geo";i3GEO.finalizaAPI=(c.hasOwnProperty("afterStart")&&c.afterStart!="")?c.afterStart:"";if(c.hasOwnProperty("components")){i3GEO.arvoreDeTemas.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.catalogoMenus.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.busca.SERVICO=(c.components.hasOwnProperty("searchService"))?c.components.searchService:"";i3GEO.busca.SERVICOWMS=(c.components.hasOwnProperty("searchWms"))?c.components.searchWms:"";i3GEO.mapa.BALAOATIVO=(c.components.hasOwnProperty("info"))?c.components.info:true;i3GEO.mapa.INFOTEMPLATE=(c.components.hasOwnProperty("infoTemplate")&&c.components.infoTemplate!="")?c.components.infoTemplate:i3GEO.configura.locaplic+i3GEO.mapa.INFOTEMPLATE;if(c.components.referenceMapPosition){i3GEO.maparef.TOP=c.components.referenceMapPosition[0];i3GEO.maparef.RIGHT=c.components.referenceMapPosition[1]}if(c.components.scrollBar){i3GEO.janela.scrollBar=c.components.scrollBar}if(c.components.tooltip){var p=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP;p.removeAoAdicionar=(c.components.tooltip.hasOwnProperty("removeAoAdicionar"))?c.components.tooltip.removeAoAdicionar:true;p.autoPan=(c.components.tooltip.hasOwnProperty("autoPan"))?c.components.tooltip.autoPan:true;p.modal=(c.components.tooltip.hasOwnProperty("modal"))?c.components.tooltip.modal:false;p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:"";p.templateModal=(c.components.tooltip.hasOwnProperty("templateModal"))?c.components.tooltip.templateModal:"";p.simple=(c.components.tooltip.hasOwnProperty("simple"))?c.components.tooltip.simple:true;p.minWidth=(c.components.tooltip.hasOwnProperty("minWidth"))?c.components.tooltip.minWidth:'';p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:'200px';p.autoPanAnimation=(c.components.tooltip.hasOwnProperty("autoPanAnimation"))?c.components.tooltip.autoPanAnimation:p.autoPanAnimation;if(c.components.tooltip.hasOwnProperty("toolTipSize")){i3GEO.configura.alturatip=c.components.tooltip.toolTipSize[0];i3GEO.configura.larguratip=c.components.tooltip.toolTipSize[1]}}}if(c.hasOwnProperty("openLayers")&&c.mapType!=="GM"){i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.openlayers.googleLike=(c.mapType=="OSM")?true:false;i3GEO.Interface.openlayers.TILES=(c.hasOwnProperty("singleTile")&&c.singleTile!="")?!c.singleTile:true;i3GEO.Interface.openlayers.parametrosMap=c.openLayers.MapOptions;i3GEO.Interface.openlayers.parametrosView=c.openLayers.ViewOptions}if(c.hasOwnProperty("googleMaps")&&c.mapType=="GM"){i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.googlemaps.ESTILOPADRAO=c.googleMaps.MapOptions.mapTypeId;i3GEO.Interface.googlemaps.MAPOPTIONS=c.googleMaps.MapOptions}},parametrosMapa2mashuppar:function(p){var par=[];if(p.hasOwnProperty("mapfilebase")&&p.mapfilebase!=""){par.push("&base="+p.mapfilebase)}if(p.hasOwnProperty("mapext")&&p.mapext!=""&&p.mapext.length==4){par.push("&mapext="+p.mapext.join(","));i3GEO.configura.guardaExtensao=false}if(p.hasOwnProperty("perfil")&&p.perfil!=""){par.push("&perfil="+p.perfil)}if(p.hasOwnProperty("layers")){if(p.layers.add&&p.layers.add.length>0){par.push("&temasa="+p.layers.add.join(","))}if(p.layers.on&&p.layers.on.length>0){par.push("&layers="+p.layers.on.join(","))}if(p.layers.off&&p.layers.off.length>0){par.push("&desligar="+p.layers.off.join(","))}}if(p.hasOwnProperty("points")&&p.points.length>0){par.push("&nometemapontos="+p.points.title);par.push("&pontos="+p.points.coord.join(","))}if(p.hasOwnProperty("lines")){var n=[];jQuery.each(p.lines.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemalinhas="+p.lines.title);par.push("&linhas="+n.join(","))}}if(p.hasOwnProperty("polygons")){var n=[];jQuery.each(p.polygons.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemapoligonos="+p.polygons.title);par.push("&poligonos="+n.join(","))}}if(p.hasOwnProperty("wkt")&&p.wkt.coord!=""){par.push("&nometemawkt="+p.wkt.title);par.push("&wkt="+p.wkt.coord)}if(p.hasOwnProperty("symbol")){if(p.symbol.name!=""){par.push("&simbolo="+p.symbol.name)}if(p.symbol.color!=""){par.push("&corsimbolo="+p.symbol.color)}if(p.symbol.size!=""){par.push("&tamanhosimbolo="+p.symbol.size)}}if(p.kml&&p.kml.url!=""){par.push("&kmlurl="+p.kml.url)}if(p.hasOwnProperty("wms")&&p.wms.url!=""){if(p.wms.url!=""){par.push("&url_wms="+p.wms.url)}if(p.wms.layer!=""){par.push("&layer_wms="+p.wms.layer)}if(p.wms.style!=""){par.push("&style_wms="+p.wms.style)}if(p.wms.title!=""){par.push("&nome_wms="+p.wms.title)}if(p.wms.srs!=""){par.push("&srs_wms="+p.wms.srs)}if(p.wms.imagetype!=""){par.push("&image_wms="+p.wms.imagetype)}if(p.wms.version!=""){par.push("&versao_wms="+p.wms.version)}}if(p.hasOwnProperty("filters")){var n=[];jQuery.each(p.filters,function(index,value){if(value.layer!=""){n.push("&map_layer_"+value.layer+"_filter="+value.expression)}});if(n.length>0){par.push(n.join(""))}}return par.join("")},cria:function(){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth();$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){temp=temp[1].split("&");if(temp[0]&&temp[0]!=""){i3GEO.configura.sid=temp[0];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height){i3GEO.Interface.cria(parseInt(temp.style.width,10),parseInt(temp.style.height,10))}else{tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])}},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho,temp;i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoOLUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);return}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp&&temp!=""){temp=temp.replace(/[\+]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie()}i3GEO.arvoreDeCamadas.registaCamadas(retorno.data.temas);if(i3GEO.parametros.editor==="sim"){i3GEO.listaDeFerramentas=i3GEO.login.adicionaMenuSuspenso(i3GEO.listaDeFerramentas)}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){if(preferencias.geometriasbase64&&preferencias.geometriasbase64!=""){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}if(preferencias.graficosbase64&&preferencias.graficosbase64!=""){i3GEO.mapa.restauraGraficos(preferencias.graficosbase64)}if(preferencias.tabelasbase64&&preferencias.tabelasbase64!=""){i3GEO.mapa.restauraTabelas(preferencias.tabelasbase64)}}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}temp=$i("i3geo");temp.className="yui-skin-sam";if(document.body.id==="i3geo"&&temp.style&&!temp.style.overflow&&i3GEO.Interface.ATUAL==="openlayers"){temp.style.overflow="hidden"}if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);return}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.parametros.w,i3GEO.parametros.h)}},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();i3GEO.mapa.ativaAutoResize()},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(!retorno.data){alert("Ocorreu um erro ao carregar o mapa"+retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}temp=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);try{i3GEO.arvoreDeCamadas.atualiza(temp);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.registaCamadas(temp);i3GEO.Interface.redesenha();if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-novoh);document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;i3GEO.parametros.w=w;i3GEO.parametros.h=h;return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=antigoh-novoh;document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;temp=function(){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=i3GEO.Interface.BARRADEZOOMRIGHT+"px";if(i3GEO.Interface.BARRADEZOOMLEFT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=null}if(i3GEO.Interface.BARRADEZOOMRIGHT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=null}}break};i3GEO.guias.ALTURACORPOGUIAS=h;return[w,h]};i3GEO.php.mudatamanho(temp,h,w)},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
2 1 \ No newline at end of file
  2 +var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,init:function(parametrosMapa,configMapa){$.material.init();if(parametrosMapa&&parametrosMapa!=""){i3GEO.configura.mashuppar=i3GEO.parametrosMapa2mashuppar(parametrosMapa)}else{i3GEO.configura.mashuppar=""}if(configMapa&&configMapa!=""){i3GEO.configMapa(configMapa)}i3GEO.cria();i3GEO.inicia();delete i3GEO.parametrosMapa2mashuppar;delete i3GEO.configMapa;delete i3GEO.init},configMapa:function(c){i3GEO.configura.guardaExtensao=(c.hasOwnProperty("saveExtension")&&c.saveExtension==true)?true:false;i3GEO.configura.tipoimagem=(c.hasOwnProperty("posRenderType")&&c.posRenderType!="")?c.posRenderType:"nenhum";i3GEO.configura.locaplic=(c.hasOwnProperty("i3GeoServer")&&c.i3GeoServer!="")?c.i3GeoServer:i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";if(c.hasOwnProperty("tools")){i3GEO.configura.ferramentas=c.tools}i3GEO.Interface.IDCORPO=(c.hasOwnProperty("mapBody")&&c.mapBody!="")?c.mapBody:"mapai3Geo";i3GEO.finalizaAPI=(c.hasOwnProperty("afterStart")&&c.afterStart!="")?c.afterStart:"";if(c.hasOwnProperty("components")){i3GEO.arvoreDeTemas.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.catalogoMenus.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.busca.SERVICO=(c.components.hasOwnProperty("searchService"))?c.components.searchService:"";i3GEO.busca.SERVICOWMS=(c.components.hasOwnProperty("searchWms"))?c.components.searchWms:"";i3GEO.mapa.BALAOATIVO=(c.components.hasOwnProperty("info"))?c.components.info:true;i3GEO.mapa.INFOTEMPLATE=(c.components.hasOwnProperty("infoTemplate")&&c.components.infoTemplate!="")?c.components.infoTemplate:i3GEO.configura.locaplic+i3GEO.mapa.INFOTEMPLATE;if(c.components.referenceMapPosition){i3GEO.maparef.TOP=c.components.referenceMapPosition[0];i3GEO.maparef.RIGHT=c.components.referenceMapPosition[1]}if(c.components.scrollBar){i3GEO.janela.scrollBar=c.components.scrollBar}if(c.components.tooltip){var p=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP;p.removeAoAdicionar=(c.components.tooltip.hasOwnProperty("removeAoAdicionar"))?c.components.tooltip.removeAoAdicionar:true;p.autoPan=(c.components.tooltip.hasOwnProperty("autoPan"))?c.components.tooltip.autoPan:true;p.modal=(c.components.tooltip.hasOwnProperty("modal"))?c.components.tooltip.modal:false;p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:"";p.templateModal=(c.components.tooltip.hasOwnProperty("templateModal"))?c.components.tooltip.templateModal:"";p.simple=(c.components.tooltip.hasOwnProperty("simple"))?c.components.tooltip.simple:true;p.minWidth=(c.components.tooltip.hasOwnProperty("minWidth"))?c.components.tooltip.minWidth:'';p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:'200px';p.autoPanAnimation=(c.components.tooltip.hasOwnProperty("autoPanAnimation"))?c.components.tooltip.autoPanAnimation:p.autoPanAnimation;if(c.components.tooltip.hasOwnProperty("toolTipSize")){i3GEO.configura.alturatip=c.components.tooltip.toolTipSize[0];i3GEO.configura.larguratip=c.components.tooltip.toolTipSize[1]}}}if(c.hasOwnProperty("openLayers")&&c.mapType!=="GM"){var d=c.openLayers;i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.openlayers.googleLike=(c.mapType=="OSM")?true:false;i3GEO.Interface.openlayers.TILES=(d.hasOwnProperty("singleTile")&&d.singleTile!="")?!d.singleTile:true;i3GEO.Interface.openlayers.parametrosMap=d.MapOptions;i3GEO.Interface.openlayers.parametrosView=d.ViewOptions;if(d.hasOwnProperty("editorButtons")&&d.editorButtons!=""){i3GEO.editor.botoes=d.editorButtons}}if(c.hasOwnProperty("googleMaps")&&c.mapType=="GM"){i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.googlemaps.ESTILOPADRAO=c.googleMaps.MapOptions.mapTypeId;i3GEO.Interface.googlemaps.MAPOPTIONS=c.googleMaps.MapOptions}},parametrosMapa2mashuppar:function(p){var par=[];if(p.hasOwnProperty("mapfilebase")&&p.mapfilebase!=""){par.push("&base="+p.mapfilebase)}if(p.hasOwnProperty("mapext")&&p.mapext!=""&&p.mapext.length==4){par.push("&mapext="+p.mapext.join(","));i3GEO.configura.guardaExtensao=false}if(p.hasOwnProperty("perfil")&&p.perfil!=""){par.push("&perfil="+p.perfil)}if(p.hasOwnProperty("layers")){if(p.layers.add&&p.layers.add.length>0){par.push("&temasa="+p.layers.add.join(","))}if(p.layers.on&&p.layers.on.length>0){par.push("&layers="+p.layers.on.join(","))}if(p.layers.off&&p.layers.off.length>0){par.push("&desligar="+p.layers.off.join(","))}}if(p.hasOwnProperty("points")&&p.points.length>0){par.push("&nometemapontos="+p.points.title);par.push("&pontos="+p.points.coord.join(","))}if(p.hasOwnProperty("lines")){var n=[];jQuery.each(p.lines.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemalinhas="+p.lines.title);par.push("&linhas="+n.join(","))}}if(p.hasOwnProperty("polygons")){var n=[];jQuery.each(p.polygons.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemapoligonos="+p.polygons.title);par.push("&poligonos="+n.join(","))}}if(p.hasOwnProperty("wkt")&&p.wkt.coord!=""){par.push("&nometemawkt="+p.wkt.title);par.push("&wkt="+p.wkt.coord)}if(p.hasOwnProperty("symbol")){if(p.symbol.name!=""){par.push("&simbolo="+p.symbol.name)}if(p.symbol.color!=""){par.push("&corsimbolo="+p.symbol.color)}if(p.symbol.size!=""){par.push("&tamanhosimbolo="+p.symbol.size)}}if(p.kml&&p.kml.url!=""){par.push("&kmlurl="+p.kml.url)}if(p.hasOwnProperty("wms")&&p.wms.url!=""){if(p.wms.url!=""){par.push("&url_wms="+p.wms.url)}if(p.wms.layer!=""){par.push("&layer_wms="+p.wms.layer)}if(p.wms.style!=""){par.push("&style_wms="+p.wms.style)}if(p.wms.title!=""){par.push("&nome_wms="+p.wms.title)}if(p.wms.srs!=""){par.push("&srs_wms="+p.wms.srs)}if(p.wms.imagetype!=""){par.push("&image_wms="+p.wms.imagetype)}if(p.wms.version!=""){par.push("&versao_wms="+p.wms.version)}}if(p.hasOwnProperty("filters")){var n=[];jQuery.each(p.filters,function(index,value){if(value.layer!=""){n.push("&map_layer_"+value.layer+"_filter="+value.expression)}});if(n.length>0){par.push(n.join(""))}}return par.join("")},cria:function(){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth();$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){temp=temp[1].split("&");if(temp[0]&&temp[0]!=""){i3GEO.configura.sid=temp[0];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height){i3GEO.Interface.cria(parseInt(temp.style.width,10),parseInt(temp.style.height,10))}else{tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])}},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho,temp;i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoOLUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);return}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp&&temp!=""){temp=temp.replace(/[\+]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie()}i3GEO.arvoreDeCamadas.registaCamadas(retorno.data.temas);if(i3GEO.parametros.editor==="sim"){i3GEO.listaDeFerramentas=i3GEO.login.adicionaMenuSuspenso(i3GEO.listaDeFerramentas)}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){if(preferencias.geometriasbase64&&preferencias.geometriasbase64!=""){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}if(preferencias.graficosbase64&&preferencias.graficosbase64!=""){i3GEO.mapa.restauraGraficos(preferencias.graficosbase64)}if(preferencias.tabelasbase64&&preferencias.tabelasbase64!=""){i3GEO.mapa.restauraTabelas(preferencias.tabelasbase64)}}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}temp=$i("i3geo");temp.className="yui-skin-sam";if(document.body.id==="i3geo"&&temp.style&&!temp.style.overflow&&i3GEO.Interface.ATUAL==="openlayers"){temp.style.overflow="hidden"}if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);return}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.parametros.w,i3GEO.parametros.h)}},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();i3GEO.mapa.ativaAutoResize()},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(!retorno.data){alert("Ocorreu um erro ao carregar o mapa"+retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}temp=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);try{i3GEO.arvoreDeCamadas.atualiza(temp);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.registaCamadas(temp);i3GEO.Interface.redesenha();if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-novoh);document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;i3GEO.parametros.w=w;i3GEO.parametros.h=h;return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=antigoh-novoh;document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;temp=function(){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=i3GEO.Interface.BARRADEZOOMRIGHT+"px";if(i3GEO.Interface.BARRADEZOOMLEFT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=null}if(i3GEO.Interface.BARRADEZOOMRIGHT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=null}}break};i3GEO.guias.ALTURACORPOGUIAS=h;return[w,h]};i3GEO.php.mudatamanho(temp,h,w)},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
3 3 \ No newline at end of file
... ...
js/compactados/interface_compacto.js 100755 → 100644
js/compactados/janela_compacto.js 100755 → 100644
js/compactados/legenda_compacto.js 100755 → 100644
js/compactados/login_compacto.js 100755 → 100644
js/compactados/mapa_compacto.js 100755 → 100644
js/compactados/maparef_compacto.js 100755 → 100644
js/compactados/marcador_compacto.js 100755 → 100644
js/compactados/mustache.js 100755 → 100644
js/compactados/navega_compacto.js 100755 → 100644
js/compactados/php_compacto.js 100755 → 100644
js/compactados/plugini3geo_compacto.js 100755 → 100644
js/compactados/proj4js.js 100755 → 100644
js/compactados/social_compacto.js 100755 → 100644
js/compactados/tema_compacto.js 100755 → 100644
js/compactados/util_compacto.js 100755 → 100644
js/compactados/wicket.js 100755 → 100644
js/editor.js
1 1 if (typeof (i3GEO) === 'undefined') {
2   - var i3GEO = {};
  2 + var i3GEO = {};
3 3 }
4 4 i3GEO.editor =
5 5 {
6   - /**
7   - * Function: inicia
8   - *
9   - * Abre as op&ccedil;&otilde;es do editor conforme a interface em uso
10   - */
11   - inicia : function() {
12   - i3GEO.eventos.cliquePerm.desativa();
13   - i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial");
14   - },
15   - // carrega as opcoes de edicao se a interface for do googlemaps
16   - googlemaps : {
17   - inicia : function(idjanela) {
18   - var temp =
19   - function() {
20   - var cabecalho, minimiza, fecha, janela = YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");
21   - if (janela) {
22   - janela.destroy();
23   - }
24   - cabecalho = function() {
25   - };
26   - minimiza = function() {
27   - i3GEO.janela.minimiza("i3GEOjanelaEditor");
28   - };
29   - janela =
30   - i3GEO.janela.cria(
31   - "350px",
32   - "100px",
33   - "",
34   - "",
35   - "",
36   - "<div class='i3GeoTituloJanela'>Editor</div>",
37   - "i3GEOjanelaEditor",
38   - false,
39   - "hd",
40   - cabecalho,
41   - minimiza);
42   - $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white";
43   - i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");
44   - fecha = function() {
45   - var temp = window.confirm($trad("x94"));
46   - if (i3GEO.eventos) {
47   - i3GEO.eventos.cliquePerm.ativa();
48   - }
49   - if (temp === true) {
50   - i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes);
51   - }
52   - };
53   - $( janela[0].close ).click(fecha);
54   - };
55   - // @TODO incluir o js compactado ao inves do original
56   - if (!i3GEO.editorGM) {
57   - i3GEO.util.scriptTag(
58   - i3GEO.configura.locaplic + "/ferramentas/editorgm/editorgm_compacto.js",
59   - temp,
60   - "editorgm.js",
61   - true);
62   - } else {
63   - temp.call();
64   - }
65   - }
66   - },
67   - openlayers : {
68   - inicia : function(idjanela) {
69   - //TODO mudar carga do JS do editor para o compactado
70   - if (!i3GEO.editorOL) {
71   - //a barra de botoes utiliza codigo do Opelayers2
72   - i3GEO.util.scriptTag(
73   - i3GEO.configura.locaplic + "/ferramentas/editorol/editorol.js",
74   - "i3GEO.editor.openlayers.ativaPainel('" + idjanela + "')",
75   - "editorol.js",
76   - true);
77   - } else {
78   - if (!i3GEO.desenho.layergrafico) {
79   - i3GEO.desenho.openlayers.criaLayerGrafico();
80   - i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico]);
81   - }
82   - if (!i3GEO.editorOL.backup) {
83   - i3GEO.editorOL.backup = new ol.layer.Vector({
84   - source : new ol.source.Vector({
85   - features : new ol.Collection(),
86   - useSpatialIndex : false,
87   - name : "Backup"
88   - }),
89   - visible: false
90   - });
91   - i3GEO.editorOL.backup.setMap(i3geoOL);
92   - i3GEO.editorOL.backup.getFeatures = function(){
93   - return i3GEO.editorOL.backup.getSource().getFeatures();
94   - };
95   - }
96   - i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);
97   - }
98   - },
99   - criaJanela : function() {
100   - if ($i("i3GEOjanelaEditor")) {
101   - return "i3GEOjanelaEditor";
102   - }
103   - var janela, divid, titulo, cabecalho, minimiza;
104   - cabecalho = function() {
105   - };
106   - minimiza = function() {
107   - i3GEO.janela.minimiza("i3GEOjanelaEditor");
108   - };
109   - // cria a janela flutuante
110   - titulo = "<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";
111   - janela = i3GEO.janela.cria("300px", "200px", "", "", "", titulo, "i3GEOjanelaEditor", false, "hd", cabecalho, minimiza);
112   - divid = janela[2].id;
113   - $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white";
114   - $i("i3GEOjanelaEditor_corpo").style.textAlign = "left";
115   - return divid;
116   - },
117   - //TODO utilizar uma janela flutuante ao inves de uma fila de icones
118   - ativaPainel : function(idjanela) {
119   - i3GEO.editorOL.fundo = "";// i3GEO.editorOL &eacute; criado pelo script carregado
120   - i3GEO.editorOL.mapa = i3geoOL;
121   - i3GEO.editorOL.maxext = "";
122   - i3GEO.editorOL.controles = [];
123   - i3GEO.editorOL.botoes = {
124   - 'zoomin' : false,
125   - 'zoomout' : false,
126   - 'pan' : false,
127   - 'zoombox' : false,
128   - 'zoomtot' : false,
129   - 'legenda' : false,
130   - 'distancia' : false,
131   - 'area' : false,
132   - 'identifica' : false,
133   - 'linha' : true,
134   - 'ponto' : true,
135   - 'poligono' : true,
136   - 'texto' : true,
137   - 'corta' : true,
138   - 'edita' : true,
139   - 'listag' : true,
140   - 'selecao' : true,
141   - 'selecaotudo' : true,
142   - 'apaga' : true,
143   - 'procura' : false,
144   - 'propriedades' : true,
145   - 'salva' : true,
146   - 'ajuda' : true,
147   - 'fecha' : true,
148   - 'tools' : true,
149   - 'undo' : true,
150   - 'frente' : true
151   - };
152   - if (!i3GEO.desenho.layergrafico) {
153   - i3GEO.desenho.openlayers.criaLayerGrafico();
154   - }
155   - if (idjanela) {
156   - i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);
157   - }
158   - }
159   - }
  6 + botoes : {
  7 + 'zoomin' : false,
  8 + 'zoomout' : false,
  9 + 'pan' : false,
  10 + 'zoombox' : false,
  11 + 'zoomtot' : false,
  12 + 'legenda' : false,
  13 + 'distancia' : false,
  14 + 'area' : false,
  15 + 'identifica' : false,
  16 + 'linha' : true,
  17 + 'ponto' : true,
  18 + 'poligono' : true,
  19 + 'texto' : true,
  20 + 'corta' : true,
  21 + 'edita' : true,
  22 + 'listag' : true,
  23 + 'selecao' : true,
  24 + 'selecaotudo' : true,
  25 + 'apaga' : true,
  26 + 'procura' : false,
  27 + 'propriedades' : true,
  28 + 'salva' : true,
  29 + 'ajuda' : true,
  30 + 'fecha' : true,
  31 + 'tools' : true,
  32 + 'undo' : true,
  33 + 'frente' : true
  34 + },
  35 + /**
  36 + * Function: inicia
  37 + *
  38 + * Abre as op&ccedil;&otilde;es do editor conforme a interface em uso
  39 + */
  40 + inicia : function() {
  41 + i3GEO.eventos.cliquePerm.desativa();
  42 + i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial");
  43 + },
  44 + // carrega as opcoes de edicao se a interface for do googlemaps
  45 + googlemaps : {
  46 + inicia : function(idjanela) {
  47 + var temp =
  48 + function() {
  49 + var cabecalho, minimiza, fecha, janela = YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");
  50 + if (janela) {
  51 + janela.destroy();
  52 + }
  53 + cabecalho = function() {
  54 + };
  55 + minimiza = function() {
  56 + i3GEO.janela.minimiza("i3GEOjanelaEditor");
  57 + };
  58 + janela =
  59 + i3GEO.janela.cria(
  60 + "350px",
  61 + "100px",
  62 + "",
  63 + "",
  64 + "",
  65 + "<div class='i3GeoTituloJanela'>Editor</div>",
  66 + "i3GEOjanelaEditor",
  67 + false,
  68 + "hd",
  69 + cabecalho,
  70 + minimiza);
  71 + $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white";
  72 + i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");
  73 + fecha = function() {
  74 + var temp = window.confirm($trad("x94"));
  75 + if (i3GEO.eventos) {
  76 + i3GEO.eventos.cliquePerm.ativa();
  77 + }
  78 + if (temp === true) {
  79 + i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes);
  80 + }
  81 + };
  82 + $( janela[0].close ).click(fecha);
  83 + };
  84 + // @TODO incluir o js compactado ao inves do original
  85 + if (!i3GEO.editorGM) {
  86 + i3GEO.util.scriptTag(
  87 + i3GEO.configura.locaplic + "/ferramentas/editorgm/editorgm_compacto.js",
  88 + temp,
  89 + "editorgm.js",
  90 + true);
  91 + } else {
  92 + temp.call();
  93 + }
  94 + }
  95 + },
  96 + openlayers : {
  97 + inicia : function(idjanela) {
  98 + if (!i3GEO.editorOL) {
  99 + //a barra de botoes utiliza codigo do Opelayers2
  100 + i3GEO.util.scriptTag(
  101 + i3GEO.configura.locaplic + "/ferramentas/editorol/editorol.js",
  102 + "i3GEO.editor.openlayers.ativaPainel('" + idjanela + "')",
  103 + "editorol.js",
  104 + true);
  105 + } else {
  106 + if (!i3GEO.desenho.layergrafico) {
  107 + i3GEO.desenho.openlayers.criaLayerGrafico();
  108 + i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico]);
  109 + }
  110 + if (!i3GEO.editorOL.backup) {
  111 + i3GEO.editorOL.backup = new ol.layer.Vector({
  112 + source : new ol.source.Vector({
  113 + features : new ol.Collection(),
  114 + useSpatialIndex : false,
  115 + name : "Backup"
  116 + }),
  117 + visible: false
  118 + });
  119 + i3GEO.editorOL.backup.setMap(i3geoOL);
  120 + i3GEO.editorOL.backup.getFeatures = function(){
  121 + return i3GEO.editorOL.backup.getSource().getFeatures();
  122 + };
  123 + }
  124 + i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes);
  125 + }
  126 + },
  127 + criaJanela : function() {
  128 + if ($i("i3GEOjanelaEditor")) {
  129 + return "i3GEOjanelaEditor";
  130 + }
  131 + var janela, divid, titulo, cabecalho, minimiza;
  132 + cabecalho = function() {
  133 + };
  134 + minimiza = function() {
  135 + i3GEO.janela.minimiza("i3GEOjanelaEditor");
  136 + };
  137 + // cria a janela flutuante
  138 + titulo = "<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";
  139 + janela = i3GEO.janela.cria("300px", "200px", "", "", "", titulo, "i3GEOjanelaEditor", false, "hd", cabecalho, minimiza);
  140 + divid = janela[2].id;
  141 + $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white";
  142 + $i("i3GEOjanelaEditor_corpo").style.textAlign = "left";
  143 + return divid;
  144 + },
  145 + //TODO utilizar uma janela flutuante ao inves de uma fila de icones
  146 + ativaPainel : function(idjanela) {
  147 + i3GEO.editorOL.fundo = "";// i3GEO.editorOL &eacute; criado pelo script carregado
  148 + i3GEO.editorOL.mapa = i3geoOL;
  149 + i3GEO.editorOL.maxext = "";
  150 + i3GEO.editorOL.controles = [];
  151 + if (!i3GEO.desenho.layergrafico) {
  152 + i3GEO.desenho.openlayers.criaLayerGrafico();
  153 + }
  154 + if (idjanela) {
  155 + i3GEO.editorOL.criaBotoes(i3GEO.editor.botoes);
  156 + }
  157 + }
  158 + }
160 159 };
161 160 \ No newline at end of file
... ...
js/i3geo_tudo_compacto7.js
... ... @@ -206,7 +206,7 @@ d.parent(&quot;.dropdown-menu&quot;).length&amp;&amp;(d=d.closest(&quot;li.dropdown&quot;).addClass(&quot;active&quot;
206 206 (function(global){var beginsWith,endsWith,root,Wkt;root=this;Wkt=function(obj){if(obj instanceof Wkt)return obj;if(!(this instanceof Wkt))return new Wkt(obj);this._wrapped=obj};if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports){exports=module.exports=Wkt}exports.Wkt=Wkt}else{root.Wkt=Wkt}beginsWith=function(str,sub){return str.substring(0,sub.length)===sub};endsWith=function(str,sub){return str.substring(str.length-sub.length)===sub};Wkt.delimiter=' ';Wkt.isArray=function(obj){return!!(obj&&obj.constructor===Array)};Wkt.trim=function(str,sub){sub=sub||' ';while(beginsWith(str,sub)){str=str.substring(1)}while(endsWith(str,sub)){str=str.substring(0,str.length-1)}return str};Wkt.Wkt=function(initializer){this.delimiter=Wkt.delimiter||' ';this.wrapVertices=true;this.regExes={'typeStr':/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,'spaces':/\s+|\+/, 'numeric':/-*\d+(\.*\d+)?/,'comma':/\s*,\s*/,'parenComma':/\)\s*,\s*\(/,'coord':/-*\d+\.*\d+ -*\d+\.*\d+/, 'doubleParenComma':/\)\s*\)\s*,\s*\(\s*\(/,'trimParens':/^\s*\(?(.*?)\)?\s*$/,'ogcTypes':/^(multi)?(point|line|polygon|box)?(string)?$/i,'crudeJson':/^{.*"(type|coordinates|geometries|features)":.*}$/};this.components=undefined;if(initializer&&typeof initializer==='string'){this.read(initializer)}else if(initializer&&typeof initializer!==undefined){this.fromObject(initializer)}};global.Wkt=Wkt;Wkt.Wkt.prototype.isCollection=function(){switch(this.type.slice(0,5)){case'multi':return true;case'polyg':return true;default:return false}};Wkt.Wkt.prototype.sameCoords=function(a,b){return(a.x===b.x&&a.y===b.y)};Wkt.Wkt.prototype.fromObject=function(obj){var result;if(obj.hasOwnProperty('type')&&obj.hasOwnProperty('coordinates')){result=this.fromJson(obj)}else{result=this.deconstruct.call(this,obj)}this.components=result.components;this.isRectangle=result.isRectangle||false;this.type=result.type;return this};Wkt.Wkt.prototype.toObject=function(config){var obj=this.construct[this.type].call(this,config);if(typeof obj==='object'&&!Wkt.isArray(obj)){obj.properties=this.properties}return obj};Wkt.Wkt.prototype.toString=function(config){return this.write()};Wkt.Wkt.prototype.fromJson=function(obj){var i,j,k,coords,iring,oring;this.type=obj.type.toLowerCase();this.components=[];if(obj.hasOwnProperty('geometry')){this.fromJson(obj.geometry);this.properties=obj.properties;return this}coords=obj.coordinates;if(!Wkt.isArray(coords[0])){this.components.push({x:coords[0],y:coords[1]})}else{for(i in coords){if(coords.hasOwnProperty(i)){if(!Wkt.isArray(coords[i][0])){if(this.type==='multipoint'){this.components.push([{x:coords[i][0],y:coords[i][1]}])}else{this.components.push({x:coords[i][0],y:coords[i][1]})}}else{oring=[];for(j in coords[i]){if(coords[i].hasOwnProperty(j)){if(!Wkt.isArray(coords[i][j][0])){oring.push({x:coords[i][j][0],y:coords[i][j][1]})}else{iring=[];for(k in coords[i][j]){if(coords[i][j].hasOwnProperty(k)){iring.push({x:coords[i][j][k][0],y:coords[i][j][k][1]})}}oring.push(iring)}}}this.components.push(oring)}}}}return this};Wkt.Wkt.prototype.toJson=function(){var cs,json,i,j,k,ring,rings;cs=this.components;json={coordinates:[],type:(function(){var i,type,s;type=this.regExes.ogcTypes.exec(this.type).slice(1);s=[];for(i in type){if(type.hasOwnProperty(i)){if(type[i]!==undefined){s.push(type[i].toLowerCase().slice(0,1).toUpperCase()+type[i].toLowerCase().slice(1))}}}return s}.call(this)).join('')};if(this.type.toLowerCase()==='box'){json.type='Polygon';json.bbox=[];for(i in cs){if(cs.hasOwnProperty(i)){json.bbox=json.bbox.concat([cs[i].x,cs[i].y])}}json.coordinates=[[[cs[0].x,cs[0].y],[cs[0].x,cs[1].y],[cs[1].x,cs[1].y],[cs[1].x,cs[0].y],[cs[0].x,cs[0].y]]];return json}for(i in cs){if(cs.hasOwnProperty(i)){if(Wkt.isArray(cs[i])){rings=[];for(j in cs[i]){if(cs[i].hasOwnProperty(j)){if(Wkt.isArray(cs[i][j])){ring=[];for(k in cs[i][j]){if(cs[i][j].hasOwnProperty(k)){ring.push([cs[i][j][k].x,cs[i][j][k].y])}}rings.push(ring)}else{if(cs[i].length>1){rings.push([cs[i][j].x,cs[i][j].y])}else{rings=rings.concat([cs[i][j].x,cs[i][j].y])}}}}json.coordinates.push(rings)}else{if(cs.length>1){json.coordinates.push([cs[i].x,cs[i].y])}else{json.coordinates=json.coordinates.concat([cs[i].x,cs[i].y])}}}}return json};Wkt.Wkt.prototype.merge=function(wkt){var prefix=this.type.slice(0,5);if(this.type!==wkt.type){if(this.type.slice(5,this.type.length)!==wkt.type){throw TypeError('The input geometry types must agree or the calling this.Wkt.Wkt instance must be a multigeometry of the other')}}switch(prefix){case'point':this.components=[this.components.concat(wkt.components)];break;case'multi':this.components=this.components.concat((wkt.type.slice(0,5)==='multi')?wkt.components:[wkt.components]);break;default:this.components=[this.components,wkt.components];break}if(prefix!=='multi'){this.type='multi'+this.type}return this};Wkt.Wkt.prototype.read=function(str){var matches;matches=this.regExes.typeStr.exec(str);if(matches){this.type=matches[1].toLowerCase();this.base=matches[2];if(this.ingest[this.type]){this.components=this.ingest[this.type].apply(this,[this.base])}}else{if(this.regExes.crudeJson.test(str)){if(typeof JSON==='object'&&typeof JSON.parse==='function'){this.fromJson(JSON.parse(str))}else{console.log('JSON.parse() is not available; cannot parse GeoJSON strings');throw{name:'JSONError',message:'JSON.parse() is not available; cannot parse GeoJSON strings'}}}else{console.log('Invalid WKT string provided to read()');throw{name:'WKTError',message:'Invalid WKT string provided to read()'}}}return this};Wkt.Wkt.prototype.write=function(components){var i,pieces,data;components=components||this.components;pieces=[];pieces.push(this.type.toUpperCase()+'(');for(i=0;i<components.length;i+=1){if(this.isCollection()&&i>0){pieces.push(',')}if(!this.extract[this.type]){return null}data=this.extract[this.type].apply(this,[components[i]]);if(this.isCollection()&&this.type!=='multipoint'){pieces.push('('+data+')')}else{pieces.push(data);if(i!==(components.length-1)&&this.type!=='multipoint'){pieces.push(',')}}}pieces.push(')');return pieces.join('')};Wkt.Wkt.prototype.extract={point:function(point){return String(point.x)+this.delimiter+String(point.y)},multipoint:function(multipoint){var i,parts=[],s;for(i=0;i<multipoint.length;i+=1){s=this.extract.point.apply(this,[multipoint[i]]);if(this.wrapVertices){s='('+s+')'}parts.push(s)}return parts.join(',')},linestring:function(linestring){return this.extract.point.apply(this,[linestring])},multilinestring:function(multilinestring){var i,parts=[];for(i=0;i<multilinestring.length;i+=1){parts.push(this.extract.linestring.apply(this,[multilinestring[i]]))}return parts.join(',')},polygon:function(polygon){return this.extract.multilinestring.apply(this,[polygon])},multipolygon:function(multipolygon){var i,parts=[];for(i=0;i<multipolygon.length;i+=1){parts.push('('+this.extract.polygon.apply(this,[multipolygon[i]])+')')}return parts.join(',')},box:function(box){return this.extract.linestring.apply(this,[box])},geometrycollection:function(str){console.log('The geometrycollection WKT type is not yet supported.')}};Wkt.Wkt.prototype.ingest={point:function(str){var coords=Wkt.trim(str).split(this.regExes.spaces);return[{x:parseFloat(this.regExes.numeric.exec(coords[0])[0]),y:parseFloat(this.regExes.numeric.exec(coords[1])[0])}]},multipoint:function(str){var i,components,points;components=[];points=Wkt.trim(str).split(this.regExes.comma);for(i=0;i<points.length;i+=1){components.push(this.ingest.point.apply(this,[points[i]]))}return components},linestring:function(str){var i,multipoints,components;multipoints=this.ingest.multipoint.apply(this,[str]);components=[];for(i=0;i<multipoints.length;i+=1){components=components.concat(multipoints[i])}return components},multilinestring:function(str){var i,components,line,lines;components=[];lines=Wkt.trim(str).split(this.regExes.doubleParenComma);if(lines.length===1){lines=Wkt.trim(str).split(this.regExes.parenComma)}for(i=0;i<lines.length;i+=1){line=lines[i].replace(this.regExes.trimParens,'$1');components.push(this.ingest.linestring.apply(this,[line]))}return components},polygon:function(str){var i,j,components,subcomponents,ring,rings;rings=Wkt.trim(str).split(this.regExes.parenComma);components=[];for(i=0;i<rings.length;i+=1){ring=rings[i].replace(this.regExes.trimParens,'$1').split(this.regExes.comma);subcomponents=[];for(j=0;j<ring.length;j+=1){var split=ring[j].split(this.regExes.spaces);if(split.length>2){split=split.filter(function(n){return n!=""})}if(split.length===2){var x_cord=split[0];var y_cord=split[1];subcomponents.push({x:parseFloat(x_cord),y:parseFloat(y_cord)})}}components.push(subcomponents)}return components},box:function(str){var i,multipoints,components;multipoints=this.ingest.multipoint.apply(this,[str]);components=[];for(i=0;i<multipoints.length;i+=1){components=components.concat(multipoints[i])}return components},multipolygon:function(str){var i,components,polygon,polygons;components=[];polygons=Wkt.trim(str).split(this.regExes.doubleParenComma);for(i=0;i<polygons.length;i+=1){polygon=polygons[i].replace(this.regExes.trimParens,'$1');components.push(this.ingest.polygon.apply(this,[polygon]))}return components},geometrycollection:function(str){console.log('The geometrycollection WKT type is not yet supported.')}};return this}(this));
207 207 //
208 208 //compactados/ini_i3geo_compacto.js
209   -var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,init:function(parametrosMapa,configMapa){$.material.init();if(parametrosMapa&&parametrosMapa!=""){i3GEO.configura.mashuppar=i3GEO.parametrosMapa2mashuppar(parametrosMapa)}else{i3GEO.configura.mashuppar=""}if(configMapa&&configMapa!=""){i3GEO.configMapa(configMapa)}i3GEO.cria();i3GEO.inicia();delete i3GEO.parametrosMapa2mashuppar;delete i3GEO.configMapa;delete i3GEO.init},configMapa:function(c){i3GEO.configura.guardaExtensao=(c.hasOwnProperty("saveExtension")&&c.saveExtension==true)?true:false;i3GEO.configura.tipoimagem=(c.hasOwnProperty("posRenderType")&&c.posRenderType!="")?c.posRenderType:"nenhum";i3GEO.configura.locaplic=(c.hasOwnProperty("i3GeoServer")&&c.i3GeoServer!="")?c.i3GeoServer:i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";if(c.hasOwnProperty("tools")){i3GEO.configura.ferramentas=c.tools}i3GEO.Interface.IDCORPO=(c.hasOwnProperty("mapBody")&&c.mapBody!="")?c.mapBody:"mapai3Geo";i3GEO.finalizaAPI=(c.hasOwnProperty("afterStart")&&c.afterStart!="")?c.afterStart:"";if(c.hasOwnProperty("components")){i3GEO.arvoreDeTemas.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.catalogoMenus.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.busca.SERVICO=(c.components.hasOwnProperty("searchService"))?c.components.searchService:"";i3GEO.busca.SERVICOWMS=(c.components.hasOwnProperty("searchWms"))?c.components.searchWms:"";i3GEO.mapa.BALAOATIVO=(c.components.hasOwnProperty("info"))?c.components.info:true;i3GEO.mapa.INFOTEMPLATE=(c.components.hasOwnProperty("infoTemplate")&&c.components.infoTemplate!="")?c.components.infoTemplate:i3GEO.configura.locaplic+i3GEO.mapa.INFOTEMPLATE;if(c.components.referenceMapPosition){i3GEO.maparef.TOP=c.components.referenceMapPosition[0];i3GEO.maparef.RIGHT=c.components.referenceMapPosition[1]}if(c.components.scrollBar){i3GEO.janela.scrollBar=c.components.scrollBar}if(c.components.tooltip){var p=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP;p.removeAoAdicionar=(c.components.tooltip.hasOwnProperty("removeAoAdicionar"))?c.components.tooltip.removeAoAdicionar:true;p.autoPan=(c.components.tooltip.hasOwnProperty("autoPan"))?c.components.tooltip.autoPan:true;p.modal=(c.components.tooltip.hasOwnProperty("modal"))?c.components.tooltip.modal:false;p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:"";p.templateModal=(c.components.tooltip.hasOwnProperty("templateModal"))?c.components.tooltip.templateModal:"";p.simple=(c.components.tooltip.hasOwnProperty("simple"))?c.components.tooltip.simple:true;p.minWidth=(c.components.tooltip.hasOwnProperty("minWidth"))?c.components.tooltip.minWidth:'';p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:'200px';p.autoPanAnimation=(c.components.tooltip.hasOwnProperty("autoPanAnimation"))?c.components.tooltip.autoPanAnimation:p.autoPanAnimation;if(c.components.tooltip.hasOwnProperty("toolTipSize")){i3GEO.configura.alturatip=c.components.tooltip.toolTipSize[0];i3GEO.configura.larguratip=c.components.tooltip.toolTipSize[1]}}}if(c.hasOwnProperty("openLayers")&&c.mapType!=="GM"){i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.openlayers.googleLike=(c.mapType=="OSM")?true:false;i3GEO.Interface.openlayers.TILES=(c.hasOwnProperty("singleTile")&&c.singleTile!="")?!c.singleTile:true;i3GEO.Interface.openlayers.parametrosMap=c.openLayers.MapOptions;i3GEO.Interface.openlayers.parametrosView=c.openLayers.ViewOptions}if(c.hasOwnProperty("googleMaps")&&c.mapType=="GM"){i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.googlemaps.ESTILOPADRAO=c.googleMaps.MapOptions.mapTypeId;i3GEO.Interface.googlemaps.MAPOPTIONS=c.googleMaps.MapOptions}},parametrosMapa2mashuppar:function(p){var par=[];if(p.hasOwnProperty("mapfilebase")&&p.mapfilebase!=""){par.push("&base="+p.mapfilebase)}if(p.hasOwnProperty("mapext")&&p.mapext!=""&&p.mapext.length==4){par.push("&mapext="+p.mapext.join(","));i3GEO.configura.guardaExtensao=false}if(p.hasOwnProperty("perfil")&&p.perfil!=""){par.push("&perfil="+p.perfil)}if(p.hasOwnProperty("layers")){if(p.layers.add&&p.layers.add.length>0){par.push("&temasa="+p.layers.add.join(","))}if(p.layers.on&&p.layers.on.length>0){par.push("&layers="+p.layers.on.join(","))}if(p.layers.off&&p.layers.off.length>0){par.push("&desligar="+p.layers.off.join(","))}}if(p.hasOwnProperty("points")&&p.points.length>0){par.push("&nometemapontos="+p.points.title);par.push("&pontos="+p.points.coord.join(","))}if(p.hasOwnProperty("lines")){var n=[];jQuery.each(p.lines.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemalinhas="+p.lines.title);par.push("&linhas="+n.join(","))}}if(p.hasOwnProperty("polygons")){var n=[];jQuery.each(p.polygons.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemapoligonos="+p.polygons.title);par.push("&poligonos="+n.join(","))}}if(p.hasOwnProperty("wkt")&&p.wkt.coord!=""){par.push("&nometemawkt="+p.wkt.title);par.push("&wkt="+p.wkt.coord)}if(p.hasOwnProperty("symbol")){if(p.symbol.name!=""){par.push("&simbolo="+p.symbol.name)}if(p.symbol.color!=""){par.push("&corsimbolo="+p.symbol.color)}if(p.symbol.size!=""){par.push("&tamanhosimbolo="+p.symbol.size)}}if(p.kml&&p.kml.url!=""){par.push("&kmlurl="+p.kml.url)}if(p.hasOwnProperty("wms")&&p.wms.url!=""){if(p.wms.url!=""){par.push("&url_wms="+p.wms.url)}if(p.wms.layer!=""){par.push("&layer_wms="+p.wms.layer)}if(p.wms.style!=""){par.push("&style_wms="+p.wms.style)}if(p.wms.title!=""){par.push("&nome_wms="+p.wms.title)}if(p.wms.srs!=""){par.push("&srs_wms="+p.wms.srs)}if(p.wms.imagetype!=""){par.push("&image_wms="+p.wms.imagetype)}if(p.wms.version!=""){par.push("&versao_wms="+p.wms.version)}}if(p.hasOwnProperty("filters")){var n=[];jQuery.each(p.filters,function(index,value){if(value.layer!=""){n.push("&map_layer_"+value.layer+"_filter="+value.expression)}});if(n.length>0){par.push(n.join(""))}}return par.join("")},cria:function(){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth();$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){temp=temp[1].split("&");if(temp[0]&&temp[0]!=""){i3GEO.configura.sid=temp[0];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height){i3GEO.Interface.cria(parseInt(temp.style.width,10),parseInt(temp.style.height,10))}else{tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])}},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho,temp;i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoOLUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);return}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp&&temp!=""){temp=temp.replace(/[]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie()}i3GEO.arvoreDeCamadas.registaCamadas(retorno.data.temas);if(i3GEO.parametros.editor==="sim"){i3GEO.listaDeFerramentas=i3GEO.login.adicionaMenuSuspenso(i3GEO.listaDeFerramentas)}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){if(preferencias.geometriasbase64&&preferencias.geometriasbase64!=""){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}if(preferencias.graficosbase64&&preferencias.graficosbase64!=""){i3GEO.mapa.restauraGraficos(preferencias.graficosbase64)}if(preferencias.tabelasbase64&&preferencias.tabelasbase64!=""){i3GEO.mapa.restauraTabelas(preferencias.tabelasbase64)}}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}temp=$i("i3geo");temp.className="yui-skin-sam";if(document.body.id==="i3geo"&&temp.style&&!temp.style.overflow&&i3GEO.Interface.ATUAL==="openlayers"){temp.style.overflow="hidden"}if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);return}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.parametros.w,i3GEO.parametros.h)}},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();i3GEO.mapa.ativaAutoResize()},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(!retorno.data){alert("Ocorreu um erro ao carregar o mapa"+retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}temp=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);try{i3GEO.arvoreDeCamadas.atualiza(temp);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.registaCamadas(temp);i3GEO.Interface.redesenha();if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-novoh);document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;i3GEO.parametros.w=w;i3GEO.parametros.h=h;return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=antigoh-novoh;document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;temp=function(){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=i3GEO.Interface.BARRADEZOOMRIGHT+"px";if(i3GEO.Interface.BARRADEZOOMLEFT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=null}if(i3GEO.Interface.BARRADEZOOMRIGHT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=null}}break};i3GEO.guias.ALTURACORPOGUIAS=h;return[w,h]};i3GEO.php.mudatamanho(temp,h,w)},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
  209 +var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,init:function(parametrosMapa,configMapa){$.material.init();if(parametrosMapa&&parametrosMapa!=""){i3GEO.configura.mashuppar=i3GEO.parametrosMapa2mashuppar(parametrosMapa)}else{i3GEO.configura.mashuppar=""}if(configMapa&&configMapa!=""){i3GEO.configMapa(configMapa)}i3GEO.cria();i3GEO.inicia();delete i3GEO.parametrosMapa2mashuppar;delete i3GEO.configMapa;delete i3GEO.init},configMapa:function(c){i3GEO.configura.guardaExtensao=(c.hasOwnProperty("saveExtension")&&c.saveExtension==true)?true:false;i3GEO.configura.tipoimagem=(c.hasOwnProperty("posRenderType")&&c.posRenderType!="")?c.posRenderType:"nenhum";i3GEO.configura.locaplic=(c.hasOwnProperty("i3GeoServer")&&c.i3GeoServer!="")?c.i3GeoServer:i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";if(c.hasOwnProperty("tools")){i3GEO.configura.ferramentas=c.tools}i3GEO.Interface.IDCORPO=(c.hasOwnProperty("mapBody")&&c.mapBody!="")?c.mapBody:"mapai3Geo";i3GEO.finalizaAPI=(c.hasOwnProperty("afterStart")&&c.afterStart!="")?c.afterStart:"";if(c.hasOwnProperty("components")){i3GEO.arvoreDeTemas.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.catalogoMenus.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.busca.SERVICO=(c.components.hasOwnProperty("searchService"))?c.components.searchService:"";i3GEO.busca.SERVICOWMS=(c.components.hasOwnProperty("searchWms"))?c.components.searchWms:"";i3GEO.mapa.BALAOATIVO=(c.components.hasOwnProperty("info"))?c.components.info:true;i3GEO.mapa.INFOTEMPLATE=(c.components.hasOwnProperty("infoTemplate")&&c.components.infoTemplate!="")?c.components.infoTemplate:i3GEO.configura.locaplic+i3GEO.mapa.INFOTEMPLATE;if(c.components.referenceMapPosition){i3GEO.maparef.TOP=c.components.referenceMapPosition[0];i3GEO.maparef.RIGHT=c.components.referenceMapPosition[1]}if(c.components.scrollBar){i3GEO.janela.scrollBar=c.components.scrollBar}if(c.components.tooltip){var p=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP;p.removeAoAdicionar=(c.components.tooltip.hasOwnProperty("removeAoAdicionar"))?c.components.tooltip.removeAoAdicionar:true;p.autoPan=(c.components.tooltip.hasOwnProperty("autoPan"))?c.components.tooltip.autoPan:true;p.modal=(c.components.tooltip.hasOwnProperty("modal"))?c.components.tooltip.modal:false;p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:"";p.templateModal=(c.components.tooltip.hasOwnProperty("templateModal"))?c.components.tooltip.templateModal:"";p.simple=(c.components.tooltip.hasOwnProperty("simple"))?c.components.tooltip.simple:true;p.minWidth=(c.components.tooltip.hasOwnProperty("minWidth"))?c.components.tooltip.minWidth:'';p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:'200px';p.autoPanAnimation=(c.components.tooltip.hasOwnProperty("autoPanAnimation"))?c.components.tooltip.autoPanAnimation:p.autoPanAnimation;if(c.components.tooltip.hasOwnProperty("toolTipSize")){i3GEO.configura.alturatip=c.components.tooltip.toolTipSize[0];i3GEO.configura.larguratip=c.components.tooltip.toolTipSize[1]}}}if(c.hasOwnProperty("openLayers")&&c.mapType!=="GM"){var d=c.openLayers;i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.openlayers.googleLike=(c.mapType=="OSM")?true:false;i3GEO.Interface.openlayers.TILES=(d.hasOwnProperty("singleTile")&&d.singleTile!="")?!d.singleTile:true;i3GEO.Interface.openlayers.parametrosMap=d.MapOptions;i3GEO.Interface.openlayers.parametrosView=d.ViewOptions;if(d.hasOwnProperty("editorButtons")&&d.editorButtons!=""){i3GEO.editor.botoes=d.editorButtons}}if(c.hasOwnProperty("googleMaps")&&c.mapType=="GM"){i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.googlemaps.ESTILOPADRAO=c.googleMaps.MapOptions.mapTypeId;i3GEO.Interface.googlemaps.MAPOPTIONS=c.googleMaps.MapOptions}},parametrosMapa2mashuppar:function(p){var par=[];if(p.hasOwnProperty("mapfilebase")&&p.mapfilebase!=""){par.push("&base="+p.mapfilebase)}if(p.hasOwnProperty("mapext")&&p.mapext!=""&&p.mapext.length==4){par.push("&mapext="+p.mapext.join(","));i3GEO.configura.guardaExtensao=false}if(p.hasOwnProperty("perfil")&&p.perfil!=""){par.push("&perfil="+p.perfil)}if(p.hasOwnProperty("layers")){if(p.layers.add&&p.layers.add.length>0){par.push("&temasa="+p.layers.add.join(","))}if(p.layers.on&&p.layers.on.length>0){par.push("&layers="+p.layers.on.join(","))}if(p.layers.off&&p.layers.off.length>0){par.push("&desligar="+p.layers.off.join(","))}}if(p.hasOwnProperty("points")&&p.points.length>0){par.push("&nometemapontos="+p.points.title);par.push("&pontos="+p.points.coord.join(","))}if(p.hasOwnProperty("lines")){var n=[];jQuery.each(p.lines.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemalinhas="+p.lines.title);par.push("&linhas="+n.join(","))}}if(p.hasOwnProperty("polygons")){var n=[];jQuery.each(p.polygons.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemapoligonos="+p.polygons.title);par.push("&poligonos="+n.join(","))}}if(p.hasOwnProperty("wkt")&&p.wkt.coord!=""){par.push("&nometemawkt="+p.wkt.title);par.push("&wkt="+p.wkt.coord)}if(p.hasOwnProperty("symbol")){if(p.symbol.name!=""){par.push("&simbolo="+p.symbol.name)}if(p.symbol.color!=""){par.push("&corsimbolo="+p.symbol.color)}if(p.symbol.size!=""){par.push("&tamanhosimbolo="+p.symbol.size)}}if(p.kml&&p.kml.url!=""){par.push("&kmlurl="+p.kml.url)}if(p.hasOwnProperty("wms")&&p.wms.url!=""){if(p.wms.url!=""){par.push("&url_wms="+p.wms.url)}if(p.wms.layer!=""){par.push("&layer_wms="+p.wms.layer)}if(p.wms.style!=""){par.push("&style_wms="+p.wms.style)}if(p.wms.title!=""){par.push("&nome_wms="+p.wms.title)}if(p.wms.srs!=""){par.push("&srs_wms="+p.wms.srs)}if(p.wms.imagetype!=""){par.push("&image_wms="+p.wms.imagetype)}if(p.wms.version!=""){par.push("&versao_wms="+p.wms.version)}}if(p.hasOwnProperty("filters")){var n=[];jQuery.each(p.filters,function(index,value){if(value.layer!=""){n.push("&map_layer_"+value.layer+"_filter="+value.expression)}});if(n.length>0){par.push(n.join(""))}}return par.join("")},cria:function(){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth();$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){temp=temp[1].split("&");if(temp[0]&&temp[0]!=""){i3GEO.configura.sid=temp[0];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height){i3GEO.Interface.cria(parseInt(temp.style.width,10),parseInt(temp.style.height,10))}else{tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])}},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho,temp;i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoOLUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);return}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp&&temp!=""){temp=temp.replace(/[]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie()}i3GEO.arvoreDeCamadas.registaCamadas(retorno.data.temas);if(i3GEO.parametros.editor==="sim"){i3GEO.listaDeFerramentas=i3GEO.login.adicionaMenuSuspenso(i3GEO.listaDeFerramentas)}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){if(preferencias.geometriasbase64&&preferencias.geometriasbase64!=""){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}if(preferencias.graficosbase64&&preferencias.graficosbase64!=""){i3GEO.mapa.restauraGraficos(preferencias.graficosbase64)}if(preferencias.tabelasbase64&&preferencias.tabelasbase64!=""){i3GEO.mapa.restauraTabelas(preferencias.tabelasbase64)}}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}temp=$i("i3geo");temp.className="yui-skin-sam";if(document.body.id==="i3geo"&&temp.style&&!temp.style.overflow&&i3GEO.Interface.ATUAL==="openlayers"){temp.style.overflow="hidden"}if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);return}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.parametros.w,i3GEO.parametros.h)}},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();i3GEO.mapa.ativaAutoResize()},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(!retorno.data){alert("Ocorreu um erro ao carregar o mapa"+retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}temp=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);try{i3GEO.arvoreDeCamadas.atualiza(temp);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.registaCamadas(temp);i3GEO.Interface.redesenha();if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-novoh);document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;i3GEO.parametros.w=w;i3GEO.parametros.h=h;return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=antigoh-novoh;document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;temp=function(){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=i3GEO.Interface.BARRADEZOOMRIGHT+"px";if(i3GEO.Interface.BARRADEZOOMLEFT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=null}if(i3GEO.Interface.BARRADEZOOMRIGHT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=null}}break};i3GEO.guias.ALTURACORPOGUIAS=h;return[w,h]};i3GEO.php.mudatamanho(temp,h,w)},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
210 210 //
211 211 //compactados/mustache.js
212 212 (function(global,factory){if(typeof exports==="object"&&exports){factory(exports)}else if(typeof define==="function"&&define.amd){define(['exports'],factory)}else{factory(global.Mustache={})}}(this,function(mustache){var Object_toString=Object.prototype.toString;var isArray=Array.isArray||function(object){return Object_toString.call(object)==='[object Array]'};function isFunction(object){return typeof object==='function'}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var RegExp_test=RegExp.prototype.test;function testRegExp(re,string){return RegExp_test.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':'&quot;',"'":'&#39;',"/":'&#x2F;'};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==='string')tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error('Invalid tags: '+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+'\\s*');closingTagRe=new RegExp('\\s*'+escapeRegExp(tags[1]));closingCurlyRe=new RegExp('\\s*'+escapeRegExp('}'+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length)}else{nonSpace=true}tokens.push(['text',chr,start,start+1]);start+=1;if(chr==='\n')stripSpace()}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||'name';scanner.scan(whiteRe);if(type==='='){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==='{'){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type='&'}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error('Unclosed tag at '+scanner.pos);token=[type,value,start,scanner.pos];tokens.push(token);if(type==='#'||type==='^'){sections.push(token)}else if(type==='/'){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==='name'||type==='{'||type==='&'){nonSpace=true}else if(type==='='){compileTags(value)}}openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==='text'&&lastToken&&lastToken[0]==='text'){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return squashedTokens}function nestTokens(tokens){var nestedTokens=[];var collector=nestedTokens;var sections=[];var token,section;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':case'^':collector.push(token);sections.push(token);collector=token[4]=[];break;case'/':section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return'';var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view==null?{}:view;this.cache={'.':this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index;while(context){if(name.indexOf('.')>0){value=context.view;names=name.split('.');index=0;while(value!=null&&index<names.length)value=value[names[index++]]}else{value=context.view[name]}if(value!=null)break;context=context.parent}cache[name]=value}if(isFunction(value))value=value.call(this.view);return value};function Writer(){this.cache={}}Writer.prototype.clearCache=function(){this.cache={}};Writer.prototype.parse=function(template,tags){var cache=this.cache;var tokens=cache[template];if(tokens==null)tokens=cache[template]=parseTemplate(template,tags);return tokens};Writer.prototype.render=function(template,view,partials){var tokens=this.parse(template);var context=(view instanceof Context)?view:new Context(view);return this.renderTokens(tokens,context,partials,template)};Writer.prototype.renderTokens=function(tokens,context,partials,originalTemplate){var buffer='';var self=this;function subRender(template){return self.render(template,context,partials)}var token,value;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':value=context.lookup(token[1]);if(!value)continue;if(isArray(value)){for(var j=0,valueLength=value.length;j<valueLength;++j){buffer+=this.renderTokens(token[4],context.push(value[j]),partials,originalTemplate)}}else if(typeof value==='object'||typeof value==='string'){buffer+=this.renderTokens(token[4],context.push(value),partials,originalTemplate)}else if(isFunction(value)){if(typeof originalTemplate!=='string')throw new Error('Cannot use higher-order sections without the original template');value=value.call(context.view,originalTemplate.slice(token[3],token[5]),subRender);if(value!=null)buffer+=value}else{buffer+=this.renderTokens(token[4],context,partials,originalTemplate)}break;case'^':value=context.lookup(token[1]);if(!value||(isArray(value)&&value.length===0))buffer+=this.renderTokens(token[4],context,partials,originalTemplate);break;case'>':if(!partials)continue;value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null)buffer+=this.renderTokens(this.parse(value),context,partials,value);break;case'&':value=context.lookup(token[1]);if(value!=null)buffer+=value;break;case'name':value=context.lookup(token[1]);if(value!=null)buffer+=mustache.escape(value);break;case'text':buffer+=token[1];break}}return buffer};mustache.name="mustache.js";mustache.version="0.8.1";mustache.tags=["{{","}}"];var defaultWriter=new Writer();mustache.clearCache=function(){return defaultWriter.clearCache()};mustache.parse=function(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function(template,view,partials){return defaultWriter.render(template,view,partials)};mustache.to_html=function(template,view,partials,send){var result=mustache.render(template,view,partials);if(isFunction(send)){send(result)}else{return result}};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer}));
... ... @@ -269,7 +269,7 @@ if(typeof(i3GEO)===&#39;undefined&#39;){var i3GEO={}}var objposicaocursor={ddx:&quot;&quot;,ddy:&quot;&quot;
269 269 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDSMENUS:[],buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}}conta+=1}}}};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>";return retorno.data};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig++){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadarquivos/dependencias.php","i3GEOF.uploadarquivos.iniciaJanelaFlutuante()","i3GEOF.uploadarquivos_script")},conectaservico:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectarservicos/dependencias.php","i3GEOF.conectarservicos.iniciaJanelaFlutuante()","i3GEOF.conectarservicos_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/dependencias.php","i3GEOF.buscainde.iniciaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/dependencias.php","i3GEOF.nuvemtags.iniciaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","",$trad("x44"))},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","<div class='i3GeoTituloJanela'>"+$trad("x45")+"</div>")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/dependencias.php","i3GEOF.importarwmc.iniciaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","<div class='i3GeoTituloJanela'>WFS</div>")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}};
270 270 //
271 271 //compactados/editor_compacto.js
272   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","<div class='i3GeoTituloJanela'>Editor</div>","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};$(janela[0].close).click(fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorgm/editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorol/editorol.js","i3GEO.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false});i3GEO.editorOL.backup.setMap(i3geoOL);i3GEO.editorOL.backup.getFeatures=function(){return i3GEO.editorOL.backup.getSource().getFeatures()}}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'zoomin':false,'zoomout':false,'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':false,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}};
  272 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={botoes:{'zoomin':false,'zoomout':false,'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':false,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true},inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","<div class='i3GeoTituloJanela'>Editor</div>","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};$(janela[0].close).click(fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorgm/editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorol/editorol.js","i3GEO.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false});i3GEO.editorOL.backup.setMap(i3geoOL);i3GEO.editorOL.backup.getFeatures=function(){return i3GEO.editorOL.backup.getSource().getFeatures()}}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editor.botoes)}}}};
273 273 //
274 274 //compactados/coordenadas_compacto.js
275 275 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.coordenadas={padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"D&eacute;c. de grau",ativo:true,defepsg:""},"geohash":{idhtml:"localizarxy",tipo:"codigo",tipoCodigo:"geohash",titulo:"GeoHash",ativo:true},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"},"mostraCoordenadasGeohash":{idhtml:"localizarxy"}},MODOTEXTO:"",atualizaLocalizarGeo:function(id,x,y){if(!id||id==""){id="coordgeotabela"}if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}var temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}else{i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('localizarxygeoProj')"])}},geo2zonaUtm:function(l){l=(l*1)+180;l=l/6;return parseInt(l,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<div style="display:block;" class="i3GeoMascaraCoord" id='+prefixo+' >'+caixa+'&nbsp;X:&nbsp;'+'<input type="text" name="" value="-00" size="3" title="grau" id="'+prefixo+'xg" onclick="javascript:this.select();">'+'<input type="text" name="" value="00" size="2" title="minuto" id="'+prefixo+'xm" onclick="javascript:this.select();">'+'<input type="text" name="" value="00.00" size="5" title="segundo" id="'+prefixo+'xs" onclick="javascript:this.select();">'+'&nbsp;Y:&nbsp;'+'<input type="text" name="" value="-00" size="3" title="grau" id="'+prefixo+'yg" onclick="javascript:this.select();">'+'<input type="text" name="" value="00" size="2" title="minuto" id="'+prefixo+'ym" onclick="javascript:this.select();">'+'<input type="text" name="" value="00.00" size="5" title="segundo" id="'+prefixo+'ys" onclick="javascript:this.select();">',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<img class=ticfind style="margin-left:8px;" title=zoom onclick="'+temp+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" />'+"</div>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");if($i(prefixo+"xg")){$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2]}i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br><br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<div style='display:block;' id="+prefixo+" class='i3GeoMascaraCoord' >"+caixa+"&nbsp;X:&nbsp;"+'<input type="text" name="" value="00" size="12" title="X" id="'+prefixo+'X" >'+"&nbsp;Y:&nbsp;"+'<input type="text" name="" value="00" size="12" title="Y" id="'+prefixo+'Y" >'+"&nbsp;Zn:&nbsp;"+'<input type="text" name="" value="--" size="2" title="Zona" id="'+prefixo+'ZN" >'+"</div>";return ins},criaMascaraCodigo:function(prefixo,titulo,caixa,tipoCodigo){var funcao="",ins="";if(tipoCodigo==="geohash"){funcao="i3GEO.coordenadas.geohash.zoomCodigo(\'"+prefixo+"Codigo\')"}ins="<div style='display:block;' id="+prefixo+" class='i3GeoMascaraCoord' >"+caixa+"&nbsp;"+'<input type="text" name="" value="00" size="12" title="Cod" id="'+prefixo+'Codigo" >'+"&nbsp;"+'<img class=ticfind style="margin-left:8px;" title=zoom onclick="'+funcao+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" />'+"</div>";return ins},atualizaCodigo:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('"+onde+"','"+configProj+"')"])};var ondeValor=$i(onde+configProj+"Codigo"),temp=i3GEO.coordenadas.config[configProj],codigo="";onde=$i(onde);if(onde&&onde.style.display==="none"){remove();return}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipoCodigo==="geohash"){if($i("localizarxygeohash")&&$i("localizarxygeohash").style.display==="none"){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('localizarxy','geohash')"])}codigo=i3GEO.coordenadas.geohash.encodeGeoHash(y,x)}i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" : "+codigo+"<br><br>";if(ondeValor){ondeValor.value=codigo}},atualizaProj4:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaProj4('"+onde+"','"+configProj+"')"])};var zona,temp,p,destino="",iu=i3GEO.util;temp=i3GEO.coordenadas.config[configProj];if($i(onde+configProj)&&$i(onde+configProj).style.display==="none"){remove();return}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);if($i(onde+configProj+"ZN")){$i(onde+configProj+"ZN").value=zona}if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br><br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value=="janela"){i3GEO.coordenadas.mostraCoordenadasJanela();obj.value="geoProj"}this.padrao=obj.value;i3GEO.coordenadas.ativaBloco(onde);i3GEO.coordenadas.ativaEventos()},mostraCoordenadasJanela:function(x,y){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela,nomeFunc;caixa="";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela"+tipos[i],temp.titulo,caixa)}else{if(temp.tipo==="codigo"){ins+=i3GEO.coordenadas.criaMascaraCodigo("coordgeotabela"+tipos[i],temp.titulo,temp.titulo,temp.tipoCodigo)}else{ins+=i3GEO.coordenadas.criaMascaraMetrica("coordgeotabela"+tipos[i],temp.titulo,caixa)}}}}janela=i3GEO.janela.cria("510px","210px","","","","<div class='i3GeoTituloJanela'>"+$trad("x49")+"</div>","i3GEOJanelaCoordenadas",false,"hd","","");$(janela[0].close).click(function(){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.tipo==="geo"){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('coordgeotabela"+tipos[i]+"')"])}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}i3GEO.eventos.removeEventos("MOUSEMOVE",[nomeFunc+"('coordgeotabela"+tipos[i]+"')"])}}});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="rgb(0, 60, 136)";temp.style.color="white";temp.style.fontSize="12px";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:white' onclick='"+"$(document).keypress(function(e) {if(e.altKey && e.which == 99) {"+"i3GEO.util.copyToClipboard(i3GEO.coordenadas.MODOTEXTO);'>"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas em mem&oacute;ria</a>";$i(onde).innerHTML=ins;i3GEO.coordenadas.ativaEventos("coordgeotabela")},ativaEventos:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;if(!prefixo){prefixo="localizarxy"}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('"+prefixo+tipos[i]+"')"])}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}i3GEO.eventos.adicionaEventos("MOUSEMOVE",[nomeFunc+"('"+prefixo+"','"+tipos[i]+"')"])}}}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""},geohash:{BITS:[16,8,4,2,1],BASE32:"0123456789bcdefghjkmnpqrstuvwxyz",refine_interval:function(interval,cd,mask){if(cd&mask)interval[0]=(interval[0]+interval[1])/2;else interval[1]=(interval[0]+interval[1])/2},decodeGeoHash:function(geohash){var is_even=1,lat=[],lon=[],i,j,x,y;lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;lat_err=90.0;lon_err=180.0;for(i=0;i<geohash.length;i++){c=geohash[i];cd=i3GEO.coordenadas.geohash.BASE32.indexOf(c);for(j=0;j<5;j++){mask=i3GEO.coordenadas.geohash.BITS[j];if(is_even){lon_err/=2;i3GEO.coordenadas.geohash.refine_interval(lon,cd,mask)}else{lat_err/=2;i3GEO.coordenadas.geohash.refine_interval(lat,cd,mask)}is_even=!is_even}}lat[2]=(lat[0]+lat[1])/2;lon[2]=(lon[0]+lon[1])/2;y=(lat[0]+lat[1])/2;x=(lon[0]+lon[1])/2;return{"latitude":y,"longitude":x}},encodeGeoHash:function(latitude,longitude){var mid,is_even=1,lat=[],lon=[],bit=0,ch=0,precision=12,geohash="";lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;while(geohash.length<precision){if(is_even){mid=(lon[0]+lon[1])/2;if(longitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lon[0]=mid}else lon[1]=mid}else{mid=(lat[0]+lat[1])/2;if(latitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lat[0]=mid}else lat[1]=mid}is_even=!is_even;if(bit<4)bit++;else{geohash+=i3GEO.coordenadas.geohash.BASE32[ch];bit=0;ch=0}}return geohash},zoomCodigo:function(idobj){var codigo;if($i(idobj)){codigo=$i(idobj).value}else{codigo=idobj}codigo=i3GEO.coordenadas.geohash.decodeGeoHash(codigo);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,codigo.longitude,codigo.latitude)}},zoomPonto:function(){var localizarxygeoProjxxx=i3GEO.calculo.dms2dd($i('localizarxygeoProjxg').value,$i('localizarxygeoProjxm').value,$i('localizarxygeoProjxs').value);var localizarxygeoProjyyy=i3GEO.calculo.dms2dd($i('localizarxygeoProjyg').value,$i('localizarxygeoProjym').value,$i('localizarxygeoProjys').value);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,localizarxygeoProjxxx,localizarxygeoProjyyy)}};
... ...
js/i3geo_tudo_compacto7.js.php 100755 → 100644
... ... @@ -206,7 +206,7 @@ d.parent(&quot;.dropdown-menu&quot;).length&amp;&amp;(d=d.closest(&quot;li.dropdown&quot;).addClass(&quot;active&quot;
206 206 (function(global){var beginsWith,endsWith,root,Wkt;root=this;Wkt=function(obj){if(obj instanceof Wkt)return obj;if(!(this instanceof Wkt))return new Wkt(obj);this._wrapped=obj};if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports){exports=module.exports=Wkt}exports.Wkt=Wkt}else{root.Wkt=Wkt}beginsWith=function(str,sub){return str.substring(0,sub.length)===sub};endsWith=function(str,sub){return str.substring(str.length-sub.length)===sub};Wkt.delimiter=' ';Wkt.isArray=function(obj){return!!(obj&&obj.constructor===Array)};Wkt.trim=function(str,sub){sub=sub||' ';while(beginsWith(str,sub)){str=str.substring(1)}while(endsWith(str,sub)){str=str.substring(0,str.length-1)}return str};Wkt.Wkt=function(initializer){this.delimiter=Wkt.delimiter||' ';this.wrapVertices=true;this.regExes={'typeStr':/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,'spaces':/\s+|\+/, 'numeric':/-*\d+(\.*\d+)?/,'comma':/\s*,\s*/,'parenComma':/\)\s*,\s*\(/,'coord':/-*\d+\.*\d+ -*\d+\.*\d+/, 'doubleParenComma':/\)\s*\)\s*,\s*\(\s*\(/,'trimParens':/^\s*\(?(.*?)\)?\s*$/,'ogcTypes':/^(multi)?(point|line|polygon|box)?(string)?$/i,'crudeJson':/^{.*"(type|coordinates|geometries|features)":.*}$/};this.components=undefined;if(initializer&&typeof initializer==='string'){this.read(initializer)}else if(initializer&&typeof initializer!==undefined){this.fromObject(initializer)}};global.Wkt=Wkt;Wkt.Wkt.prototype.isCollection=function(){switch(this.type.slice(0,5)){case'multi':return true;case'polyg':return true;default:return false}};Wkt.Wkt.prototype.sameCoords=function(a,b){return(a.x===b.x&&a.y===b.y)};Wkt.Wkt.prototype.fromObject=function(obj){var result;if(obj.hasOwnProperty('type')&&obj.hasOwnProperty('coordinates')){result=this.fromJson(obj)}else{result=this.deconstruct.call(this,obj)}this.components=result.components;this.isRectangle=result.isRectangle||false;this.type=result.type;return this};Wkt.Wkt.prototype.toObject=function(config){var obj=this.construct[this.type].call(this,config);if(typeof obj==='object'&&!Wkt.isArray(obj)){obj.properties=this.properties}return obj};Wkt.Wkt.prototype.toString=function(config){return this.write()};Wkt.Wkt.prototype.fromJson=function(obj){var i,j,k,coords,iring,oring;this.type=obj.type.toLowerCase();this.components=[];if(obj.hasOwnProperty('geometry')){this.fromJson(obj.geometry);this.properties=obj.properties;return this}coords=obj.coordinates;if(!Wkt.isArray(coords[0])){this.components.push({x:coords[0],y:coords[1]})}else{for(i in coords){if(coords.hasOwnProperty(i)){if(!Wkt.isArray(coords[i][0])){if(this.type==='multipoint'){this.components.push([{x:coords[i][0],y:coords[i][1]}])}else{this.components.push({x:coords[i][0],y:coords[i][1]})}}else{oring=[];for(j in coords[i]){if(coords[i].hasOwnProperty(j)){if(!Wkt.isArray(coords[i][j][0])){oring.push({x:coords[i][j][0],y:coords[i][j][1]})}else{iring=[];for(k in coords[i][j]){if(coords[i][j].hasOwnProperty(k)){iring.push({x:coords[i][j][k][0],y:coords[i][j][k][1]})}}oring.push(iring)}}}this.components.push(oring)}}}}return this};Wkt.Wkt.prototype.toJson=function(){var cs,json,i,j,k,ring,rings;cs=this.components;json={coordinates:[],type:(function(){var i,type,s;type=this.regExes.ogcTypes.exec(this.type).slice(1);s=[];for(i in type){if(type.hasOwnProperty(i)){if(type[i]!==undefined){s.push(type[i].toLowerCase().slice(0,1).toUpperCase()+type[i].toLowerCase().slice(1))}}}return s}.call(this)).join('')};if(this.type.toLowerCase()==='box'){json.type='Polygon';json.bbox=[];for(i in cs){if(cs.hasOwnProperty(i)){json.bbox=json.bbox.concat([cs[i].x,cs[i].y])}}json.coordinates=[[[cs[0].x,cs[0].y],[cs[0].x,cs[1].y],[cs[1].x,cs[1].y],[cs[1].x,cs[0].y],[cs[0].x,cs[0].y]]];return json}for(i in cs){if(cs.hasOwnProperty(i)){if(Wkt.isArray(cs[i])){rings=[];for(j in cs[i]){if(cs[i].hasOwnProperty(j)){if(Wkt.isArray(cs[i][j])){ring=[];for(k in cs[i][j]){if(cs[i][j].hasOwnProperty(k)){ring.push([cs[i][j][k].x,cs[i][j][k].y])}}rings.push(ring)}else{if(cs[i].length>1){rings.push([cs[i][j].x,cs[i][j].y])}else{rings=rings.concat([cs[i][j].x,cs[i][j].y])}}}}json.coordinates.push(rings)}else{if(cs.length>1){json.coordinates.push([cs[i].x,cs[i].y])}else{json.coordinates=json.coordinates.concat([cs[i].x,cs[i].y])}}}}return json};Wkt.Wkt.prototype.merge=function(wkt){var prefix=this.type.slice(0,5);if(this.type!==wkt.type){if(this.type.slice(5,this.type.length)!==wkt.type){throw TypeError('The input geometry types must agree or the calling this.Wkt.Wkt instance must be a multigeometry of the other')}}switch(prefix){case'point':this.components=[this.components.concat(wkt.components)];break;case'multi':this.components=this.components.concat((wkt.type.slice(0,5)==='multi')?wkt.components:[wkt.components]);break;default:this.components=[this.components,wkt.components];break}if(prefix!=='multi'){this.type='multi'+this.type}return this};Wkt.Wkt.prototype.read=function(str){var matches;matches=this.regExes.typeStr.exec(str);if(matches){this.type=matches[1].toLowerCase();this.base=matches[2];if(this.ingest[this.type]){this.components=this.ingest[this.type].apply(this,[this.base])}}else{if(this.regExes.crudeJson.test(str)){if(typeof JSON==='object'&&typeof JSON.parse==='function'){this.fromJson(JSON.parse(str))}else{console.log('JSON.parse() is not available; cannot parse GeoJSON strings');throw{name:'JSONError',message:'JSON.parse() is not available; cannot parse GeoJSON strings'}}}else{console.log('Invalid WKT string provided to read()');throw{name:'WKTError',message:'Invalid WKT string provided to read()'}}}return this};Wkt.Wkt.prototype.write=function(components){var i,pieces,data;components=components||this.components;pieces=[];pieces.push(this.type.toUpperCase()+'(');for(i=0;i<components.length;i+=1){if(this.isCollection()&&i>0){pieces.push(',')}if(!this.extract[this.type]){return null}data=this.extract[this.type].apply(this,[components[i]]);if(this.isCollection()&&this.type!=='multipoint'){pieces.push('('+data+')')}else{pieces.push(data);if(i!==(components.length-1)&&this.type!=='multipoint'){pieces.push(',')}}}pieces.push(')');return pieces.join('')};Wkt.Wkt.prototype.extract={point:function(point){return String(point.x)+this.delimiter+String(point.y)},multipoint:function(multipoint){var i,parts=[],s;for(i=0;i<multipoint.length;i+=1){s=this.extract.point.apply(this,[multipoint[i]]);if(this.wrapVertices){s='('+s+')'}parts.push(s)}return parts.join(',')},linestring:function(linestring){return this.extract.point.apply(this,[linestring])},multilinestring:function(multilinestring){var i,parts=[];for(i=0;i<multilinestring.length;i+=1){parts.push(this.extract.linestring.apply(this,[multilinestring[i]]))}return parts.join(',')},polygon:function(polygon){return this.extract.multilinestring.apply(this,[polygon])},multipolygon:function(multipolygon){var i,parts=[];for(i=0;i<multipolygon.length;i+=1){parts.push('('+this.extract.polygon.apply(this,[multipolygon[i]])+')')}return parts.join(',')},box:function(box){return this.extract.linestring.apply(this,[box])},geometrycollection:function(str){console.log('The geometrycollection WKT type is not yet supported.')}};Wkt.Wkt.prototype.ingest={point:function(str){var coords=Wkt.trim(str).split(this.regExes.spaces);return[{x:parseFloat(this.regExes.numeric.exec(coords[0])[0]),y:parseFloat(this.regExes.numeric.exec(coords[1])[0])}]},multipoint:function(str){var i,components,points;components=[];points=Wkt.trim(str).split(this.regExes.comma);for(i=0;i<points.length;i+=1){components.push(this.ingest.point.apply(this,[points[i]]))}return components},linestring:function(str){var i,multipoints,components;multipoints=this.ingest.multipoint.apply(this,[str]);components=[];for(i=0;i<multipoints.length;i+=1){components=components.concat(multipoints[i])}return components},multilinestring:function(str){var i,components,line,lines;components=[];lines=Wkt.trim(str).split(this.regExes.doubleParenComma);if(lines.length===1){lines=Wkt.trim(str).split(this.regExes.parenComma)}for(i=0;i<lines.length;i+=1){line=lines[i].replace(this.regExes.trimParens,'$1');components.push(this.ingest.linestring.apply(this,[line]))}return components},polygon:function(str){var i,j,components,subcomponents,ring,rings;rings=Wkt.trim(str).split(this.regExes.parenComma);components=[];for(i=0;i<rings.length;i+=1){ring=rings[i].replace(this.regExes.trimParens,'$1').split(this.regExes.comma);subcomponents=[];for(j=0;j<ring.length;j+=1){var split=ring[j].split(this.regExes.spaces);if(split.length>2){split=split.filter(function(n){return n!=""})}if(split.length===2){var x_cord=split[0];var y_cord=split[1];subcomponents.push({x:parseFloat(x_cord),y:parseFloat(y_cord)})}}components.push(subcomponents)}return components},box:function(str){var i,multipoints,components;multipoints=this.ingest.multipoint.apply(this,[str]);components=[];for(i=0;i<multipoints.length;i+=1){components=components.concat(multipoints[i])}return components},multipolygon:function(str){var i,components,polygon,polygons;components=[];polygons=Wkt.trim(str).split(this.regExes.doubleParenComma);for(i=0;i<polygons.length;i+=1){polygon=polygons[i].replace(this.regExes.trimParens,'$1');components.push(this.ingest.polygon.apply(this,[polygon]))}return components},geometrycollection:function(str){console.log('The geometrycollection WKT type is not yet supported.')}};return this}(this));
207 207 //
208 208 //compactados/ini_i3geo_compacto.js
209   -var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,init:function(parametrosMapa,configMapa){$.material.init();if(parametrosMapa&&parametrosMapa!=""){i3GEO.configura.mashuppar=i3GEO.parametrosMapa2mashuppar(parametrosMapa)}else{i3GEO.configura.mashuppar=""}if(configMapa&&configMapa!=""){i3GEO.configMapa(configMapa)}i3GEO.cria();i3GEO.inicia();delete i3GEO.parametrosMapa2mashuppar;delete i3GEO.configMapa;delete i3GEO.init},configMapa:function(c){i3GEO.configura.guardaExtensao=(c.hasOwnProperty("saveExtension")&&c.saveExtension==true)?true:false;i3GEO.configura.tipoimagem=(c.hasOwnProperty("posRenderType")&&c.posRenderType!="")?c.posRenderType:"nenhum";i3GEO.configura.locaplic=(c.hasOwnProperty("i3GeoServer")&&c.i3GeoServer!="")?c.i3GeoServer:i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";if(c.hasOwnProperty("tools")){i3GEO.configura.ferramentas=c.tools}i3GEO.Interface.IDCORPO=(c.hasOwnProperty("mapBody")&&c.mapBody!="")?c.mapBody:"mapai3Geo";i3GEO.finalizaAPI=(c.hasOwnProperty("afterStart")&&c.afterStart!="")?c.afterStart:"";if(c.hasOwnProperty("components")){i3GEO.arvoreDeTemas.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.catalogoMenus.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.busca.SERVICO=(c.components.hasOwnProperty("searchService"))?c.components.searchService:"";i3GEO.busca.SERVICOWMS=(c.components.hasOwnProperty("searchWms"))?c.components.searchWms:"";i3GEO.mapa.BALAOATIVO=(c.components.hasOwnProperty("info"))?c.components.info:true;i3GEO.mapa.INFOTEMPLATE=(c.components.hasOwnProperty("infoTemplate")&&c.components.infoTemplate!="")?c.components.infoTemplate:i3GEO.configura.locaplic+i3GEO.mapa.INFOTEMPLATE;if(c.components.referenceMapPosition){i3GEO.maparef.TOP=c.components.referenceMapPosition[0];i3GEO.maparef.RIGHT=c.components.referenceMapPosition[1]}if(c.components.scrollBar){i3GEO.janela.scrollBar=c.components.scrollBar}if(c.components.tooltip){var p=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP;p.removeAoAdicionar=(c.components.tooltip.hasOwnProperty("removeAoAdicionar"))?c.components.tooltip.removeAoAdicionar:true;p.autoPan=(c.components.tooltip.hasOwnProperty("autoPan"))?c.components.tooltip.autoPan:true;p.modal=(c.components.tooltip.hasOwnProperty("modal"))?c.components.tooltip.modal:false;p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:"";p.templateModal=(c.components.tooltip.hasOwnProperty("templateModal"))?c.components.tooltip.templateModal:"";p.simple=(c.components.tooltip.hasOwnProperty("simple"))?c.components.tooltip.simple:true;p.minWidth=(c.components.tooltip.hasOwnProperty("minWidth"))?c.components.tooltip.minWidth:'';p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:'200px';p.autoPanAnimation=(c.components.tooltip.hasOwnProperty("autoPanAnimation"))?c.components.tooltip.autoPanAnimation:p.autoPanAnimation;if(c.components.tooltip.hasOwnProperty("toolTipSize")){i3GEO.configura.alturatip=c.components.tooltip.toolTipSize[0];i3GEO.configura.larguratip=c.components.tooltip.toolTipSize[1]}}}if(c.hasOwnProperty("openLayers")&&c.mapType!=="GM"){i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.openlayers.googleLike=(c.mapType=="OSM")?true:false;i3GEO.Interface.openlayers.TILES=(c.hasOwnProperty("singleTile")&&c.singleTile!="")?!c.singleTile:true;i3GEO.Interface.openlayers.parametrosMap=c.openLayers.MapOptions;i3GEO.Interface.openlayers.parametrosView=c.openLayers.ViewOptions}if(c.hasOwnProperty("googleMaps")&&c.mapType=="GM"){i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.googlemaps.ESTILOPADRAO=c.googleMaps.MapOptions.mapTypeId;i3GEO.Interface.googlemaps.MAPOPTIONS=c.googleMaps.MapOptions}},parametrosMapa2mashuppar:function(p){var par=[];if(p.hasOwnProperty("mapfilebase")&&p.mapfilebase!=""){par.push("&base="+p.mapfilebase)}if(p.hasOwnProperty("mapext")&&p.mapext!=""&&p.mapext.length==4){par.push("&mapext="+p.mapext.join(","));i3GEO.configura.guardaExtensao=false}if(p.hasOwnProperty("perfil")&&p.perfil!=""){par.push("&perfil="+p.perfil)}if(p.hasOwnProperty("layers")){if(p.layers.add&&p.layers.add.length>0){par.push("&temasa="+p.layers.add.join(","))}if(p.layers.on&&p.layers.on.length>0){par.push("&layers="+p.layers.on.join(","))}if(p.layers.off&&p.layers.off.length>0){par.push("&desligar="+p.layers.off.join(","))}}if(p.hasOwnProperty("points")&&p.points.length>0){par.push("&nometemapontos="+p.points.title);par.push("&pontos="+p.points.coord.join(","))}if(p.hasOwnProperty("lines")){var n=[];jQuery.each(p.lines.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemalinhas="+p.lines.title);par.push("&linhas="+n.join(","))}}if(p.hasOwnProperty("polygons")){var n=[];jQuery.each(p.polygons.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemapoligonos="+p.polygons.title);par.push("&poligonos="+n.join(","))}}if(p.hasOwnProperty("wkt")&&p.wkt.coord!=""){par.push("&nometemawkt="+p.wkt.title);par.push("&wkt="+p.wkt.coord)}if(p.hasOwnProperty("symbol")){if(p.symbol.name!=""){par.push("&simbolo="+p.symbol.name)}if(p.symbol.color!=""){par.push("&corsimbolo="+p.symbol.color)}if(p.symbol.size!=""){par.push("&tamanhosimbolo="+p.symbol.size)}}if(p.kml&&p.kml.url!=""){par.push("&kmlurl="+p.kml.url)}if(p.hasOwnProperty("wms")&&p.wms.url!=""){if(p.wms.url!=""){par.push("&url_wms="+p.wms.url)}if(p.wms.layer!=""){par.push("&layer_wms="+p.wms.layer)}if(p.wms.style!=""){par.push("&style_wms="+p.wms.style)}if(p.wms.title!=""){par.push("&nome_wms="+p.wms.title)}if(p.wms.srs!=""){par.push("&srs_wms="+p.wms.srs)}if(p.wms.imagetype!=""){par.push("&image_wms="+p.wms.imagetype)}if(p.wms.version!=""){par.push("&versao_wms="+p.wms.version)}}if(p.hasOwnProperty("filters")){var n=[];jQuery.each(p.filters,function(index,value){if(value.layer!=""){n.push("&map_layer_"+value.layer+"_filter="+value.expression)}});if(n.length>0){par.push(n.join(""))}}return par.join("")},cria:function(){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth();$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){temp=temp[1].split("&");if(temp[0]&&temp[0]!=""){i3GEO.configura.sid=temp[0];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height){i3GEO.Interface.cria(parseInt(temp.style.width,10),parseInt(temp.style.height,10))}else{tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])}},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho,temp;i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoOLUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);return}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp&&temp!=""){temp=temp.replace(/[]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie()}i3GEO.arvoreDeCamadas.registaCamadas(retorno.data.temas);if(i3GEO.parametros.editor==="sim"){i3GEO.listaDeFerramentas=i3GEO.login.adicionaMenuSuspenso(i3GEO.listaDeFerramentas)}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){if(preferencias.geometriasbase64&&preferencias.geometriasbase64!=""){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}if(preferencias.graficosbase64&&preferencias.graficosbase64!=""){i3GEO.mapa.restauraGraficos(preferencias.graficosbase64)}if(preferencias.tabelasbase64&&preferencias.tabelasbase64!=""){i3GEO.mapa.restauraTabelas(preferencias.tabelasbase64)}}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}temp=$i("i3geo");temp.className="yui-skin-sam";if(document.body.id==="i3geo"&&temp.style&&!temp.style.overflow&&i3GEO.Interface.ATUAL==="openlayers"){temp.style.overflow="hidden"}if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);return}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.parametros.w,i3GEO.parametros.h)}},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();i3GEO.mapa.ativaAutoResize()},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(!retorno.data){alert("Ocorreu um erro ao carregar o mapa"+retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}temp=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);try{i3GEO.arvoreDeCamadas.atualiza(temp);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.registaCamadas(temp);i3GEO.Interface.redesenha();if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-novoh);document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;i3GEO.parametros.w=w;i3GEO.parametros.h=h;return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=antigoh-novoh;document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;temp=function(){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=i3GEO.Interface.BARRADEZOOMRIGHT+"px";if(i3GEO.Interface.BARRADEZOOMLEFT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=null}if(i3GEO.Interface.BARRADEZOOMRIGHT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=null}}break};i3GEO.guias.ALTURACORPOGUIAS=h;return[w,h]};i3GEO.php.mudatamanho(temp,h,w)},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
  209 +var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,init:function(parametrosMapa,configMapa){$.material.init();if(parametrosMapa&&parametrosMapa!=""){i3GEO.configura.mashuppar=i3GEO.parametrosMapa2mashuppar(parametrosMapa)}else{i3GEO.configura.mashuppar=""}if(configMapa&&configMapa!=""){i3GEO.configMapa(configMapa)}i3GEO.cria();i3GEO.inicia();delete i3GEO.parametrosMapa2mashuppar;delete i3GEO.configMapa;delete i3GEO.init},configMapa:function(c){i3GEO.configura.guardaExtensao=(c.hasOwnProperty("saveExtension")&&c.saveExtension==true)?true:false;i3GEO.configura.tipoimagem=(c.hasOwnProperty("posRenderType")&&c.posRenderType!="")?c.posRenderType:"nenhum";i3GEO.configura.locaplic=(c.hasOwnProperty("i3GeoServer")&&c.i3GeoServer!="")?c.i3GeoServer:i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo";if(c.hasOwnProperty("tools")){i3GEO.configura.ferramentas=c.tools}i3GEO.Interface.IDCORPO=(c.hasOwnProperty("mapBody")&&c.mapBody!="")?c.mapBody:"mapai3Geo";i3GEO.finalizaAPI=(c.hasOwnProperty("afterStart")&&c.afterStart!="")?c.afterStart:"";if(c.hasOwnProperty("components")){i3GEO.arvoreDeTemas.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.catalogoMenus.IDSMENUS=(c.components.hasOwnProperty("idsMenus"))?c.components.idsMenus:[];i3GEO.busca.SERVICO=(c.components.hasOwnProperty("searchService"))?c.components.searchService:"";i3GEO.busca.SERVICOWMS=(c.components.hasOwnProperty("searchWms"))?c.components.searchWms:"";i3GEO.mapa.BALAOATIVO=(c.components.hasOwnProperty("info"))?c.components.info:true;i3GEO.mapa.INFOTEMPLATE=(c.components.hasOwnProperty("infoTemplate")&&c.components.infoTemplate!="")?c.components.infoTemplate:i3GEO.configura.locaplic+i3GEO.mapa.INFOTEMPLATE;if(c.components.referenceMapPosition){i3GEO.maparef.TOP=c.components.referenceMapPosition[0];i3GEO.maparef.RIGHT=c.components.referenceMapPosition[1]}if(c.components.scrollBar){i3GEO.janela.scrollBar=c.components.scrollBar}if(c.components.tooltip){var p=i3GEO.Interface[i3GEO.Interface.ATUAL].BALAOPROP;p.removeAoAdicionar=(c.components.tooltip.hasOwnProperty("removeAoAdicionar"))?c.components.tooltip.removeAoAdicionar:true;p.autoPan=(c.components.tooltip.hasOwnProperty("autoPan"))?c.components.tooltip.autoPan:true;p.modal=(c.components.tooltip.hasOwnProperty("modal"))?c.components.tooltip.modal:false;p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:"";p.templateModal=(c.components.tooltip.hasOwnProperty("templateModal"))?c.components.tooltip.templateModal:"";p.simple=(c.components.tooltip.hasOwnProperty("simple"))?c.components.tooltip.simple:true;p.minWidth=(c.components.tooltip.hasOwnProperty("minWidth"))?c.components.tooltip.minWidth:'';p.url=(c.components.tooltip.hasOwnProperty("url"))?c.components.tooltip.url:'200px';p.autoPanAnimation=(c.components.tooltip.hasOwnProperty("autoPanAnimation"))?c.components.tooltip.autoPanAnimation:p.autoPanAnimation;if(c.components.tooltip.hasOwnProperty("toolTipSize")){i3GEO.configura.alturatip=c.components.tooltip.toolTipSize[0];i3GEO.configura.larguratip=c.components.tooltip.toolTipSize[1]}}}if(c.hasOwnProperty("openLayers")&&c.mapType!=="GM"){var d=c.openLayers;i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.openlayers.googleLike=(c.mapType=="OSM")?true:false;i3GEO.Interface.openlayers.TILES=(d.hasOwnProperty("singleTile")&&d.singleTile!="")?!d.singleTile:true;i3GEO.Interface.openlayers.parametrosMap=d.MapOptions;i3GEO.Interface.openlayers.parametrosView=d.ViewOptions;if(d.hasOwnProperty("editorButtons")&&d.editorButtons!=""){i3GEO.editor.botoes=d.editorButtons}}if(c.hasOwnProperty("googleMaps")&&c.mapType=="GM"){i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.googlemaps.ESTILOPADRAO=c.googleMaps.MapOptions.mapTypeId;i3GEO.Interface.googlemaps.MAPOPTIONS=c.googleMaps.MapOptions}},parametrosMapa2mashuppar:function(p){var par=[];if(p.hasOwnProperty("mapfilebase")&&p.mapfilebase!=""){par.push("&base="+p.mapfilebase)}if(p.hasOwnProperty("mapext")&&p.mapext!=""&&p.mapext.length==4){par.push("&mapext="+p.mapext.join(","));i3GEO.configura.guardaExtensao=false}if(p.hasOwnProperty("perfil")&&p.perfil!=""){par.push("&perfil="+p.perfil)}if(p.hasOwnProperty("layers")){if(p.layers.add&&p.layers.add.length>0){par.push("&temasa="+p.layers.add.join(","))}if(p.layers.on&&p.layers.on.length>0){par.push("&layers="+p.layers.on.join(","))}if(p.layers.off&&p.layers.off.length>0){par.push("&desligar="+p.layers.off.join(","))}}if(p.hasOwnProperty("points")&&p.points.length>0){par.push("&nometemapontos="+p.points.title);par.push("&pontos="+p.points.coord.join(","))}if(p.hasOwnProperty("lines")){var n=[];jQuery.each(p.lines.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemalinhas="+p.lines.title);par.push("&linhas="+n.join(","))}}if(p.hasOwnProperty("polygons")){var n=[];jQuery.each(p.polygons.coord,function(index,value){if(value.length>0){n.push(value.join(" "))}});if(n.length>0){par.push("&nometemapoligonos="+p.polygons.title);par.push("&poligonos="+n.join(","))}}if(p.hasOwnProperty("wkt")&&p.wkt.coord!=""){par.push("&nometemawkt="+p.wkt.title);par.push("&wkt="+p.wkt.coord)}if(p.hasOwnProperty("symbol")){if(p.symbol.name!=""){par.push("&simbolo="+p.symbol.name)}if(p.symbol.color!=""){par.push("&corsimbolo="+p.symbol.color)}if(p.symbol.size!=""){par.push("&tamanhosimbolo="+p.symbol.size)}}if(p.kml&&p.kml.url!=""){par.push("&kmlurl="+p.kml.url)}if(p.hasOwnProperty("wms")&&p.wms.url!=""){if(p.wms.url!=""){par.push("&url_wms="+p.wms.url)}if(p.wms.layer!=""){par.push("&layer_wms="+p.wms.layer)}if(p.wms.style!=""){par.push("&style_wms="+p.wms.style)}if(p.wms.title!=""){par.push("&nome_wms="+p.wms.title)}if(p.wms.srs!=""){par.push("&srs_wms="+p.wms.srs)}if(p.wms.imagetype!=""){par.push("&image_wms="+p.wms.imagetype)}if(p.wms.version!=""){par.push("&versao_wms="+p.wms.version)}}if(p.hasOwnProperty("filters")){var n=[];jQuery.each(p.filters,function(index,value){if(value.layer!=""){n.push("&map_layer_"+value.layer+"_filter="+value.expression)}});if(n.length>0){par.push(n.join(""))}}return par.join("")},cria:function(){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth();$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});var tamanho,temp;temp=window.location.href.split("?");if(temp[1]){temp=temp[1].split("&");if(temp[0]&&temp[0]!=""){i3GEO.configura.sid=temp[0];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}i3GEO.mapa.aplicaPreferencias();if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}temp=$i(i3GEO.Interface.IDCORPO);if(temp&&temp.style&&temp.style.width&&temp.style.height){i3GEO.Interface.cria(parseInt(temp.style.width,10),parseInt(temp.style.height,10))}else{tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])}},inicia:function(retorno){i3GEO.eventos.cliquePerm.ativoinicial=i3GEO.eventos.cliquePerm.ativo;var montaMapa,mashup,tamanho,temp;i3GEO.mapa.aplicaPreferencias();montaMapa=function(retorno){try{var temp,nomecookie="i3geoOLUltimaExtensao",preferencias="";if(retorno.bloqueado){alert(retorno.bloqueado);return}if(retorno===""){alert("Ocorreu um erro no mapa - i3GEO.inicia.montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;if(retorno.data.customizacoesinit){preferencias=JSON.parse(retorno.data.customizacoesinit);temp=i3GEO.util.base64decode(preferencias.preferenciasbase64);i3GEO.mapa.aplicaPreferencias(temp)}if(i3GEO.configura.guardaExtensao===true){if(i3GEO.Interface.openlayers.googleLike===true){nomecookie="i3geoUltima_ExtensaoOSM"}temp=i3GEO.util.pegaCookie(nomecookie);if(temp&&temp!=""){temp=temp.replace(/[]/g," ");i3GEO.parametros.mapexten=temp}i3GEO.eventos.NAVEGAMAPA.push(function(){i3GEO.util.insereCookie(nomecookie,i3GEO.parametros.mapexten)})}if(i3GEO.parametros.logado==="nao"){i3GEO.login.anulaCookie()}i3GEO.arvoreDeCamadas.registaCamadas(retorno.data.temas);if(i3GEO.parametros.editor==="sim"){i3GEO.listaDeFerramentas=i3GEO.login.adicionaMenuSuspenso(i3GEO.listaDeFerramentas)}i3GEO.Interface.inicia();if(retorno.data.customizacoesinit){if(preferencias.geometriasbase64&&preferencias.geometriasbase64!=""){temp=i3GEO.util.base64decode(preferencias.geometriasbase64);i3GEO.mapa.desCompactaLayerGrafico(temp)}if(preferencias.graficosbase64&&preferencias.graficosbase64!=""){i3GEO.mapa.restauraGraficos(preferencias.graficosbase64)}if(preferencias.tabelasbase64&&preferencias.tabelasbase64!=""){i3GEO.mapa.restauraTabelas(preferencias.tabelasbase64)}}}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}temp=$i("i3geo");temp.className="yui-skin-sam";if(document.body.id==="i3geo"&&temp.style&&!temp.style.overflow&&i3GEO.Interface.ATUAL==="openlayers"){temp.style.overflow="hidden"}if(i3GEO.configura.sid===""){mashup=function(retorno){if(retorno.bloqueado){alert(retorno.bloqueado);return}i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;if(i3GEO.mapa.TEMASINICIAIS.length>0){i3GEO.configura.mashuppar+="&temasa="+i3GEO.mapa.TEMASINICIAIS}if(i3GEO.mapa.TEMASINICIAISLIGADOS.length>0){i3GEO.configura.mashuppar+="&layers="+i3GEO.mapa.TEMASINICIAISLIGADOS}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.parametros.w,i3GEO.parametros.h)}},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();i3GEO.mapa.ativaAutoResize()},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(!retorno.data){alert("Ocorreu um erro ao carregar o mapa"+retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}temp=i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);try{i3GEO.arvoreDeCamadas.atualiza(temp);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.registaCamadas(temp);i3GEO.Interface.redesenha();if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-novoh);document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;i3GEO.parametros.w=w;i3GEO.parametros.h=h;return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;menos=0;document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=antigoh-novoh;document.body.style.height=novoh+"px";w=novow-menos+i3GEO.scrollerWidth;h=novoh;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;temp=function(){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();if(i3GEO.Interface.openlayers.OLpanzoombar){i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=i3GEO.Interface.BARRADEZOOMRIGHT+"px";if(i3GEO.Interface.BARRADEZOOMLEFT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=null}if(i3GEO.Interface.BARRADEZOOMRIGHT===0){i3GEO.Interface.openlayers.OLpanzoombar.div.style.right=null}}break};i3GEO.guias.ALTURACORPOGUIAS=h;return[w,h]};i3GEO.php.mudatamanho(temp,h,w)},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}};
210 210 //
211 211 //compactados/mustache.js
212 212 (function(global,factory){if(typeof exports==="object"&&exports){factory(exports)}else if(typeof define==="function"&&define.amd){define(['exports'],factory)}else{factory(global.Mustache={})}}(this,function(mustache){var Object_toString=Object.prototype.toString;var isArray=Array.isArray||function(object){return Object_toString.call(object)==='[object Array]'};function isFunction(object){return typeof object==='function'}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var RegExp_test=RegExp.prototype.test;function testRegExp(re,string){return RegExp_test.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':'&quot;',"'":'&#39;',"/":'&#x2F;'};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==='string')tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error('Invalid tags: '+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+'\\s*');closingTagRe=new RegExp('\\s*'+escapeRegExp(tags[1]));closingCurlyRe=new RegExp('\\s*'+escapeRegExp('}'+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length)}else{nonSpace=true}tokens.push(['text',chr,start,start+1]);start+=1;if(chr==='\n')stripSpace()}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||'name';scanner.scan(whiteRe);if(type==='='){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==='{'){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type='&'}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error('Unclosed tag at '+scanner.pos);token=[type,value,start,scanner.pos];tokens.push(token);if(type==='#'||type==='^'){sections.push(token)}else if(type==='/'){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==='name'||type==='{'||type==='&'){nonSpace=true}else if(type==='='){compileTags(value)}}openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==='text'&&lastToken&&lastToken[0]==='text'){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return squashedTokens}function nestTokens(tokens){var nestedTokens=[];var collector=nestedTokens;var sections=[];var token,section;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':case'^':collector.push(token);sections.push(token);collector=token[4]=[];break;case'/':section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return'';var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view==null?{}:view;this.cache={'.':this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index;while(context){if(name.indexOf('.')>0){value=context.view;names=name.split('.');index=0;while(value!=null&&index<names.length)value=value[names[index++]]}else{value=context.view[name]}if(value!=null)break;context=context.parent}cache[name]=value}if(isFunction(value))value=value.call(this.view);return value};function Writer(){this.cache={}}Writer.prototype.clearCache=function(){this.cache={}};Writer.prototype.parse=function(template,tags){var cache=this.cache;var tokens=cache[template];if(tokens==null)tokens=cache[template]=parseTemplate(template,tags);return tokens};Writer.prototype.render=function(template,view,partials){var tokens=this.parse(template);var context=(view instanceof Context)?view:new Context(view);return this.renderTokens(tokens,context,partials,template)};Writer.prototype.renderTokens=function(tokens,context,partials,originalTemplate){var buffer='';var self=this;function subRender(template){return self.render(template,context,partials)}var token,value;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':value=context.lookup(token[1]);if(!value)continue;if(isArray(value)){for(var j=0,valueLength=value.length;j<valueLength;++j){buffer+=this.renderTokens(token[4],context.push(value[j]),partials,originalTemplate)}}else if(typeof value==='object'||typeof value==='string'){buffer+=this.renderTokens(token[4],context.push(value),partials,originalTemplate)}else if(isFunction(value)){if(typeof originalTemplate!=='string')throw new Error('Cannot use higher-order sections without the original template');value=value.call(context.view,originalTemplate.slice(token[3],token[5]),subRender);if(value!=null)buffer+=value}else{buffer+=this.renderTokens(token[4],context,partials,originalTemplate)}break;case'^':value=context.lookup(token[1]);if(!value||(isArray(value)&&value.length===0))buffer+=this.renderTokens(token[4],context,partials,originalTemplate);break;case'>':if(!partials)continue;value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null)buffer+=this.renderTokens(this.parse(value),context,partials,value);break;case'&':value=context.lookup(token[1]);if(value!=null)buffer+=value;break;case'name':value=context.lookup(token[1]);if(value!=null)buffer+=mustache.escape(value);break;case'text':buffer+=token[1];break}}return buffer};mustache.name="mustache.js";mustache.version="0.8.1";mustache.tags=["{{","}}"];var defaultWriter=new Writer();mustache.clearCache=function(){return defaultWriter.clearCache()};mustache.parse=function(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function(template,view,partials){return defaultWriter.render(template,view,partials)};mustache.to_html=function(template,view,partials,send){var result=mustache.render(template,view,partials);if(isFunction(send)){send(result)}else{return result}};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer}));
... ... @@ -269,7 +269,7 @@ if(typeof(i3GEO)===&#39;undefined&#39;){var i3GEO={}}var objposicaocursor={ddx:&quot;&quot;,ddy:&quot;&quot;
269 269 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDSMENUS:[],buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}}conta+=1}}}};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>";return retorno.data};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig++){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadarquivos/dependencias.php","i3GEOF.uploadarquivos.iniciaJanelaFlutuante()","i3GEOF.uploadarquivos_script")},conectaservico:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectarservicos/dependencias.php","i3GEOF.conectarservicos.iniciaJanelaFlutuante()","i3GEOF.conectarservicos_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/dependencias.php","i3GEOF.buscainde.iniciaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/dependencias.php","i3GEOF.nuvemtags.iniciaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","",$trad("x44"))},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","<div class='i3GeoTituloJanela'>"+$trad("x45")+"</div>")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/dependencias.php","i3GEOF.importarwmc.iniciaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","<div class='i3GeoTituloJanela'>WFS</div>")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}};
270 270 //
271 271 //compactados/editor_compacto.js
272   -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","<div class='i3GeoTituloJanela'>Editor</div>","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};$(janela[0].close).click(fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorgm/editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorol/editorol.js","i3GEO.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false});i3GEO.editorOL.backup.setMap(i3geoOL);i3GEO.editorOL.backup.getFeatures=function(){return i3GEO.editorOL.backup.getSource().getFeatures()}}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'zoomin':false,'zoomout':false,'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':false,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}};
  272 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.editor={botoes:{'zoomin':false,'zoomout':false,'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':false,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true},inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","<div class='i3GeoTituloJanela'>Editor</div>","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};$(janela[0].close).click(fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorgm/editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/editorol/editorol.js","i3GEO.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection(),useSpatialIndex:false,name:"Backup"}),visible:false});i3GEO.editorOL.backup.setMap(i3geoOL);i3GEO.editorOL.backup.getFeatures=function(){return i3GEO.editorOL.backup.getSource().getFeatures()}}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="<div class='i3GeoTituloJanela'>"+$trad("u29")+"</div>";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editor.botoes)}}}};
273 273 //
274 274 //compactados/coordenadas_compacto.js
275 275 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.coordenadas={padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"D&eacute;c. de grau",ativo:true,defepsg:""},"geohash":{idhtml:"localizarxy",tipo:"codigo",tipoCodigo:"geohash",titulo:"GeoHash",ativo:true},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"},"mostraCoordenadasGeohash":{idhtml:"localizarxy"}},MODOTEXTO:"",atualizaLocalizarGeo:function(id,x,y){if(!id||id==""){id="coordgeotabela"}if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}var temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}else{i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('localizarxygeoProj')"])}},geo2zonaUtm:function(l){l=(l*1)+180;l=l/6;return parseInt(l,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<div style="display:block;" class="i3GeoMascaraCoord" id='+prefixo+' >'+caixa+'&nbsp;X:&nbsp;'+'<input type="text" name="" value="-00" size="3" title="grau" id="'+prefixo+'xg" onclick="javascript:this.select();">'+'<input type="text" name="" value="00" size="2" title="minuto" id="'+prefixo+'xm" onclick="javascript:this.select();">'+'<input type="text" name="" value="00.00" size="5" title="segundo" id="'+prefixo+'xs" onclick="javascript:this.select();">'+'&nbsp;Y:&nbsp;'+'<input type="text" name="" value="-00" size="3" title="grau" id="'+prefixo+'yg" onclick="javascript:this.select();">'+'<input type="text" name="" value="00" size="2" title="minuto" id="'+prefixo+'ym" onclick="javascript:this.select();">'+'<input type="text" name="" value="00.00" size="5" title="segundo" id="'+prefixo+'ys" onclick="javascript:this.select();">',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<img class=ticfind style="margin-left:8px;" title=zoom onclick="'+temp+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" />'+"</div>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");if($i(prefixo+"xg")){$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2]}i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br><br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<div style='display:block;' id="+prefixo+" class='i3GeoMascaraCoord' >"+caixa+"&nbsp;X:&nbsp;"+'<input type="text" name="" value="00" size="12" title="X" id="'+prefixo+'X" >'+"&nbsp;Y:&nbsp;"+'<input type="text" name="" value="00" size="12" title="Y" id="'+prefixo+'Y" >'+"&nbsp;Zn:&nbsp;"+'<input type="text" name="" value="--" size="2" title="Zona" id="'+prefixo+'ZN" >'+"</div>";return ins},criaMascaraCodigo:function(prefixo,titulo,caixa,tipoCodigo){var funcao="",ins="";if(tipoCodigo==="geohash"){funcao="i3GEO.coordenadas.geohash.zoomCodigo(\'"+prefixo+"Codigo\')"}ins="<div style='display:block;' id="+prefixo+" class='i3GeoMascaraCoord' >"+caixa+"&nbsp;"+'<input type="text" name="" value="00" size="12" title="Cod" id="'+prefixo+'Codigo" >'+"&nbsp;"+'<img class=ticfind style="margin-left:8px;" title=zoom onclick="'+funcao+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" />'+"</div>";return ins},atualizaCodigo:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('"+onde+"','"+configProj+"')"])};var ondeValor=$i(onde+configProj+"Codigo"),temp=i3GEO.coordenadas.config[configProj],codigo="";onde=$i(onde);if(onde&&onde.style.display==="none"){remove();return}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipoCodigo==="geohash"){if($i("localizarxygeohash")&&$i("localizarxygeohash").style.display==="none"){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaCodigo('localizarxy','geohash')"])}codigo=i3GEO.coordenadas.geohash.encodeGeoHash(y,x)}i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" : "+codigo+"<br><br>";if(ondeValor){ondeValor.value=codigo}},atualizaProj4:function(onde,configProj,x,y){var remove=function(){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaProj4('"+onde+"','"+configProj+"')"])};var zona,temp,p,destino="",iu=i3GEO.util;temp=i3GEO.coordenadas.config[configProj];if($i(onde+configProj)&&$i(onde+configProj).style.display==="none"){remove();return}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);if($i(onde+configProj+"ZN")){$i(onde+configProj+"ZN").value=zona}if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br><br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value=="janela"){i3GEO.coordenadas.mostraCoordenadasJanela();obj.value="geoProj"}this.padrao=obj.value;i3GEO.coordenadas.ativaBloco(onde);i3GEO.coordenadas.ativaEventos()},mostraCoordenadasJanela:function(x,y){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela,nomeFunc;caixa="";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela"+tipos[i],temp.titulo,caixa)}else{if(temp.tipo==="codigo"){ins+=i3GEO.coordenadas.criaMascaraCodigo("coordgeotabela"+tipos[i],temp.titulo,temp.titulo,temp.tipoCodigo)}else{ins+=i3GEO.coordenadas.criaMascaraMetrica("coordgeotabela"+tipos[i],temp.titulo,caixa)}}}}janela=i3GEO.janela.cria("510px","210px","","","","<div class='i3GeoTituloJanela'>"+$trad("x49")+"</div>","i3GEOJanelaCoordenadas",false,"hd","","");$(janela[0].close).click(function(){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.tipo==="geo"){i3GEO.eventos.removeEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('coordgeotabela"+tipos[i]+"')"])}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}i3GEO.eventos.removeEventos("MOUSEMOVE",[nomeFunc+"('coordgeotabela"+tipos[i]+"')"])}}});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="rgb(0, 60, 136)";temp.style.color="white";temp.style.fontSize="12px";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:white' onclick='"+"$(document).keypress(function(e) {if(e.altKey && e.which == 99) {"+"i3GEO.util.copyToClipboard(i3GEO.coordenadas.MODOTEXTO);'>"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas em mem&oacute;ria</a>";$i(onde).innerHTML=ins;i3GEO.coordenadas.ativaEventos("coordgeotabela")},ativaEventos:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0,nomeFunc;if(!prefixo){prefixo="localizarxy"}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('"+prefixo+tipos[i]+"')"])}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}i3GEO.eventos.adicionaEventos("MOUSEMOVE",[nomeFunc+"('"+prefixo+"','"+tipos[i]+"')"])}}}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""},geohash:{BITS:[16,8,4,2,1],BASE32:"0123456789bcdefghjkmnpqrstuvwxyz",refine_interval:function(interval,cd,mask){if(cd&mask)interval[0]=(interval[0]+interval[1])/2;else interval[1]=(interval[0]+interval[1])/2},decodeGeoHash:function(geohash){var is_even=1,lat=[],lon=[],i,j,x,y;lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;lat_err=90.0;lon_err=180.0;for(i=0;i<geohash.length;i++){c=geohash[i];cd=i3GEO.coordenadas.geohash.BASE32.indexOf(c);for(j=0;j<5;j++){mask=i3GEO.coordenadas.geohash.BITS[j];if(is_even){lon_err/=2;i3GEO.coordenadas.geohash.refine_interval(lon,cd,mask)}else{lat_err/=2;i3GEO.coordenadas.geohash.refine_interval(lat,cd,mask)}is_even=!is_even}}lat[2]=(lat[0]+lat[1])/2;lon[2]=(lon[0]+lon[1])/2;y=(lat[0]+lat[1])/2;x=(lon[0]+lon[1])/2;return{"latitude":y,"longitude":x}},encodeGeoHash:function(latitude,longitude){var mid,is_even=1,lat=[],lon=[],bit=0,ch=0,precision=12,geohash="";lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;while(geohash.length<precision){if(is_even){mid=(lon[0]+lon[1])/2;if(longitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lon[0]=mid}else lon[1]=mid}else{mid=(lat[0]+lat[1])/2;if(latitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lat[0]=mid}else lat[1]=mid}is_even=!is_even;if(bit<4)bit++;else{geohash+=i3GEO.coordenadas.geohash.BASE32[ch];bit=0;ch=0}}return geohash},zoomCodigo:function(idobj){var codigo;if($i(idobj)){codigo=$i(idobj).value}else{codigo=idobj}codigo=i3GEO.coordenadas.geohash.decodeGeoHash(codigo);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,codigo.longitude,codigo.latitude)}},zoomPonto:function(){var localizarxygeoProjxxx=i3GEO.calculo.dms2dd($i('localizarxygeoProjxg').value,$i('localizarxygeoProjxm').value,$i('localizarxygeoProjxs').value);var localizarxygeoProjyyy=i3GEO.calculo.dms2dd($i('localizarxygeoProjyg').value,$i('localizarxygeoProjym').value,$i('localizarxygeoProjys').value);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,localizarxygeoProjxxx,localizarxygeoProjyyy)}};
... ...
js/ini_i3geo.js
... ... @@ -363,12 +363,16 @@ var i3GEO = {
363 363 }
364 364 }
365 365 if(c.hasOwnProperty("openLayers") && c.mapType !== "GM" ){
  366 + var d = c.openLayers;
366 367 i3GEO.Interface.ATUAL = "openlayers";
367 368 i3GEO.Interface.openlayers.googleLike = (c.mapType == "OSM") ? true:false;
368 369 //TODO singletile nao funciona
369   - i3GEO.Interface.openlayers.TILES = (c.hasOwnProperty("singleTile") && c.singleTile != "") ? !c.singleTile:true;
370   - i3GEO.Interface.openlayers.parametrosMap = c.openLayers.MapOptions;
371   - i3GEO.Interface.openlayers.parametrosView = c.openLayers.ViewOptions;
  370 + i3GEO.Interface.openlayers.TILES = (d.hasOwnProperty("singleTile") && d.singleTile != "") ? !d.singleTile:true;
  371 + i3GEO.Interface.openlayers.parametrosMap = d.MapOptions;
  372 + i3GEO.Interface.openlayers.parametrosView = d.ViewOptions;
  373 + if(d.hasOwnProperty("editorButtons") && d.editorButtons != ""){
  374 + i3GEO.editor.botoes = d.editorButtons;
  375 + }
372 376 }
373 377 if(c.hasOwnProperty("googleMaps") && c.mapType == "GM"){
374 378 i3GEO.Interface.ATUAL = "googlemaps";
... ...
pacotes/cpaint/cpaint2_compacto.inc.js 100755 → 100644
pacotes/mobileesp/mdetect_compacto.js 100755 → 100644
pacotes/yui290/build/carousel/carousel_compacto.js 100755 → 100644
pacotes/yui290/build/container/container_compacto.js 100755 → 100644
pacotes/yui290/build/container/container_core_compacto.js 100755 → 100644
pacotes/yui290/build/resize/resize_compacto.js 100755 → 100644
pacotes/yui290/build/treeview/treeview_compacto.js 100755 → 100644
pacotes/yui290/build/utilities/utilities_compacto.js 100755 → 100644