Commit 62957acfe14f82256b09dfa2f0f11a6d8ceca4bc

Authored by Edmar Moretti
1 parent be0a5357

Criação da função i3GEO.init agregando i3GEO.cria e i3GEO.inicia

interface/black_carto_ol.htm
... ... @@ -537,9 +537,9 @@
537 537 </div>
538 538 </script>
539 539 <script>
540   - <!--inicia o mapa-->
541   - i3GEO.cria();
542   - i3GEO.inicia();
  540 + //inicia o mapa
  541 + //Veja config.php
  542 + i3GEO.init();
543 543 i3GEOF.metaestat.INTERFACE = "flutuante";
544 544 i3GEOF.metaestat.CONEXAODEFAULT = 1;
545 545 i3GEOF.metaestat.TOP = 50;
... ...
interface/black_gm.phtml
... ... @@ -558,9 +558,9 @@ include(&quot;../ms_configura.php&quot;);
558 558 </div>
559 559 </script>
560 560 <script>
561   - <!--inicia o mapa-->
562   - i3GEO.cria();
563   - i3GEO.inicia();
  561 + //inicia o mapa
  562 + //Veja config.php
  563 + i3GEO.init();
564 564 </script>
565 565 </body>
566 566  
... ...
interface/black_ol.htm
... ... @@ -537,9 +537,9 @@
537 537 </div>
538 538 </script>
539 539 <script>
540   - <!--inicia o mapa-->
541   - i3GEO.cria();
542   - i3GEO.inicia();
  540 + //inicia o mapa
  541 + //Veja config.php
  542 + i3GEO.init();
543 543 </script>
544 544 </body>
545 545  
... ...
interface/black_osm.htm
... ... @@ -537,9 +537,9 @@
537 537 </div>
538 538 </script>
539 539 <script>
540   - <!--inicia o mapa-->
541   - i3GEO.cria();
542   - i3GEO.inicia();
  540 + //inicia o mapa
  541 + //Veja config.php
  542 + i3GEO.init();
543 543 </script>
544 544 </body>
545 545  
... ...
interface/dbug6.htm
... ... @@ -1,252 +0,0 @@
1   -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
2   -<html>
3   -<head>
4   -<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile">
5   -<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
6   -<meta name="viewport" content="width=device-width, initial-scale=1">
7   -<title>i3GEO - OpenLayers</title>
8   -<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script>
9   -<script type="text/javascript" src="../pacotes/openlayers/OpenLayers2131.js.php"></script>
10   -<link rel="stylesheet" type="text/css" href="../css/black6.css">
11   -<style>
12   - .olControlEditingToolbar1 div {
13   - background-image: url(../mashups/openlayers.png);
14   - background-repeat: no-repeat;
15   - float: right;
16   - right: 50px;
17   - height: 29px;
18   - margin: 2px;
19   - width: 29px;
20   - cursor: pointer;
21   - top: 10px;
22   - }
23   -</style>
24   -</head>
25   -<body id="i3geo" style='margin-left: 7px; background: white;'>
26   - <!-- inclui o nome do usuario logado -->
27   - <div id="i3GEONomeLogin" style="position: absolute; left: 10px; top: 12px; font-size: 11px; z-index: 50000"></div>
28   - <table id='mst' summary="" style='display: none;' width=100% cellspacing='0'>
29   - <tr>
30   - <td id="contemMenu">
31   - <!--menu suspenso-->
32   - <div id="menus"></div>
33   - </td>
34   - </tr>
35   - <tr>
36   - <td style="vertical-align: top; border-width: 0px;">
37   - <table width="100%" style="vertical-align: top; border-width: 0px">
38   - <tr>
39   - <td class=verdeclaro id=contemImg>
40   - <div id=corpoMapa style="position: relative; background-image: url('../imagens/i3geo1bw.jpg');"></div>
41   - </td>
42   - </tr>
43   - </table>
44   - </td>
45   - </tr>
46   - <tr>
47   - <td>
48   - <table style="width: 100%; height: 28px">
49   - <tr>
50   - <td class=fundoRodape style="width: 25%">
51   - <!-- aqui ser&aacute; inclu&iacute;da a escala num&eacute;rica -->
52   - <div id=escala style="margin: auto; text-align: right; left: 15px;"></div>
53   - </td>
54   - <td class=fundoRodape style="width: 5%"></td>
55   - <td class=fundoRodape style="width: 40%">
56   - <!-- aqui ser&aacute; inclu&iacute;do o gadget que mostra a coordenada geogr&aacute;fica da posi&ccedil;&atilde;o do mouse -->
57   - <div id=localizarxy style="margin: auto; text-align: left; font-size: 10px; display: inline-table"></div>
58   - </td>
59   - <td class=fundoRodape style="width: 20%">
60   - <!-- bot&atilde;o de compartilhamento em redes sociais-->
61   - <!--<div id=i3GEOcompartilhar style="width: 170px; margin: auto; text-align: left; padding-top: 1px"></div> -->
62   - <!-- aqui ser&aacute; inclu&iacute;do o contador de tempo quando o temporizador de redesenho do mapa estiver ativo -->
63   - <div id=tempoRedesenho style="z-index: 100; position: absolute; top: 0px; color: green; background-color: black; width: 50px; display: none"></div>
64   - </td>
65   - <!-- aqui ser&atilde;o inclu&iacute;das as bandeiras que permitem a troca de idioma -->
66   - <td class=fundoRodape style="width: 10%;">
67   - <div id=seletorIdiomas style="right: 15px;"></div>
68   - </td>
69   - </tr>
70   - </table>
71   - </td>
72   - </tr>
73   - </table>
74   - <div id="i3GEOlogoMarca">
75   - <table>
76   - <tr>
77   - <td>
78   - <div id=versaoi3geo></div>
79   - <h1 class="i3GEOlogoMarca">i3Geo
80   - - Software livre para cria&ccedil;&atilde;o de mapas interativos e geoprocessamento</h1>
81   - <h1 class="i3GEOlogoMarca">Baseado
82   - no Mapserver, &eacute; licenciado sob GPL e integra o Portal do Software P&uacute;blico
83   - Brasileiro</h1>
84   - </td>
85   - </tr>
86   - </table>
87   - <img src='../imagens/logo_inicio.png'>
88   - </div>
89   -
90   - <div id="i3GEOguiaMovel" style="visibility: hidden; position: absolute; display: block; border: 0px solid white; text-align: left; z-index: 2000; background-color: none">
91   - <div style="cursor: pointer; position: absolute; top: 10px; width: 30px; z-index: 5000; left: 18px;">
92   - <div id="iconeGuia_temas"></div>
93   - <div id="iconeGuia_adiciona" style="margin-top: 3px;"></div>
94   - <div id="iconeGuia_legenda" style="margin-top: 3px;"></div>
95   - <div id="iconeGuia_dobraPagina" style="margin-top: 3px;"></div>
96   - <div id="iconeGuia_identificaBalao" style="margin-top: 3px;"></div>
97   - <div id="iconeGuia_identifica" style="margin-top: 3px;"></div>
98   - </div>
99   - <div id="i3GEOguiaMovelMolde" style="top: 0px; box-shadow: 0 2px 10px 0 #888888; position: absolute; display: none; border: 0px solid white; text-align: left; z-index: 1000; background-color: gray">
100   - <div id="i3GEOguiaMovelConteudo" style='top: 10px; overflow: auto; display: none; position: absolute; border-color: gray; border-width: 0px 0 0px 0px; left: 0px; height: 0px; background-color: white'>
101   - <div id='guia1obj' style='display: none;'>
102   - <div onclick="i3GEO.guias.guiaMovel.abreFecha('fecha');" style='cursor:pointer; left: 0px; top: 0px; width: 95%; text-align: right; font-size: 14pt;'>X</div>
103   - <!-- Esta div acrescenta a op&ccedil;&atilde;o de busca r&aacute;pida, caso vc queira coloc&aacute;-la em um lugar espec&iacute;fico -->
104   - <div style='left: 5px; top: 10px; width: 150px;' id=buscaRapida></div>
105   - <!-- Esta div acrescenta a lista de propriedades do mapa -->
106   - <!--<div id=listaPropriedades style='top:15px;' ></div>-->
107   - <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' espec&iacute;ficas da interface Openlayers. Veja tamb&eacute;m a op&ccedil;&atilde;o i3GEO.Interface.openlayers.GADGETS.LayerSwitcher -->
108   - <div id=listaLayersBase style='top: 15px;'></div>
109   - <!-- Esta div acrescenta a lista de de camadas dispon&iacute;veis no mapa atual -->
110   - <div id=listaTemas style='top: 15px;'></div>
111   - </div>
112   - <div id='guia2obj' style='display: none;'>
113   - <div onclick="i3GEO.guias.guiaMovel.abreFecha('fecha');" style='cursor:pointer; left: 0px; top: 0px; width: 95%; text-align: right; font-size: 14pt;'>X</div>
114   - <div id="arvoreAdicionaTema" >Aguarde...</div>
115   - </div>
116   - <div id='guia4obj' style='display: none; text-align: left'>
117   - <div onclick="i3GEO.guias.guiaMovel.abreFecha('fecha');" style='cursor:pointer; left: 0px; top: 0px; width: 95%; text-align: right; font-size: 14pt;'>X</div>
118   - <div id="arvoreLegenda" style='display: block; text-align: left' >Aguarde...</div><br><br>
119   - </div>
120   - </div>
121   - </div>
122   - </div>
123   - <script>
124   - i3GEO.configura.locaplic = i3GEO.util.protocolo() + "://"
125   - + window.location.host + "/i3geo";
126   - i3GEO.configura.autotamanho = false;
127   - i3GEO.Interface.ATUAL = "openlayers";
128   - i3GEO.Interface.IDCORPO = "contemImg";
129   - i3GEO.Interface.openlayers.TILES = true;
130   -
131   - i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}';
132   - i3GEO.cria();
133   -
134   - i3GEO.guias.guiaMovel.ABERTA=true;
135   - i3GEO.guias.ATUAL = "temas";
136   -
137   - i3GEO.configura.mapaRefDisplay = "none";
138   - //ajusta o deslocamento da barra de botoes
139   - i3GEO.barraDeBotoes.OFFSET = 11;
140   - //ajusta a posicao da barra de botoes no IE
141   - if(navm){
142   - i3GEO.barraDeBotoes.OFFSET = 5;
143   - }
144   - if(chro){
145   - i3GEO.barraDeBotoes.OFFSET = 15;
146   - }
147   -
148   - i3GEO.configura.oMenuData["submenus"]["janelas"] = [];
149   - i3GEO.ajuda.ATIVAJANELA = false;
150   - i3GEO.idioma.IDSELETOR = "seletorIdiomas";
151   -
152   - //i3GEO.arvoreDeTemas.TIPOBOTAO = "radio";
153   - i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true;
154   - i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true;
155   - i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false;
156   - i3GEO.mapa.AUTORESIZE = true;
157   - i3GEO.guias.TIPO = "movel";
158   - i3GEO.guias.guiaMovel.config.topGuiaMovel = 36;
159   - i3GEO.janela.ativaAlerta();
160   - i3GEO.finaliza = function() {
161   - if ($i("i3GEOlogoMarca")) {
162   - $i("i3GEOlogoMarca").style.display = "none";
163   - }
164   -
165   - //i3GEO.mapa.insereDobraPagina("googlemaps",
166   - // "../imagens/dobragooglemaps.png"
167   - //);
168   - };
169   - //indica se a opcao de navegacao nas pastas do servidor sera ativada
170   - i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir = true;
171   - i3GEO.janela.TRANSICAOSUAVE = true;
172   -
173   - OpenLayers.ImgPath = "../pacotes/openlayers/img/";
174   - //desliga a camada com o mapa mundi
175   - i3GEO.configura.mashuppar = "&desligar=mundo";
176   - //se vc nao quer o fundo, mude visibility true para false
177   - (function() {
178   - var eng = new OpenLayers.Layer.ArcGIS93Rest(
179   - "ESRI National Geographic",
180   - "http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/export",
181   - {
182   - format : "jpeg"
183   - }, {
184   - resolutions : [0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625],
185   - isBaseLayer : true,
186   - visibility : true,
187   - attribution: 'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer">ArcGIS</a>'
188   - });
189   - var oce = new OpenLayers.Layer.ArcGIS93Rest(
190   - "ESRI Ocean Basemap",
191   - "http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export",
192   - {
193   - format : "jpeg"
194   - }, {
195   - resolutions : [0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625],
196   - isBaseLayer : true,
197   - visibility : false,
198   - attribution: 'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer">ArcGIS</a>'
199   - });
200   - var ims = new OpenLayers.Layer.ArcGIS93Rest(
201   - "ESRI Imagery World 2D",
202   - "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export",
203   - {
204   - format : "jpeg"
205   - }, {
206   - resolutions : [0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125],
207   - isBaseLayer : true,
208   - visibility : false,
209   - attribution : 'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer">ArcGIS</a>'
210   - });
211   - var wsm = new OpenLayers.Layer.ArcGIS93Rest(
212   - "ESRI World Street Map",
213   - "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export",
214   - {
215   - format : "jpeg"
216   - }, {
217   - isBaseLayer : true,
218   - visibility : false,
219   - attribution : 'Tiles &copy; <a href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer">ArcGIS</a>'
220   - });
221   - var bra = new OpenLayers.Layer.WMS(
222   - "Base carto MMA",
223   - "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map",
224   - {
225   - layers : "baseraster",
226   - srs : "EPSG:4618",
227   - format : "image/png",
228   - isBaseLayer : false
229   - }, {
230   - isBaseLayer : true,
231   - visibility : false
232   - });
233   -
234   - var tms = new OpenLayers.Layer.TMS("OSGEO",
235   - "http://tilecache.osgeo.org/wms-c/Basic.py/", {
236   - layername : "basic",
237   - type : "png",
238   - // set if different than the bottom left of map.maxExtent
239   - tileOrigin : new OpenLayers.LonLat(-180, -90),
240   - isBaseLayer : true,
241   - visibility : false,
242   - attribution : '&copy; <a href="http://www.tilecache.org/">2006-2010, TileCache Contributors</a>'
243   - });
244   -
245   - i3GEO.Interface.openlayers.LAYERSADICIONAIS = [ eng, oce, ims, wsm, tms,
246   - bra ];
247   - })();
248   - //i3GEO.Interface.TABLET = true;
249   - i3GEO.inicia();
250   - </script>
251   -</body>
252   -</html>
interface/googlemaps_noite.phtml
... ... @@ -558,10 +558,10 @@ include(&quot;../ms_configura.php&quot;);
558 558 </div>
559 559 </script>
560 560 <script>
561   - <!--inicia o mapa-->
562   - i3GEO.cria();
  561 + //inicia o mapa
  562 + //Veja config.php
563 563 i3GEO.Interface.googlemaps.ESTILOPADRAO = "Night";
564   - i3GEO.inicia();
  564 + i3GEO.init();
565 565 </script>
566 566 </body>
567 567  
... ...
interface/openlayersdebug.htm
... ... @@ -539,9 +539,9 @@
539 539 </div>
540 540 </script>
541 541 <script>
542   - <!--inicia o mapa-->
543   - i3GEO.cria();
544   - i3GEO.inicia();
  542 + //inicia o mapa
  543 + //Veja config.php
  544 + i3GEO.init();
545 545 </script>
546 546 </body>
547 547  
... ...
interface/templates/buscaEmServico.html 100644 → 100755
interface/templates/buscaEmTemas.html 100644 → 100755
interface/templates/camada.html 100644 → 100755
interface/templates/camadaFundo.html 100644 → 100755
interface/templates/catalogoMigalha.html 100644 → 100755
interface/templates/dir.html 100644 → 100755
interface/templates/ferramentasFolder.html 100644 → 100755
interface/templates/ferramentasLink.html 100644 → 100755
interface/templates/ferramentasMigalha.html 100644 → 100755
interface/templates/legenda.html 100644 → 100755
interface/templates/tema.html 100644 → 100755
js/caixaDeFerramentas.js 100644 → 100755
js/compactados/ini_i3geo_compacto.js
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:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,cria:function(){$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});if($i("i3GEOlogoMarcaTemplate")){i3GEO.aguardeLogo.mostra()}if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}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()}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;if(i3GEO.gadgets&&i3GEO.parametros.i3geoPermiteLogin&&i3GEO.parametros.i3geoPermiteLogin=="nao"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin=false}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(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin===true||(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin!=false&&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.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.fechaAguarde()","i3GEO.navega.atualizaEscalaNumerica()"])},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();if(i3GEO.mapa.AUTORESIZE===true){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===""){corpoMapa.call();return}if(!retorno.data){alert(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,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[window.innerWidth,window.innerHeight];Dw=$(document).width();Dh=$(document).height();if(Dw>screen.availWidth){Dw=screen.availWidth}if(Dh>screen.availHeight){Dh=screen.availHeight-20}novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}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;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i("mst");if(temp){temp.style.width="100%"}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"}},aguardeLogo:{obj:"",mostra:function(){i3GEO.aguardeLogo.obj=$('<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:50000;overflow-y:visible;">'+'<div class="modal-dialog modal-m">'+'<div class="modal-content">'+'<div class="modal-header"></div>'+'<div class="modal-body">'+$('#i3GEOlogoMarcaTemplate').html()+'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>'+'</div>'+'</div></div></div>');i3GEO.aguardeLogo.obj.modal("show");setTimeout(function(){i3GEO.aguardeLogo.obj.modal("hide")},4000)},esconde:function(){i3GEO.aguardeLogo.obj.modal("hide")}}};
2 1 \ No newline at end of file
  2 +var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={init:function(){i3GEO.cria();i3GEO.inicia()},tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,cria:function(){$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});if($i("i3GEOlogoMarcaTemplate")){i3GEO.aguardeLogo.mostra()}if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}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()}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;if(i3GEO.gadgets&&i3GEO.parametros.i3geoPermiteLogin&&i3GEO.parametros.i3geoPermiteLogin=="nao"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin=false}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(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin===true||(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin!=false&&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.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.fechaAguarde()","i3GEO.navega.atualizaEscalaNumerica()"])},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();if(i3GEO.mapa.AUTORESIZE===true){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===""){corpoMapa.call();return}if(!retorno.data){alert(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,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[window.innerWidth,window.innerHeight];Dw=$(document).width();Dh=$(document).height();if(Dw>screen.availWidth){Dw=screen.availWidth}if(Dh>screen.availHeight){Dh=screen.availHeight-20}novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}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;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i("mst");if(temp){temp.style.width="100%"}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"}},aguardeLogo:{obj:"",mostra:function(){i3GEO.aguardeLogo.obj=$('<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:50000;overflow-y:visible;">'+'<div class="modal-dialog modal-m">'+'<div class="modal-content">'+'<div class="modal-header"></div>'+'<div class="modal-body">'+$('#i3GEOlogoMarcaTemplate').html()+'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>'+'</div>'+'</div></div></div>');i3GEO.aguardeLogo.obj.modal("show");setTimeout(function(){i3GEO.aguardeLogo.obj.modal("hide")},4000)},esconde:function(){i3GEO.aguardeLogo.obj.modal("hide")}}};
3 3 \ No newline at end of file
... ...
js/compactajs.php
... ... @@ -247,7 +247,7 @@ $jsfiles = array(
247 247 "compactados/catalogoDir_compacto.js",
248 248 "compactados/legenda_compacto.js",
249 249 "compactados/busca_compacto.js",
250   -"compactados/caixaDeFerramentas.js",
  250 +"compactados/caixaDeFerramentas_compacto.js",
251 251 "template.js"
252 252 );
253 253  
... ...
js/i3geo_tudo_compacto7.js
... ... @@ -226,7 +226,7 @@ d.parent(&quot;.dropdown-menu&quot;).length&amp;&amp;(d=d.closest(&quot;li.dropdown&quot;).addClass(&quot;active&quot;
226 226 (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));
227 227 //
228 228 //compactados/ini_i3geo_compacto.js
229   -var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,cria:function(){$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});if($i("i3GEOlogoMarcaTemplate")){i3GEO.aguardeLogo.mostra()}if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}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()}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;if(i3GEO.gadgets&&i3GEO.parametros.i3geoPermiteLogin&&i3GEO.parametros.i3geoPermiteLogin=="nao"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin=false}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(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin===true||(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin!=false&&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.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.fechaAguarde()","i3GEO.navega.atualizaEscalaNumerica()"])},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();if(i3GEO.mapa.AUTORESIZE===true){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===""){corpoMapa.call();return}if(!retorno.data){alert(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,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[window.innerWidth,window.innerHeight];Dw=$(document).width();Dh=$(document).height();if(Dw>screen.availWidth){Dw=screen.availWidth}if(Dh>screen.availHeight){Dh=screen.availHeight-20}novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}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;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i("mst");if(temp){temp.style.width="100%"}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"}},aguardeLogo:{obj:"",mostra:function(){i3GEO.aguardeLogo.obj=$('<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:50000;overflow-y:visible;">'+'<div class="modal-dialog modal-m">'+'<div class="modal-content">'+'<div class="modal-header"></div>'+'<div class="modal-body">'+$('#i3GEOlogoMarcaTemplate').html()+'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>'+'</div>'+'</div></div></div>');i3GEO.aguardeLogo.obj.modal("show");setTimeout(function(){i3GEO.aguardeLogo.obj.modal("hide")},4000)},esconde:function(){i3GEO.aguardeLogo.obj.modal("hide")}}};
  229 +var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={init:function(){i3GEO.cria();i3GEO.inicia()},tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,cria:function(){$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});if($i("i3GEOlogoMarcaTemplate")){i3GEO.aguardeLogo.mostra()}if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}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()}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;if(i3GEO.gadgets&&i3GEO.parametros.i3geoPermiteLogin&&i3GEO.parametros.i3geoPermiteLogin=="nao"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin=false}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(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin===true||(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin!=false&&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.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.fechaAguarde()","i3GEO.navega.atualizaEscalaNumerica()"])},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();if(i3GEO.mapa.AUTORESIZE===true){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===""){corpoMapa.call();return}if(!retorno.data){alert(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,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[window.innerWidth,window.innerHeight];Dw=$(document).width();Dh=$(document).height();if(Dw>screen.availWidth){Dw=screen.availWidth}if(Dh>screen.availHeight){Dh=screen.availHeight-20}novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}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;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i("mst");if(temp){temp.style.width="100%"}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"}},aguardeLogo:{obj:"",mostra:function(){i3GEO.aguardeLogo.obj=$('<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:50000;overflow-y:visible;">'+'<div class="modal-dialog modal-m">'+'<div class="modal-content">'+'<div class="modal-header"></div>'+'<div class="modal-body">'+$('#i3GEOlogoMarcaTemplate').html()+'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>'+'</div>'+'</div></div></div>');i3GEO.aguardeLogo.obj.modal("show");setTimeout(function(){i3GEO.aguardeLogo.obj.modal("hide")},4000)},esconde:function(){i3GEO.aguardeLogo.obj.modal("hide")}}};
230 230 //
231 231 //compactados/mustache.js
232 232 (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}));
... ... @@ -342,7 +342,8 @@ if(typeof(i3GEO)===&#39;undefined&#39;){var i3GEO={}}i3GEO.legenda={ID:&quot;&quot;,CAMADASSEMLEGE
342 342 //compactados/busca_compacto.js
343 343 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.busca={PALAVRA:"",BOX:"",SERVICO:"http://mapas.mma.gov.br/webservices/geonames.php",SERVICOWMS:"http://mapas.mma.gov.br/webservices/geonameswms.php",config:{"ondeConteiner":"","inputOndePalavra":"","ondeServicosExternos":"","inputServicosExternos":"","inputTemasMapa":"","ondeTemasMapa":"","inputGoogle":"","ondeGoogle":"","templateTemasMapa":"","templateServico":"","templateGoogle":""},nget:0,carregaTemplates:function(){if(i3GEO.busca.nget==0){i3GEO.busca.nget=2;if(!i3GEO.template.buscaEmTemas){$.get(i3GEO.busca.config.templateTemasMapa,function(template){i3GEO.template.buscaEmTemas=template;i3GEO.busca.nget=i3GEO.busca.nget-1;if(i3GEO.busca.nget==0){i3GEO.busca.inicia()}})}else{i3GEO.busca.nget=i3GEO.busca.nget-1}if(!i3GEO.template.buscaEmServico){$.get(i3GEO.busca.config.templateServico,function(template){i3GEO.template.buscaEmServico=template;i3GEO.busca.nget=i3GEO.busca.nget-1;if(i3GEO.busca.nget==0){i3GEO.busca.inicia()}})}else{i3GEO.busca.nget=i3GEO.busca.nget-1}}},aguarde:function(){return'<div class="alert alert-warning" role="alert">'+$trad("o1")+'</div>'},inicia:function(obj){var palavra="",config=i3GEO.busca.config;if(obj){obj=$(obj);if(obj.attr("data-ondeConteiner")!=undefined){config.ondeConteiner=obj.attr("data-ondeConteiner")}if(obj.attr("data-ondeServicosExternos")!=undefined){config.ondeServicosExternos=obj.attr("data-ondeServicosExternos")}if(obj.attr("data-inputServicosExternos")!=undefined){config.inputServicosExternos=obj.attr("data-inputServicosExternos")}if(obj.attr("data-inputTemasMapa")!=undefined){config.inputTemasMapa=obj.attr("data-inputTemasMapa")}if(obj.attr("data-inputTemasMapa")!=undefined){config.ondeTemasMapa=obj.attr("data-ondeTemasMapa")}if(obj.attr("data-inputGoogle")!=undefined){config.inputGoogle=obj.attr("data-inputGoogle")}if(obj.attr("data-inputGoogle")!=undefined){config.ondeGoogle=obj.attr("data-ondeGoogle")}if(obj.attr("data-inputOndePalavra")!=undefined){config.inputOndePalavra=obj.attr("data-inputOndePalavra")}if(obj.attr("data-templateGoogle")!=undefined){config.templateGoogle=obj.attr("data-templateGoogle")}if(obj.attr("data-templateTemasMapa")!=undefined){config.templateTemasMapa=obj.attr("data-templateTemasMapa")}if(obj.attr("data-templateServico")!=undefined){config.templateServico=obj.attr("data-templateServico")}}if(!i3GEO.template.buscaEmTemas||!i3GEO.template.buscaEmServico){i3GEO.busca.carregaTemplates()}else{var palavra=$(config.ondeConteiner).find(config.inputOndePalavra).val();if(palavra!=""){i3GEO.busca.PALAVRA=i3GEO.util.removeAcentos(palavra)}else{i3GEO.busca.PALAVRA="";return false}if($(config.ondeConteiner).find(config.inputServicosExternos)[0].checked==true){$(config.ondeConteiner).find(config.ondeServicosExternos).html(i3GEO.busca.aguarde());i3GEO.php.buscaRapida(i3GEO.busca.resultadoServico,i3GEO.configura.locaplic,i3GEO.busca.SERVICO,i3GEO.busca.PALAVRA)}if($(config.ondeConteiner).find(config.inputTemasMapa)[0].checked==true){$(config.ondeConteiner).find(config.inputTemasMapa).html(i3GEO.busca.aguarde());i3GEO.php.buscaRapida(i3GEO.busca.resultadoTemas,i3GEO.configura.locaplic,"temas",i3GEO.busca.PALAVRA)}if($(config.ondeConteiner).find(config.inputGoogle)[0].checked==true){$(config.ondeConteiner).find(config.inputGoogle).html(i3GEO.busca.aguarde());i3GEO.busca.google(i3GEO.busca.PALAVRA)}}},resultadoTemas:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmTemas+"{{/data}}",{"data":retorno.data});$(config.ondeConteiner).find(config.ondeTemasMapa).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeTemasMapa).html("")}},resultadoGoogle:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmTemas+"{{/data}}",{"data":retorno.data});$(config.ondeConteiner).find(config.ondeGoogle).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeGoogle).html("")}},resultadoServico:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmServico+"{{/data}}",{"data":retorno.data.geonames});$(config.ondeConteiner).find(config.ondeServicosExternos).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeServicosExternos).html("")}},google:function(palavra){var geocoder=new google.maps.Geocoder();geocoder.geocode({'address':palavra},function(results,status){if(status==google.maps.GeocoderStatus.OK){if(status!=google.maps.GeocoderStatus.ZERO_RESULTS){if(results){var b,bo,n=results.length,i=0,resultado={"data":[]};for(i=0;i<n;i++){if(results[i]&&results[i].formatted_address&&results[i].geometry&&results[i].geometry.viewport){bo=results[i].geometry.bounds;b=bo.getSouthWest().lng()+" "+bo.getSouthWest().lat()+" "+bo.getNorthEast().lng()+" "+bo.getNorthEast().lat();resultado.data.push({"valor":results[i].formatted_address,"box":b})}}i3GEO.busca.resultadoGoogle(resultado)}}}})},zoom:function(wkt,layer,gid,nm){var adicionaCamada=function(layer,gid,nm,ext){if(i3GEO.Interface.openlayers.googleLike===false){var s=i3GEO.busca.SERVICOWMS+"?gid="+gid+"&";i3GEO.php.adicionaTemaWMS(i3GEO.atualiza,s,layer,"default","EPSG:4618","image/png","1.1.0",nm+" - "+layer,"","nao","",i3GEO.configura.locaplic,i3GEO.configura.sid)}i3GEO.busca.zoomExt(ext)};var ext=i3GEO.util.wkt2ext(wkt,"polygon");if(ext==false){return}i3GEO.php.mudaext(adicionaCamada(layer,gid,nm,ext),i3GEO.configura.tipoimagem,ext,i3GEO.configura.locaplic,i3GEO.configura.sid)},mostraxy:function mostraxy(texto,tipo){var ext,b;if(tipo==="wkt"){ext=i3GEO.util.wkt2ext(texto,"polygon")}else{ext=texto}if(ext==false){return}b=ext.split(" ");if(i3GEO.Interface["ATUAL"]==="openlayers"&&typeof OpenLayers.Control=="undefined"){i3GEO.busca.BOX=false}if(i3GEO.busca.BOX===false){i3GEO.busca.BOX=i3GEO.desenho.addBox(b[0],b[1],b[2],b[3],"boxOndeBusca")}else{i3GEO.busca.BOX=i3GEO.desenho.moveBox(i3GEO.busca.BOX,b[0],b[1],b[2],b[3])}},escondexy:function(){i3GEO.desenho.removeBox("boxOndeBusca")},zoomExt:function(ext){if(i3GEO.Interface.ATUAL=="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(ext)}if(i3GEO.Interface.ATUAL=="openlayers"){i3GEO.Interface.openlayers.zoom2ext(ext)}}};
344 344 //
345   -//compactados/caixaDeFerramentas.js
  345 +//compactados/caixaDeFerramentas_compacto.js
  346 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.caixaDeFerramentas={MIGALHA:[],config:{"idOndeFolder":"listaFerramentas","idOndeLinks":"listaFerramentasLinks","idOndeMigalha":"migalhaFerramentas","templateFolder":"templates/ferramentasFolder.html","templateMigalha":"templates/ferramentasMigalha.html","templateLinks":"templates/ferramentasLink.html"},nget:0,carregaTemplates:function(){if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.nget=3;if(!i3GEO.template.ferramentasFolder){$.get(i3GEO.caixaDeFerramentas.config.templateFolder,function(template){i3GEO.template.ferramentasFolder=template;i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1;if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.inicia()}})}else{i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1}if(!i3GEO.template.ferramentasLinks){$.get(i3GEO.caixaDeFerramentas.config.templateLinks,function(template){i3GEO.template.ferramentasLinks=template;i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1;if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.inicia()}})}else{i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1}if(!i3GEO.template.ferramentasMigalha){$.get(i3GEO.caixaDeFerramentas.config.templateMigalha,function(template){i3GEO.template.ferramentasMigalha=template;i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1;if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.inicia()}})}else{i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1}}},aguarde:function(){},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.caixaDeFerramentas.config[i]=v})}i3GEO.caixaDeFerramentas.aguarde();if(!i3GEO.template.ferramentasFolder||!i3GEO.template.ferramentasLinks||!i3GEO.template.ferramentasMigalha){i3GEO.caixaDeFerramentas.carregaTemplates()}else{i3GEO.caixaDeFerramentas.nivel0()}},migalha:function(data){var f=i3GEO.caixaDeFerramentas.config;var t=Mustache.to_html(i3GEO.template.ferramentasMigalha,{"nome":data.nome});$("#"+f.idOndeMigalha).data(data).html(t).click(function(event){var f=i3GEO.caixaDeFerramentas.config;event.stopImmediatePropagation();$("#"+f.idOndeMigalha).off("click");var data=$(this).data();if((data.nivel-1)==0){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel0();i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}if((data.nivel-1)==1){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel1(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}if((data.nivel-1)==2){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel2(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}})},nivel0:function(){var confm=i3GEO.listaDeFerramentas,subs=i3GEO.listaDeFerramentas.submenus,menu=confm.menu,n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,data;$("#"+f.idOndeMigalha).html("&nbsp;");f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){if(subs[menu[i].id].length>0){t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].nome,"descricao":menu[i].descricao});t=$(t);data={"nivel":1,"nome":menu[i].nome,"id":i,"n0":i,"n1":"","n2":"","n3":""};t.find("a").data(data).click(function(){$(this).find("a").off("click");var data=$(this).data();i3GEO.caixaDeFerramentas.config.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel1(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})});i3GEO.caixaDeFerramentas.config.idOndeFolder.append(t)}}},nivel1:function(data){var confm=i3GEO.listaDeFerramentas,menu=confm.submenus[confm.menu[data.n0].id],n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,datan;f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){datan={"nivel":2,"nome":menu[i].text,"id":menu[i].id,"n0":data.n0,"n1":i,"n2":"","n3":""};if(menu[i].url){t=Mustache.to_html(i3GEO.template.ferramentasLinks,{"nome":menu[i].text,"target":menu[i].target,"url":menu[i].url,"opcional":menu[i].opcional});t=$(t);f.idOndeLinks.append(t)}else{t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].text});t=$(t);t.find("a").data(datan).click(function(){$(this).find("a").off("click");var data=$(this).data();var f=i3GEO.caixaDeFerramentas.config;var t=Mustache.to_html(i3GEO.template.ferramentasMigalha,data);f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel2(data);f.idOndeFolder.show()})});f.idOndeFolder.append(t)}}data.nivel=1;data.nome=confm.menu[data.id].nome;data.n0=data.id;i3GEO.caixaDeFerramentas.migalha(data)},nivel2:function(data){var confm=i3GEO.listaDeFerramentas,menu=confm.submenus[confm.menu[data.n0].id][data.n1].submenu.itemdata[0],n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,datan;f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){datan={"nivel":3,"nome":menu[i].text,"id":menu[i].id,"n0":data.n0,"n1":data.n1,"n2":i,"n3":""};if(menu[i].url){t=Mustache.to_html(i3GEO.template.ferramentasLinks,{"nome":menu[i].text,"target":menu[i].target,"url":menu[i].url,"opcional":menu[i].opcional});t=$(t);f.idOndeLinks.append(t)}else{t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].text});t=$(t);t.find("a").data(datan).click(function(){$(this).find("a").off("click");var data=$(this).data();var t=Mustache.to_html(i3GEO.caixaDeFerramentas.config.templateMigalha,data)});f.idOndeFolder.append(t)}}data.nivel=2;data.id=data.n0;i3GEO.caixaDeFerramentas.migalha(data)}};
346 347 //
347 348 //template.js
348 349 if (typeof (i3GEO) === 'undefined') {
... ...
js/i3geo_tudo_compacto7.js.php
... ... @@ -226,7 +226,7 @@ d.parent(&quot;.dropdown-menu&quot;).length&amp;&amp;(d=d.closest(&quot;li.dropdown&quot;).addClass(&quot;active&quot;
226 226 (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));
227 227 //
228 228 //compactados/ini_i3geo_compacto.js
229   -var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,cria:function(){$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});if($i("i3GEOlogoMarcaTemplate")){i3GEO.aguardeLogo.mostra()}if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}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()}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;if(i3GEO.gadgets&&i3GEO.parametros.i3geoPermiteLogin&&i3GEO.parametros.i3geoPermiteLogin=="nao"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin=false}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(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin===true||(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin!=false&&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.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.fechaAguarde()","i3GEO.navega.atualizaEscalaNumerica()"])},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();if(i3GEO.mapa.AUTORESIZE===true){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===""){corpoMapa.call();return}if(!retorno.data){alert(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,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[window.innerWidth,window.innerHeight];Dw=$(document).width();Dh=$(document).height();if(Dw>screen.availWidth){Dw=screen.availWidth}if(Dh>screen.availHeight){Dh=screen.availHeight-20}novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}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;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i("mst");if(temp){temp.style.width="100%"}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"}},aguardeLogo:{obj:"",mostra:function(){i3GEO.aguardeLogo.obj=$('<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:50000;overflow-y:visible;">'+'<div class="modal-dialog modal-m">'+'<div class="modal-content">'+'<div class="modal-header"></div>'+'<div class="modal-body">'+$('#i3GEOlogoMarcaTemplate').html()+'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>'+'</div>'+'</div></div></div>');i3GEO.aguardeLogo.obj.modal("show");setTimeout(function(){i3GEO.aguardeLogo.obj.modal("hide")},4000)},esconde:function(){i3GEO.aguardeLogo.obj.modal("hide")}}};
  229 +var i3GEOF=[];var i3GEOadmin=[];if(typeof YAHOO!="undefined"){YAHOO.namespace("i3GEO")}var i3GEO={init:function(){i3GEO.cria();i3GEO.inicia()},tamanhodoc:[],parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",temaAtivo:"",contadorAtualiza:0,cria:function(){$('[data-traduzir="true"]').each(function(){this.innerHTML=Mustache.to_html(this.innerHTML,i3GEO.idioma.OBJETOIDIOMA)});if($i("i3GEOlogoMarcaTemplate")){i3GEO.aguardeLogo.mostra()}if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}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()}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;if(i3GEO.gadgets&&i3GEO.parametros.i3geoPermiteLogin&&i3GEO.parametros.i3geoPermiteLogin=="nao"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin=false}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(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin===true||(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin!=false&&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.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.fechaAguarde()","i3GEO.navega.atualizaEscalaNumerica()"])},aposIniciar:function(){if(jQuery.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}i3GEO.guias.inicia();if(i3GEO.mapa.AUTORESIZE===true){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===""){corpoMapa.call();return}if(!retorno.data){alert(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,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[window.innerWidth,window.innerHeight];Dw=$(document).width();Dh=$(document).height();if(Dw>screen.availWidth){Dw=screen.availWidth}if(Dh>screen.availHeight){Dh=screen.availHeight-20}novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}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;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}temp=$i("mst");if(temp){temp.style.width="100%"}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"}},aguardeLogo:{obj:"",mostra:function(){i3GEO.aguardeLogo.obj=$('<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:50000;overflow-y:visible;">'+'<div class="modal-dialog modal-m">'+'<div class="modal-content">'+'<div class="modal-header"></div>'+'<div class="modal-body">'+$('#i3GEOlogoMarcaTemplate').html()+'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>'+'</div>'+'</div></div></div>');i3GEO.aguardeLogo.obj.modal("show");setTimeout(function(){i3GEO.aguardeLogo.obj.modal("hide")},4000)},esconde:function(){i3GEO.aguardeLogo.obj.modal("hide")}}};
230 230 //
231 231 //compactados/mustache.js
232 232 (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}));
... ... @@ -342,7 +342,8 @@ if(typeof(i3GEO)===&#39;undefined&#39;){var i3GEO={}}i3GEO.legenda={ID:&quot;&quot;,CAMADASSEMLEGE
342 342 //compactados/busca_compacto.js
343 343 if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.busca={PALAVRA:"",BOX:"",SERVICO:"http://mapas.mma.gov.br/webservices/geonames.php",SERVICOWMS:"http://mapas.mma.gov.br/webservices/geonameswms.php",config:{"ondeConteiner":"","inputOndePalavra":"","ondeServicosExternos":"","inputServicosExternos":"","inputTemasMapa":"","ondeTemasMapa":"","inputGoogle":"","ondeGoogle":"","templateTemasMapa":"","templateServico":"","templateGoogle":""},nget:0,carregaTemplates:function(){if(i3GEO.busca.nget==0){i3GEO.busca.nget=2;if(!i3GEO.template.buscaEmTemas){$.get(i3GEO.busca.config.templateTemasMapa,function(template){i3GEO.template.buscaEmTemas=template;i3GEO.busca.nget=i3GEO.busca.nget-1;if(i3GEO.busca.nget==0){i3GEO.busca.inicia()}})}else{i3GEO.busca.nget=i3GEO.busca.nget-1}if(!i3GEO.template.buscaEmServico){$.get(i3GEO.busca.config.templateServico,function(template){i3GEO.template.buscaEmServico=template;i3GEO.busca.nget=i3GEO.busca.nget-1;if(i3GEO.busca.nget==0){i3GEO.busca.inicia()}})}else{i3GEO.busca.nget=i3GEO.busca.nget-1}}},aguarde:function(){return'<div class="alert alert-warning" role="alert">'+$trad("o1")+'</div>'},inicia:function(obj){var palavra="",config=i3GEO.busca.config;if(obj){obj=$(obj);if(obj.attr("data-ondeConteiner")!=undefined){config.ondeConteiner=obj.attr("data-ondeConteiner")}if(obj.attr("data-ondeServicosExternos")!=undefined){config.ondeServicosExternos=obj.attr("data-ondeServicosExternos")}if(obj.attr("data-inputServicosExternos")!=undefined){config.inputServicosExternos=obj.attr("data-inputServicosExternos")}if(obj.attr("data-inputTemasMapa")!=undefined){config.inputTemasMapa=obj.attr("data-inputTemasMapa")}if(obj.attr("data-inputTemasMapa")!=undefined){config.ondeTemasMapa=obj.attr("data-ondeTemasMapa")}if(obj.attr("data-inputGoogle")!=undefined){config.inputGoogle=obj.attr("data-inputGoogle")}if(obj.attr("data-inputGoogle")!=undefined){config.ondeGoogle=obj.attr("data-ondeGoogle")}if(obj.attr("data-inputOndePalavra")!=undefined){config.inputOndePalavra=obj.attr("data-inputOndePalavra")}if(obj.attr("data-templateGoogle")!=undefined){config.templateGoogle=obj.attr("data-templateGoogle")}if(obj.attr("data-templateTemasMapa")!=undefined){config.templateTemasMapa=obj.attr("data-templateTemasMapa")}if(obj.attr("data-templateServico")!=undefined){config.templateServico=obj.attr("data-templateServico")}}if(!i3GEO.template.buscaEmTemas||!i3GEO.template.buscaEmServico){i3GEO.busca.carregaTemplates()}else{var palavra=$(config.ondeConteiner).find(config.inputOndePalavra).val();if(palavra!=""){i3GEO.busca.PALAVRA=i3GEO.util.removeAcentos(palavra)}else{i3GEO.busca.PALAVRA="";return false}if($(config.ondeConteiner).find(config.inputServicosExternos)[0].checked==true){$(config.ondeConteiner).find(config.ondeServicosExternos).html(i3GEO.busca.aguarde());i3GEO.php.buscaRapida(i3GEO.busca.resultadoServico,i3GEO.configura.locaplic,i3GEO.busca.SERVICO,i3GEO.busca.PALAVRA)}if($(config.ondeConteiner).find(config.inputTemasMapa)[0].checked==true){$(config.ondeConteiner).find(config.inputTemasMapa).html(i3GEO.busca.aguarde());i3GEO.php.buscaRapida(i3GEO.busca.resultadoTemas,i3GEO.configura.locaplic,"temas",i3GEO.busca.PALAVRA)}if($(config.ondeConteiner).find(config.inputGoogle)[0].checked==true){$(config.ondeConteiner).find(config.inputGoogle).html(i3GEO.busca.aguarde());i3GEO.busca.google(i3GEO.busca.PALAVRA)}}},resultadoTemas:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmTemas+"{{/data}}",{"data":retorno.data});$(config.ondeConteiner).find(config.ondeTemasMapa).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeTemasMapa).html("")}},resultadoGoogle:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmTemas+"{{/data}}",{"data":retorno.data});$(config.ondeConteiner).find(config.ondeGoogle).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeGoogle).html("")}},resultadoServico:function(retorno){var t,config=i3GEO.busca.config;try{if(retorno.data){t=Mustache.to_html("{{#data}}"+i3GEO.template.buscaEmServico+"{{/data}}",{"data":retorno.data.geonames});$(config.ondeConteiner).find(config.ondeServicosExternos).html(t)}}catch(e){$(config.ondeConteiner).find(config.ondeServicosExternos).html("")}},google:function(palavra){var geocoder=new google.maps.Geocoder();geocoder.geocode({'address':palavra},function(results,status){if(status==google.maps.GeocoderStatus.OK){if(status!=google.maps.GeocoderStatus.ZERO_RESULTS){if(results){var b,bo,n=results.length,i=0,resultado={"data":[]};for(i=0;i<n;i++){if(results[i]&&results[i].formatted_address&&results[i].geometry&&results[i].geometry.viewport){bo=results[i].geometry.bounds;b=bo.getSouthWest().lng()+" "+bo.getSouthWest().lat()+" "+bo.getNorthEast().lng()+" "+bo.getNorthEast().lat();resultado.data.push({"valor":results[i].formatted_address,"box":b})}}i3GEO.busca.resultadoGoogle(resultado)}}}})},zoom:function(wkt,layer,gid,nm){var adicionaCamada=function(layer,gid,nm,ext){if(i3GEO.Interface.openlayers.googleLike===false){var s=i3GEO.busca.SERVICOWMS+"?gid="+gid+"&";i3GEO.php.adicionaTemaWMS(i3GEO.atualiza,s,layer,"default","EPSG:4618","image/png","1.1.0",nm+" - "+layer,"","nao","",i3GEO.configura.locaplic,i3GEO.configura.sid)}i3GEO.busca.zoomExt(ext)};var ext=i3GEO.util.wkt2ext(wkt,"polygon");if(ext==false){return}i3GEO.php.mudaext(adicionaCamada(layer,gid,nm,ext),i3GEO.configura.tipoimagem,ext,i3GEO.configura.locaplic,i3GEO.configura.sid)},mostraxy:function mostraxy(texto,tipo){var ext,b;if(tipo==="wkt"){ext=i3GEO.util.wkt2ext(texto,"polygon")}else{ext=texto}if(ext==false){return}b=ext.split(" ");if(i3GEO.Interface["ATUAL"]==="openlayers"&&typeof OpenLayers.Control=="undefined"){i3GEO.busca.BOX=false}if(i3GEO.busca.BOX===false){i3GEO.busca.BOX=i3GEO.desenho.addBox(b[0],b[1],b[2],b[3],"boxOndeBusca")}else{i3GEO.busca.BOX=i3GEO.desenho.moveBox(i3GEO.busca.BOX,b[0],b[1],b[2],b[3])}},escondexy:function(){i3GEO.desenho.removeBox("boxOndeBusca")},zoomExt:function(ext){if(i3GEO.Interface.ATUAL=="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(ext)}if(i3GEO.Interface.ATUAL=="openlayers"){i3GEO.Interface.openlayers.zoom2ext(ext)}}};
344 344 //
345   -//compactados/caixaDeFerramentas.js
  345 +//compactados/caixaDeFerramentas_compacto.js
  346 +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.caixaDeFerramentas={MIGALHA:[],config:{"idOndeFolder":"listaFerramentas","idOndeLinks":"listaFerramentasLinks","idOndeMigalha":"migalhaFerramentas","templateFolder":"templates/ferramentasFolder.html","templateMigalha":"templates/ferramentasMigalha.html","templateLinks":"templates/ferramentasLink.html"},nget:0,carregaTemplates:function(){if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.nget=3;if(!i3GEO.template.ferramentasFolder){$.get(i3GEO.caixaDeFerramentas.config.templateFolder,function(template){i3GEO.template.ferramentasFolder=template;i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1;if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.inicia()}})}else{i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1}if(!i3GEO.template.ferramentasLinks){$.get(i3GEO.caixaDeFerramentas.config.templateLinks,function(template){i3GEO.template.ferramentasLinks=template;i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1;if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.inicia()}})}else{i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1}if(!i3GEO.template.ferramentasMigalha){$.get(i3GEO.caixaDeFerramentas.config.templateMigalha,function(template){i3GEO.template.ferramentasMigalha=template;i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1;if(i3GEO.caixaDeFerramentas.nget==0){i3GEO.caixaDeFerramentas.inicia()}})}else{i3GEO.caixaDeFerramentas.nget=i3GEO.caixaDeFerramentas.nget-1}}},aguarde:function(){},inicia:function(config){if(config){$.each(config,function(i,v){i3GEO.caixaDeFerramentas.config[i]=v})}i3GEO.caixaDeFerramentas.aguarde();if(!i3GEO.template.ferramentasFolder||!i3GEO.template.ferramentasLinks||!i3GEO.template.ferramentasMigalha){i3GEO.caixaDeFerramentas.carregaTemplates()}else{i3GEO.caixaDeFerramentas.nivel0()}},migalha:function(data){var f=i3GEO.caixaDeFerramentas.config;var t=Mustache.to_html(i3GEO.template.ferramentasMigalha,{"nome":data.nome});$("#"+f.idOndeMigalha).data(data).html(t).click(function(event){var f=i3GEO.caixaDeFerramentas.config;event.stopImmediatePropagation();$("#"+f.idOndeMigalha).off("click");var data=$(this).data();if((data.nivel-1)==0){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel0();i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}if((data.nivel-1)==1){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel1(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}if((data.nivel-1)==2){f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel2(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})}})},nivel0:function(){var confm=i3GEO.listaDeFerramentas,subs=i3GEO.listaDeFerramentas.submenus,menu=confm.menu,n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,data;$("#"+f.idOndeMigalha).html("&nbsp;");f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){if(subs[menu[i].id].length>0){t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].nome,"descricao":menu[i].descricao});t=$(t);data={"nivel":1,"nome":menu[i].nome,"id":i,"n0":i,"n1":"","n2":"","n3":""};t.find("a").data(data).click(function(){$(this).find("a").off("click");var data=$(this).data();i3GEO.caixaDeFerramentas.config.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel1(data);i3GEO.caixaDeFerramentas.config.idOndeFolder.show()})});i3GEO.caixaDeFerramentas.config.idOndeFolder.append(t)}}},nivel1:function(data){var confm=i3GEO.listaDeFerramentas,menu=confm.submenus[confm.menu[data.n0].id],n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,datan;f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){datan={"nivel":2,"nome":menu[i].text,"id":menu[i].id,"n0":data.n0,"n1":i,"n2":"","n3":""};if(menu[i].url){t=Mustache.to_html(i3GEO.template.ferramentasLinks,{"nome":menu[i].text,"target":menu[i].target,"url":menu[i].url,"opcional":menu[i].opcional});t=$(t);f.idOndeLinks.append(t)}else{t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].text});t=$(t);t.find("a").data(datan).click(function(){$(this).find("a").off("click");var data=$(this).data();var f=i3GEO.caixaDeFerramentas.config;var t=Mustache.to_html(i3GEO.template.ferramentasMigalha,data);f.idOndeFolder.fadeOut("fast",function(){i3GEO.caixaDeFerramentas.nivel2(data);f.idOndeFolder.show()})});f.idOndeFolder.append(t)}}data.nivel=1;data.nome=confm.menu[data.id].nome;data.n0=data.id;i3GEO.caixaDeFerramentas.migalha(data)},nivel2:function(data){var confm=i3GEO.listaDeFerramentas,menu=confm.submenus[confm.menu[data.n0].id][data.n1].submenu.itemdata[0],n=menu.length,f=i3GEO.caixaDeFerramentas.config,i,t,datan;f.idOndeFolder.html("");f.idOndeLinks.html("");for(i=0;i<n;i+=1){datan={"nivel":3,"nome":menu[i].text,"id":menu[i].id,"n0":data.n0,"n1":data.n1,"n2":i,"n3":""};if(menu[i].url){t=Mustache.to_html(i3GEO.template.ferramentasLinks,{"nome":menu[i].text,"target":menu[i].target,"url":menu[i].url,"opcional":menu[i].opcional});t=$(t);f.idOndeLinks.append(t)}else{t=Mustache.to_html(i3GEO.template.ferramentasFolder,{"nome":menu[i].text});t=$(t);t.find("a").data(datan).click(function(){$(this).find("a").off("click");var data=$(this).data();var t=Mustache.to_html(i3GEO.caixaDeFerramentas.config.templateMigalha,data)});f.idOndeFolder.append(t)}}data.nivel=2;data.id=data.n0;i3GEO.caixaDeFerramentas.migalha(data)}};
346 347 //
347 348 //template.js
348 349 if (typeof (i3GEO) === 'undefined') {
... ...
js/ini_i3geo.js
... ... @@ -80,6 +80,10 @@ if(typeof YAHOO != &quot;undefined&quot; ){
80 80 * Section: i3GEO
81 81 */
82 82 var i3GEO = {
  83 + init: function(){
  84 + i3GEO.cria();
  85 + i3GEO.inicia();
  86 + },
83 87 /**
84 88 * Constant: tamanhodoc
85 89 * Largura e altura do navegador ap&oacute;s a inicializa&ccedil;&atilde;o
... ...
js/template.js 100644 → 100755