Commit 5944620db0e1b53ee12baa9af9f57a4b2325aa89
1 parent
2f080fc2
Exists in
master
and in
7 other branches
modificada a forma de mostrar as coordenadas UTM. Agora, conforme a configuração…
…, as coordenadas UTM são mostradas no mesmo lugar das coordenadas GEO. Incluído parâmetro para definição da transparência das barras de ferramentas e mapa de referência
Showing
17 changed files
with
727 additions
and
199 deletions
Show diff stats
aplicmap/geral.htm
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | Para depurar o código sem ter de compactá-los, substitua na linha abaixo |
12 | 12 | o arquivo i3geo.js por i3geo.js |
13 | 13 | --> |
14 | -<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | |
14 | +<script type="text/javascript" src="../classesjs/i3geo.js"></script> | |
15 | 15 | <style> |
16 | 16 | .yui-log .i3geo {background-color:yellow;} /* customize a color */ |
17 | 17 | .yui-log .redesenho {background-color:yellow;} /* customize a color */ |
... | ... | @@ -24,6 +24,7 @@ |
24 | 24 | <body id="i3geo"> |
25 | 25 | |
26 | 26 | <table id='mst' summary="" style='display:none;' width=100% cellspacing='0'> |
27 | + | |
27 | 28 | <!-- |
28 | 29 | Inclui a barra superior. Se vc não quiser o menu, é só comentar o TR |
29 | 30 | --> |
... | ... | @@ -39,6 +40,7 @@ |
39 | 40 | <!-- |
40 | 41 | Guias principais, não mude o ID, apenas o nome se for desejado |
41 | 42 | --> |
43 | + | |
42 | 44 | <div class=verdeescuro style="top:0px;cursor:pointer;"> |
43 | 45 | <div id=guia1 class=guia >Temas</div> |
44 | 46 | <div id=guia2 class=guia >Adiciona</div> |
... | ... | @@ -46,6 +48,7 @@ |
46 | 48 | <div id=guia5 class=guia >Links</div> |
47 | 49 | </div> |
48 | 50 | </td> |
51 | + | |
49 | 52 | </tr> |
50 | 53 | </table> |
51 | 54 | </td> |
... | ... | @@ -61,6 +64,7 @@ |
61 | 64 | <!-- |
62 | 65 | Esta div acrescenta a lista de propriedades do mapa, caso vc queira colocá-la em um lugar específico |
63 | 66 | --> |
67 | + | |
64 | 68 | <!--<div id=listaPropriedades ></div>--> |
65 | 69 | <!-- |
66 | 70 | Esta div acrescenta a opção de busca rápida, caso vc queira colocá-la em um lugar específico |
... | ... | @@ -80,6 +84,7 @@ |
80 | 84 | <div id=outrasOpcoesAdiciona style='top:25px;' ></div> |
81 | 85 | --> |
82 | 86 | </div> |
87 | + | |
83 | 88 | <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /></div> |
84 | 89 | <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> |
85 | 90 | <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> |
... | ... | @@ -91,6 +96,7 @@ |
91 | 96 | Vc pode usar o estilo para definir o tamanho do mapa. Se não tiver estilo definido, o tamanho será automático |
92 | 97 | --> |
93 | 98 | <tr><td class=verdeclaro id=contemImg > |
99 | + | |
94 | 100 | <div id=corpoMapa style="background-image:url('../imagens/i3geo1bw.jpg');"></div> |
95 | 101 | </td></tr> |
96 | 102 | </table> |
... | ... | @@ -111,19 +117,28 @@ vc pode optar por colocar mensagens de ajuda em algum lugar |
111 | 117 | <tr><td colspan=2 ><div id=i3geo_ajuda class=verdeescuro style="text-align:left;" >I3Geo</div></td></tr> |
112 | 118 | --> |
113 | 119 | <tr> |
120 | + | |
114 | 121 | <td class=tdbranca > |
115 | - <div id=visual ></div> | |
122 | + <!-- | |
123 | + Nesse div são incluídos os ícones que permitem ao usuário modificar o visual de cores dos ícones | |
124 | + <div id=visual ></div> | |
125 | + --> | |
126 | + <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> | |
127 | + <div id="seletorIdiomas" ></div> | |
128 | + <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | |
116 | 129 | <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div> |
117 | 130 | </td> |
118 | 131 | <td class=tdbranca > |
119 | 132 | <table width=100% ><tr> |
120 | 133 | <td class=tdbranca ><div id=lugarquadros ></div></td> |
121 | 134 | <td class=tdbranca style=text-align:center > |
122 | - <div id=localizarxy > | |
123 | - Aguarde... | |
124 | - </div> | |
135 | + <!-- aqui será incluído o gadget que mostra a coordenada geográfica da posição do mouse --> | |
136 | + <div id=localizarxy style="text-align:left;font-size:10px;">Aguarde...</div> | |
137 | + </td> | |
138 | + <td class=tdbranca > | |
139 | + <!-- aqui será incluída a escala numérica --> | |
140 | + <div id=escala ></div> | |
125 | 141 | </td> |
126 | - <td class=tdbranca ><div id=escala ></div></td> | |
127 | 142 | <!-- |
128 | 143 | A opção de localização 'onde estou?' baseia-se na identificação do IP do usuário. Para |
129 | 144 | que esta opção funcione corretamente, deve estar instalado no I3Geo o pacote geoIP. Veja no |
... | ... | @@ -131,9 +146,12 @@ vc pode optar por colocar mensagens de ajuda em algum lugar |
131 | 146 | --> |
132 | 147 | <td class=tdbranca ><div id=ondeestou ></div></td> |
133 | 148 | </tr> |
134 | - <!-- esta div recebe o cálculo do posicionamento do mouse em coordenadas UTM --> | |
135 | - <tr><td></td><td class="tdbranca"><div style="text-align:left;font-size:10px;background-color:white;display:none;" id=mostraUTM ></div></td><td></td></tr> | |
136 | - | |
149 | + <!-- esta div recebe o cálculo do posicionamento do mouse em coordenadas UTM | |
150 | + As coordenadas UTM apenas serão mostradas nessa div se o parâmetro | |
151 | + i3GEO.gadgets.mostraCoordenadasUTM.idhtml for diferente de i3GEO.gadgets.mostraCoordenadasGEO.idhtml | |
152 | + se os IDs forem iguais, o tipo de coordenada mostrada será intercalada, ora UTM ora GEO. | |
153 | + <tr><td></td><td class="tdbranca"><div style="text-align:left;font-size:8px;background-color:white;display:none;" id=mostraUTM ></div></td><td></td></tr> | |
154 | + --> | |
137 | 155 | </table> |
138 | 156 | </td> |
139 | 157 | </tr> |
... | ... | @@ -151,78 +169,93 @@ vc pode optar por colocar mensagens de ajuda em algum lugar |
151 | 169 | --> |
152 | 170 | <div id=barraDeBotoes1 style='display:none'> |
153 | 171 | <table style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><div ID='historicozoom' ></div></td></tr><tr><td style=height:5px ></td></tr></table> |
172 | + | |
154 | 173 | <table title="zoom" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="zoom" alt="" src="../imagens/branco.gif" id='zoomli'/></td></tr></table> |
155 | 174 | <table title="desloca" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="desloca" alt="" src="../imagens/branco.gif" ID='pan'/></td></tr></table> |
156 | 175 | <table title="info" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="info" alt="" src="../imagens/branco.gif" id='identifica'/></td></tr></table> |
157 | 176 | <table title="geral" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="geral" alt="" src="../imagens/branco.gif" ID='zoomtot'/></td></tr></table> |
158 | - <table title="mede" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="mede" alt="" src="../imagens/branco.gif" id='mede'/></td></tr></table> | |
159 | - <table title="area" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="area" alt="" src="../imagens/branco.gif" id='area'/></td></tr></table> | |
160 | 177 | </div> |
161 | 178 | <div id=barraDeBotoes2 style='display:none'> |
162 | 179 | <table style="width:100%"><caption style="text-align:center"> </caption> |
163 | 180 | <tr><td style='background-color:rgb(250,250,250);'><img title="" alt="" src="../imagens/branco.gif" id='sobeferramentas'/></td></tr> |
164 | 181 | </table> |
182 | + | |
165 | 183 | <div style='display:inline;background-color:rgb(250,250,250);'> |
166 | - <p style='font-size:6px;'> </p> | |
184 | + <p style='font-size:2px;'> </p> | |
185 | + <img title="mede" alt="" src="../imagens/branco.gif" id='mede'/> | |
186 | + </div> | |
187 | + | |
188 | + <div style='display:inline;background-color:rgb(250,250,250);'> | |
189 | + <p style='font-size:2px;'> </p> | |
190 | + <img title="area" alt="" src="../imagens/branco.gif" id='area'/> | |
191 | + </div> | |
192 | + | |
193 | + <div style='display:inline;background-color:rgb(250,250,250);'> | |
194 | + <p style='font-size:2px;'> </p> | |
167 | 195 | <img title="imprimir" alt="" src="../imagens/branco.gif" id='imprimir'/> |
168 | 196 | </div> |
169 | 197 | |
170 | 198 | <div style='display:inline;background-color:rgb(250,250,250);'> |
171 | - <p style='font-size:6px;'> </p> | |
199 | + <p style='font-size:2px;'> </p> | |
172 | 200 | <img title="reinicia" alt="" src="../imagens/branco.gif" id='reinicia'/> |
173 | 201 | </div> |
202 | + | |
174 | 203 | |
175 | 204 | <div style='display:inline;background-color:rgb(250,250,250);'> |
176 | - <p style='font-size:6px;'> </p> | |
205 | + <p style='font-size:2px;'> </p> | |
177 | 206 | <img title="extensao" alt="" src="../imagens/branco.gif" id='exten'/> |
178 | 207 | </div> |
179 | 208 | |
180 | 209 | <div style='display:inline;background-color:rgb(250,250,250);'> |
181 | - <p style='font-size:6px;'> </p> | |
210 | + <p style='font-size:2px;'> </p> | |
182 | 211 | <img title="referencia" alt="" src="../imagens/branco.gif" id='referencia'/> |
183 | 212 | </div> |
184 | 213 | <div style='display:inline;background-color:rgb(250,250,250);'> |
185 | - <p style='font-size:6px;'> </p> | |
214 | + <p style='font-size:2px;'> </p> | |
186 | 215 | <img title="insere xy" alt="" src="../imagens/branco.gif" id='inserexy'/> |
187 | 216 | </div> |
188 | 217 | <div style='display:inline;background-color:rgb(250,250,250);'> |
189 | - <p style='font-size:6px;'> </p> | |
218 | + <p style='font-size:2px;'> </p> | |
190 | 219 | <img title="texto" alt="" src="../imagens/branco.gif" id='textofid'/> |
191 | 220 | </div> |
192 | 221 | <div style='display:inline;background-color:rgb(250,250,250);'> |
193 | - <p style='font-size:6px;'> </p> | |
222 | + <p style='font-size:2px;'> </p> | |
194 | 223 | <img title="selecao" alt="" src="../imagens/branco.gif" id='selecao'/> |
224 | + | |
195 | 225 | </div> |
196 | 226 | <div style='display:inline;background-color:rgb(250,250,250);'> |
197 | - <p style='font-size:6px;'> </p> | |
227 | + <p style='font-size:2px;'> </p> | |
198 | 228 | <img title="google" alt="" src="../imagens/branco.gif" id='google'/> |
199 | 229 | </div> |
200 | 230 | <div style='display:inline;background-color:rgb(250,250,250);'> |
201 | - <p style='font-size:6px;'> </p> | |
231 | + <p style='font-size:2px;'> </p> | |
202 | 232 | <img title="insere grafico" alt="" src="../imagens/branco.gif" id='inseregrafico'/> |
203 | 233 | </div> |
204 | 234 | <div style='display:none;background-color:rgb(250,250,250);'> |
205 | - <p style='font-size:6px;'> </p> | |
235 | + | |
236 | + <p style='font-size:2px;'> </p> | |
206 | 237 | <img title="lente" alt="" src="../imagens/branco.gif" id='lentei'/> |
207 | 238 | </div> |
208 | 239 | <div style='display:none;background-color:rgb(250,250,250);'> |
209 | - <p style='font-size:6px;'> </p> | |
240 | + <p style='font-size:2px;'> </p> | |
210 | 241 | <img title="scielo" alt="" src="../imagens/branco.gif" id='scielo'/> |
211 | 242 | </div> |
212 | 243 | <div style='display:none;background-color:rgb(250,250,250);'> |
213 | - <p style='font-size:6px;'> </p> | |
244 | + <p style='font-size:2px;'> </p> | |
245 | + | |
214 | 246 | <img title="confluencias" alt="" src="../imagens/branco.gif" id='confluence'/> |
215 | 247 | </div> |
216 | 248 | <div style='display:none;background-color:rgb(250,250,250);'> |
217 | - <p style='font-size:6px;'> </p> | |
249 | + <p style='font-size:2px;'> </p> | |
218 | 250 | <img title="busca na wikipedia" alt="" src="../imagens/branco.gif" id='wiki'/> |
219 | 251 | </div> |
220 | 252 | <div style='display:none;background-color:rgb(250,250,250);'> |
221 | - <p style='font-size:6px;'> </p> | |
253 | + <p style='font-size:2px;'> </p> | |
222 | 254 | <img title="3d" alt="" src="../imagens/branco.gif" id='v3d'/> |
255 | + | |
223 | 256 | </div> |
224 | 257 | <div style='display:none;background-color:rgb(250,250,250);'> |
225 | - <p style='font-size:6px;'> </p> | |
258 | + <p style='font-size:2px;'> </p> | |
226 | 259 | <img title="fotos" alt="" src="../imagens/branco.gif" id='buscafotos'/> |
227 | 260 | </div> |
228 | 261 | <table style="width:100%;"><tr><td style='background-color:rgb(250,250,250);'><p style='font-size:6px;'> </p><img title="" alt="" src="../imagens/branco.gif" id='desceferramentas'/></td></tr></table> |
... | ... | @@ -268,8 +301,11 @@ i3geoLog.show(); |
268 | 301 | /* |
269 | 302 | Inicializa o mapa |
270 | 303 | */ |
271 | -//i3GEO.guias.ATUAL = "adiciona" | |
272 | - | |
304 | +//i3GEO.guias.ATUAL = "legenda" | |
305 | +i3GEO.barraDeBotoes.AUTOALTURA = true | |
306 | +i3GEO.barraDeBotoes.PERMITEFECHAR = false | |
307 | +i3GEO.barraDeBotoes.PERMITEDESLOCAR = false | |
308 | +i3GEO.idioma.IDSELETOR = "seletorIdiomas" | |
273 | 309 | i3GEO.inicia(); |
274 | 310 | |
275 | 311 | //esconde a opção de inclusão da escala quando a resolução da tela for muito pequena |
... | ... | @@ -278,5 +314,6 @@ if($i("escala") && i3GEO.parametros.w < 500) |
278 | 314 | |
279 | 315 | |
280 | 316 | </script> |
317 | + | |
281 | 318 | </body> |
282 | 319 | </html> |
283 | 320 | \ No newline at end of file | ... | ... |
classesjs/classe_barradebotoes.js
... | ... | @@ -39,6 +39,41 @@ i3GEO.barraDeBotoes = { |
39 | 39 | */ |
40 | 40 | BARRAS: new Array(), |
41 | 41 | /* |
42 | + Property: AUTOALTURA | |
43 | + | |
44 | + Ajusta automaticamente a altura das barras conforme a altura do mapa. | |
45 | + | |
46 | + Type: | |
47 | + {boolean} | |
48 | + */ | |
49 | + AUTOALTURA: false, | |
50 | + /* | |
51 | + Property: TRANSICAOSUAVE | |
52 | + | |
53 | + Altera a transparência das barras quando o mouse sobrepõe a barra e quando sai da barra | |
54 | + | |
55 | + Type: | |
56 | + {boolean} | |
57 | + | |
58 | + Default: | |
59 | + {true} | |
60 | + */ | |
61 | + TRANSICAOSUAVE: true, | |
62 | + /* | |
63 | + Property: TRANSPARENCIA | |
64 | + | |
65 | + Valor da transparência máxima utilizada quando TRANSICAOSUAVE for igual a true. | |
66 | + | |
67 | + Varia de 0 a 100, sendo 0 a menor transparência | |
68 | + | |
69 | + Type: | |
70 | + {numeric} | |
71 | + | |
72 | + Default: | |
73 | + {30} | |
74 | + */ | |
75 | + TRANSPARENCIA: 50, | |
76 | + /* | |
42 | 77 | Property: PERMITEFECHAR |
43 | 78 | |
44 | 79 | Mostra o botão para fechar as barras ou não. |
... | ... | @@ -235,12 +270,21 @@ i3GEO.barraDeBotoes = { |
235 | 270 | novoel.style.display="block"; |
236 | 271 | novoel.style.border="1px solid gray"; |
237 | 272 | novoel.style.background="white"; |
238 | - if (navm) | |
239 | - {novoel.style.filter='alpha(opacity=90)';} | |
240 | - else | |
241 | - {novoel.style.opacity= .85;} | |
242 | - //var temp = '<div class="hd" > </div>'; | |
243 | - //temp += '<div class="bd" style="background-color:rgb(250,250,250);width='+wj+'px" >'; | |
273 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
274 | + if (navm){ | |
275 | + | |
276 | + novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')'; | |
277 | + } | |
278 | + else{ | |
279 | + novoel.style.opacity= i3GEO.barraDeBotoes.TRANSPARENCIA / 100; | |
280 | + } | |
281 | + } | |
282 | + else{ | |
283 | + if (navm) | |
284 | + {novoel.style.filter='alpha(opacity=90)';} | |
285 | + else | |
286 | + {novoel.style.opacity= .85;} | |
287 | + } | |
244 | 288 | var temp = ""; |
245 | 289 | if (barraZoom == true) |
246 | 290 | { |
... | ... | @@ -257,19 +301,63 @@ i3GEO.barraDeBotoes = { |
257 | 301 | //objposicaocursor.imgx = 0; |
258 | 302 | if($i("i3geo_rosa")) |
259 | 303 | {$i("i3geo_rosa").style.display="none";} |
304 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
305 | + if (navm) | |
306 | + {novoel.style.filter='alpha(opacity=90)';} | |
307 | + else | |
308 | + {novoel.style.opacity= .85;} | |
309 | + } | |
260 | 310 | }; |
311 | + novoel.onmouseout = function(){ | |
312 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
313 | + if (navm) | |
314 | + {novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')';} | |
315 | + else | |
316 | + {novoel.style.opacity= i3GEO.barraDeBotoes.TRANSPARENCIA / 100;} | |
317 | + } | |
318 | + } | |
261 | 319 | document.body.appendChild(novoel); |
262 | 320 | //copia os botoes do HTML para a janela |
263 | 321 | if ($i(idconteudo)) |
264 | 322 | { |
265 | 323 | $i(idconteudonovo+"_").innerHTML = $i(idconteudo).innerHTML; |
266 | 324 | $i(idconteudo).innerHTML = ""; |
325 | + //faz o cálculo do número de botões que devem ficar visíveis em função do tamanho da barra | |
326 | + if(i3GEO.barraDeBotoes.AUTOALTURA){ | |
327 | + var elementos = $i(idconteudonovo+"_").getElementsByTagName("img"); | |
328 | + if(elementos[0].id == "sobeferramentas"){ | |
329 | + try{ | |
330 | + var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); | |
331 | + var alturadisponivel = i3GEO.parametros.h - 4; | |
332 | + var numerobotoes = parseInt(alturadisponivel / 30); | |
333 | + var nelementos = elementos.length; | |
334 | + var i = 0; | |
335 | + do{ | |
336 | + elementos[i].style.display = "none"; | |
337 | + var i = i + 1; | |
338 | + } | |
339 | + while(i < nelementos) | |
340 | + var i = 0; | |
341 | + do{ | |
342 | + elementos[i].style.display = "inline"; | |
343 | + var i = i + 1; | |
344 | + } | |
345 | + while(i < numerobotoes) | |
346 | + }catch(e){} | |
347 | + if(i == numerobotoes){ | |
348 | + if($i("sobeferramentas")){$i("sobeferramentas").style.display="none";} | |
349 | + if($i("desceferramentas")){$i("desceferramentas").style.display="none";} | |
350 | + } | |
351 | + } | |
352 | + } | |
267 | 353 | } |
268 | 354 | YAHOO.namespace("janelaBotoes.xp"); |
269 | - YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
355 | + if(i3GEO.barraDeBotoes.AUTOALTURA == false) | |
356 | + YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
357 | + else | |
358 | + YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {height:i3GEO.parametros.h - 4,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
270 | 359 | if((barraZoom == true) && $i("img")){ |
271 | 360 | i3GEO.barraDeBotoes.ativaBarraDeZoom(); |
272 | - | |
273 | 361 | verticalSlider = YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom", 0, 70); |
274 | 362 | verticalSlider.onChange = function(offsetFromStart) |
275 | 363 | {g_fatordezoom = (offsetFromStart - 35) / 5;}; |
... | ... | @@ -357,28 +445,35 @@ i3GEO.barraDeBotoes = { |
357 | 445 | } |
358 | 446 | } |
359 | 447 | YAHOO.janelaBotoes.xp.panel.render(); |
448 | + if(i3GEO.barraDeBotoes.AUTOALTURA == true){ | |
449 | + var y = y - i3GEO.interface.BARRABOTOESTOP + 2; | |
450 | + var x = x - 3; | |
451 | + } | |
360 | 452 | YAHOO.janelaBotoes.xp.panel.moveTo(x,y); |
361 | 453 | if($i("sobeferramentas")){ |
362 | 454 | $i("sobeferramentas").onclick = function(){ |
363 | 455 | var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
364 | - if(elementos[0].style.display == "inline") | |
456 | + var nelementos = elementos.length; | |
457 | + if(elementos[0].style.display == "inline" && elementos[0].id == "") | |
365 | 458 | {return;} |
366 | - if(elementos.length > 0){ | |
459 | + if(elementos[1].style.display == "inline" && elementos[1].id == "") | |
460 | + {return;} | |
461 | + if(nelementos > 0){ | |
367 | 462 | var mostra = elementos[0]; |
368 | 463 | var i = 0; |
369 | 464 | do{ |
370 | 465 | if(elementos[i].style){ |
371 | - if(elementos[i].style.display == "inline") | |
466 | + if(elementos[i].style.display == "inline" && elementos[i].id == "") | |
372 | 467 | {break;} |
373 | - if(elementos[i].style.display == "none") | |
468 | + if(elementos[i].style.display == "none" && elementos[i].id == "") | |
374 | 469 | {var mostra = elementos[i];} |
375 | 470 | } |
376 | 471 | var i = i + 1; |
377 | 472 | } |
378 | - while(i < elementos.length) | |
473 | + while(i < nelementos) | |
379 | 474 | mostra.style.display="inline"; |
380 | 475 | //esconde o último botao |
381 | - var i = elementos.length - 1; | |
476 | + var i = nelementos - 1; | |
382 | 477 | var mostra = elementos[i]; |
383 | 478 | do{ |
384 | 479 | if(elementos[i].style){ |
... | ... | @@ -399,26 +494,31 @@ i3GEO.barraDeBotoes = { |
399 | 494 | var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
400 | 495 | if(elementos[elementos.length - 1].style.display == tipo) |
401 | 496 | {return;} |
402 | - if(elementos.length > 0){ | |
497 | + var nelementos = elementos.length; | |
498 | + if(nelementos > 0){ | |
403 | 499 | //esconde o primeiro botao |
404 | 500 | var i = 0; |
405 | 501 | do{ |
406 | - if(elementos[i].style){ | |
407 | - if((elementos[i].style.display == "block") || (elementos[i].style.display == "inline") || (elementos[i].style.display == "")) | |
408 | - {elementos[i].style.display="none";break;} | |
502 | + var e = elementos[i]; | |
503 | + if(e.style){ | |
504 | + if((e.style.display == "block") || (e.style.display == "inline") || (e.style.display == "")){ | |
505 | + if(e.id == "") | |
506 | + {e.style.display="none";break;} | |
507 | + } | |
409 | 508 | } |
410 | 509 | var i = i + 1; |
411 | 510 | } |
412 | - while(i < elementos.length) | |
511 | + while(i < nelementos) | |
413 | 512 | //mostra o último botao |
414 | - var i = elementos.length-1; | |
513 | + var i = nelementos-1; | |
415 | 514 | var mostra = elementos[i]; |
416 | 515 | do{ |
417 | - if(elementos[i].style){ | |
418 | - if(elementos[i].style.display == tipo) | |
516 | + var e = elementos[i]; | |
517 | + if(e.style){ | |
518 | + if(e.style.display == tipo) | |
419 | 519 | {break;} |
420 | - if(elementos[i].style.display == "none") | |
421 | - {var mostra = elementos[i];} | |
520 | + if(e.style.display == "none") | |
521 | + {var mostra = e;} | |
422 | 522 | } |
423 | 523 | var i = i - 1; |
424 | 524 | } | ... | ... |
classesjs/classe_gadgets.js
... | ... | @@ -96,7 +96,7 @@ i3GEO.gadgets = { |
96 | 96 | */ |
97 | 97 | PARAMETROS: { |
98 | 98 | "mostraCoordenadasUTM": |
99 | - {idhtml:"mostraUTM"}, | |
99 | + {idhtml:"localizarxy"}, | |
100 | 100 | "mostraCoordenadasGEO": |
101 | 101 | {idhtml:"localizarxy"}, |
102 | 102 | "mostraInserirKml": |
... | ... | @@ -127,7 +127,11 @@ i3GEO.gadgets = { |
127 | 127 | está estacionado sobre o mapa. Por default isso já é feito pelo i3Geo. |
128 | 128 | |
129 | 129 | Se você não quer essa função no mapa, elimine o elemento HTML existente no mapa que contenha o |
130 | - id definido em i3GEO.gadgets.PARAMETROS (mostraUTM) ou altere a variável i3GEO.eventos.MOUSEPARADO | |
130 | + id definido em i3GEO.gadgets.PARAMETROS (mostraCoordenadasUTM) ou altere a variável i3GEO.eventos.MOUSEPARADO | |
131 | + | |
132 | + Se i3GEO.gadgets.mostraCoordenadasUTM.idhtml for igual a i3GEO.gadgets.mostraCoordenadasGEO.idhtml | |
133 | + | |
134 | + os valores mostrados serão intercalados entre GEO e UTM | |
131 | 135 | |
132 | 136 | Parameters: |
133 | 137 | |
... | ... | @@ -153,11 +157,15 @@ i3GEO.gadgets = { |
153 | 157 | if($i("wdoca")){return;} |
154 | 158 | var tempUtm = function(retorno){ |
155 | 159 | //alert(retorno) |
156 | - setTimeout("$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';",3400); | |
160 | + var funcao = ""; | |
161 | + funcao += "$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"; | |
162 | + funcao += "if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml)"; | |
163 | + funcao += "{$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.gadgets.mostraCoordenadasGEO();}"; | |
164 | + setTimeout(funcao,3400); | |
157 | 165 | var temp = $i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml); |
158 | 166 | if(retorno.data){ |
159 | 167 | temp.style.display="block"; |
160 | - temp.innerHTML = "UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" datum="+retorno.data.datum; | |
168 | + temp.innerHTML = "UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" "+retorno.data.datum; | |
161 | 169 | //return (retorno.data); |
162 | 170 | } |
163 | 171 | }; |
... | ... | @@ -838,7 +846,10 @@ i3GEO.gadgets = { |
838 | 846 | else |
839 | 847 | {var conta = 0;} |
840 | 848 | for(var nomeMenu in i3GEO.configura.oMenuData.submenus){ |
849 | + if(i3GEO.configura.oMenuData.submenus[nomeMenu] != "") | |
841 | 850 | i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata: i3GEO.configura.oMenuData.submenus[nomeMenu]}); |
851 | + //alert(nomeMenu) | |
852 | + //alert(i3GEO.configura.oMenuData.submenus[nomeMenu].length) | |
842 | 853 | var conta=conta+1; |
843 | 854 | } |
844 | 855 | } | ... | ... |
classesjs/classe_i3geo.js
... | ... | @@ -175,13 +175,14 @@ i3GEO = { |
175 | 175 | {menos = menos + parseInt($i("ferramentas").style.width);} |
176 | 176 | var novow = parseInt(screen.availWidth) - diminuix; |
177 | 177 | var novoh = parseInt(screen.availHeight) - diminuiy; |
178 | + window.resizeTo(screen.availWidth,screen.availHeight); | |
179 | + window.moveTo(0,0); | |
180 | + | |
178 | 181 | //o try aqui é necessário por conta do uso possível do i3geo em um iframe |
179 | 182 | try{ |
180 | - if (document.body.style.width < 400){ | |
181 | - var novow = parseInt(screen.availWidth) - diminuix; | |
182 | - var novoh = parseInt(screen.availHeight) - diminuiy; | |
183 | - window.resizeTo(screen.availWidth,screen.availHeight); | |
184 | - window.moveTo(0,0); | |
183 | + if (novow < 800){ | |
184 | + var novow = 800; | |
185 | + var novoh = 600; | |
185 | 186 | } |
186 | 187 | } |
187 | 188 | catch(e){var e = "";} |
... | ... | @@ -189,19 +190,15 @@ i3GEO = { |
189 | 190 | document.body.style.height = novoh; |
190 | 191 | var w = novow - menos - diminuix; |
191 | 192 | var h = novoh - diminuiy; |
192 | - if (document.getElementById("corpoMapa")){ | |
193 | - if (document.getElementById("corpoMapa").style.width){ | |
194 | - var w = parseInt(document.getElementById("corpoMapa").style.width); | |
195 | - var h = parseInt(document.getElementById("corpoMapa").style.width); | |
196 | - } | |
197 | - if (document.getElementById("corpoMapa").style.height) | |
198 | - {var h = parseInt(document.getElementById("corpoMapa").style.height);} | |
199 | - } | |
200 | 193 | var temp = $i("corpoMapa"); |
201 | - if(temp){ | |
194 | + if (temp){ | |
202 | 195 | if(temp.style){ |
203 | - if(temp.style.width){var w = parseInt(temp.style.width);} | |
204 | - if(temp.style.height){var h = parseInt(temp.style.height);} | |
196 | + if (temp.style.width){ | |
197 | + var w = parseInt(temp.style.width); | |
198 | + var h = parseInt(temp.style.width); | |
199 | + } | |
200 | + if (temp.style.height) | |
201 | + {var h = parseInt(temp.style.height);} | |
205 | 202 | } |
206 | 203 | } |
207 | 204 | if($i("contemImg")){ |
... | ... | @@ -405,6 +402,11 @@ i3GEO = { |
405 | 402 | dessa chamada é armazenada em i3GEO.parametros |
406 | 403 | */ |
407 | 404 | atualiza: function(retorno){ |
405 | + if(arguments.length == 0){ | |
406 | + i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
407 | + i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
408 | + return; | |
409 | + } | |
408 | 410 | //verifica se o parâmetro retorno existe, caso contrário, |
409 | 411 | //faz a chamada ao programa PHP para obter os parâmetros |
410 | 412 | try{ |
... | ... | @@ -416,8 +418,14 @@ i3GEO = { |
416 | 418 | catch(e){} |
417 | 419 | var erro = function(){ |
418 | 420 | var legimagem = ""; |
419 | - i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
420 | - i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
421 | + var c = confirm("Ocorreu um erro, quer tentar novamente?"); | |
422 | + if(c){ | |
423 | + i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
424 | + i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
425 | + } | |
426 | + else{ | |
427 | + i3GEO.janela.fechaAguarde(); | |
428 | + } | |
421 | 429 | } |
422 | 430 | try{eval(retorno.data.variaveis);} |
423 | 431 | catch(e){erro.call();return;} | ... | ... |
classesjs/classe_mapa.js
... | ... | @@ -62,10 +62,6 @@ i3GEO.mapa = { |
62 | 62 | imagemyi = 0; |
63 | 63 | imagemxref = 0; |
64 | 64 | imagemyref = 0; |
65 | - var dc = $i("i3geo"); | |
66 | - if(!dc){return;} | |
67 | - if (dc.style.left){imagemxi += parseInt(dc.style.left);} | |
68 | - if (dc.style.top){imagemyi += parseInt(dc.style.top);} | |
69 | 65 | var dc = $i(elemento); |
70 | 66 | while ((dc.offsetParent) && (dc.offsetParent.id != "i3geo")){ |
71 | 67 | dc = dc.offsetParent; |
... | ... | @@ -77,8 +73,12 @@ i3GEO.mapa = { |
77 | 73 | c.style.position="absolute"; |
78 | 74 | $left(i3GEO.interface.IDCORPO,imagemxi); |
79 | 75 | $top(i3GEO.interface.IDCORPO,imagemyi); |
80 | - if ($i("i3geo").style.left){$left(i3GEO.interface.IDCORPO,imagemxi + parseInt($i("i3geo").style.left));} | |
81 | - if ($i("i3geo").style.top){$top(i3GEO.interface.IDCORPO,imagemyi + parseInt($i("i3geo").style.top));} | |
76 | + /* | |
77 | + if($i("i3geo")){ | |
78 | + if ($i("i3geo").style.left){$left(i3GEO.interface.IDCORPO,imagemxi + parseInt($i("i3geo").style.left));} | |
79 | + if ($i("i3geo").style.top){$top(i3GEO.interface.IDCORPO,imagemyi + parseInt($i("i3geo").style.top));} | |
80 | + } | |
81 | + */ | |
82 | 82 | } |
83 | 83 | } |
84 | 84 | catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao"+e);} | ... | ... |
classesjs/classe_maparef.js
... | ... | @@ -43,6 +43,32 @@ i3GEO.maparef = { |
43 | 43 | */ |
44 | 44 | fatorZoomDinamico: -3, |
45 | 45 | /* |
46 | + Property: TRANSICAOSUAVE | |
47 | + | |
48 | + Altera a transparência quando o mouse sobrepõe ao mapa de referência e quando sai | |
49 | + | |
50 | + Type: | |
51 | + {boolean} | |
52 | + | |
53 | + Default: | |
54 | + {true} | |
55 | + */ | |
56 | + TRANSICAOSUAVE: true, | |
57 | + /* | |
58 | + Property: TRANSPARENCIA | |
59 | + | |
60 | + Valor da transparência máxima utilizada quando TRANSICAOSUAVE for igual a true. | |
61 | + | |
62 | + Varia de 0 a 100, sendo 0 a menor transparência | |
63 | + | |
64 | + Type: | |
65 | + {numeric} | |
66 | + | |
67 | + Default: | |
68 | + {30} | |
69 | + */ | |
70 | + TRANSPARENCIA: 50, | |
71 | + /* | |
46 | 72 | Property: TOP |
47 | 73 | |
48 | 74 | Posição da janela em relação ao topo do mapa |
... | ... | @@ -67,6 +93,24 @@ i3GEO.maparef = { |
67 | 93 | //YAHOO.log("initJanelaRef", "i3geo"); |
68 | 94 | if (!$i("i3geo_winRef")){ |
69 | 95 | var novoel = document.createElement("div"); |
96 | + if(i3GEO.maparef.TRANSICAOSUAVE){ | |
97 | + if (navm) | |
98 | + {novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')';} | |
99 | + else | |
100 | + {novoel.style.opacity= i3GEO.maparef.TRANSPARENCIA / 100;} | |
101 | + novoel.onmouseover = function(){ | |
102 | + if (navm) | |
103 | + {novoel.style.filter='alpha(opacity=100)';} | |
104 | + else | |
105 | + {novoel.style.opacity= 1;} | |
106 | + }; | |
107 | + novoel.onmouseout = function(){ | |
108 | + if (navm) | |
109 | + {novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')';} | |
110 | + else | |
111 | + {novoel.style.opacity= i3GEO.maparef.TRANSPARENCIA / 100;} | |
112 | + } | |
113 | + } | |
70 | 114 | novoel.id = "i3geo_winRef"; |
71 | 115 | novoel.style.display="none"; |
72 | 116 | novoel.style.borderColor="gray"; | ... | ... |
classesjs/classe_util.js
... | ... | @@ -879,7 +879,7 @@ i3GEO.util = { |
879 | 879 | /* |
880 | 880 | Function: desaparece |
881 | 881 | |
882 | - Aplica efeito de desaparecimento suave de um objetov | |
882 | + Aplica efeito de desaparecimento suave de um objeto | |
883 | 883 | |
884 | 884 | Parameters: |
885 | 885 | |
... | ... | @@ -920,6 +920,7 @@ i3GEO.util = { |
920 | 920 | {obj.style.opacity= 1;} |
921 | 921 | if(removeobj){ |
922 | 922 | var p = obj.parentNode; |
923 | + if(p) | |
923 | 924 | p.removeChild(obj); |
924 | 925 | } |
925 | 926 | } | ... | ... |
classesjs/compactados/classe_barradebotoes_compacto.js
1 | -if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.barraDeBotoes={BARRAS:new Array(),PERMITEFECHAR:true,PERMITEDESLOCAR:true,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,BOTAOPADRAO:"pan",BOTAOCLICADO:"",ativaIcone:function(icone){i3GEO.barraDeBotoes.BOTAOCLICADO=icone;var ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(ko>=0){do{var temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico"&&temp){var ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}while(ko--)}if($i(icone)){with($i(icone).style){borderColor='white';borderWidth="1px"}}},ativaBotoes:function(padrao){if(arguments.length==0){var padrao=i3GEO.barraDeBotoes.BOTAOPADRAO}i3GEO.barraDeBotoes.BOTAOCLICADO=padrao;var l=i3GEO.barraDeBotoes.LISTABOTOES;var b=l.length-1;if(b>=0){do{if($i(l[b].iddiv)){if(l[b].conteudo){eval('$i(l[b].iddiv).innerHTML = "'+l[b].conteudo+'"')}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.ajuda.mostraJanela("'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.ajuda.mostraJanela("");};')}if(l[b].funcaoonclick){$i(l[b].iddiv).onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}},ativaBarraDeZoom:function(){$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1;$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';i3GEO.navega.zoomin();g_fatordezoom=0};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1;$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';i3GEO.navega.zoomout();g_fatordezoom=0}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y){var wj="36px";var recuo="0px";var novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";novoel.style.border="1px solid gray";novoel.style.background="white";if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=.85}var temp="";if(barraZoom==true){if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}temp+='<div id="vertMaisZoom" ></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';temp+='<div id=vertMenosZoom ></div>';if(navn){temp+='</div>'}}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:-6px;" ></div></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){if($i("i3geo_rosa")){$i("i3geo_rosa").style.display="none"}};document.body.appendChild(novoel);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML=""}YAHOO.namespace("janelaBotoes.xp");YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false});if((barraZoom==true)&&$i("img")){i3GEO.barraDeBotoes.ativaBarraDeZoom();verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns)g_fatordezoom=0;verticalSlider.setValue(35,true)}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone)}var iclone=$i("imgtemp");var corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=corpo.style.top;iclone.style.left=corpo.style.left;$i("img").style.display="none";iclone.style.display="block"}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){var iclone=$i("imgtemp");var corpo=$i("img");if(!corpo){return}var nw=i3GEO.parametros.w;var nh=i3GEO.parametros.h;var nt=0;var nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;var velhoh=parseInt(iclone.style.height);var velhow=parseInt(iclone.style.width);var nh=i3GEO.parametros.h/g_fatordezoom;var nw=i3GEO.parametros.w/g_fatordezoom;var t=parseInt(iclone.style.top);var l=parseInt(iclone.style.left);var nt=t+((velhoh-nh)*.5);var nl=l+((velhow-nw)*.5);var fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;var velhoh=parseInt(iclone.style.height);var velhow=parseInt(iclone.style.width);var nh=i3GEO.parametros.h*g_fatordezoom*-1;var nw=i3GEO.parametros.w*g_fatordezoom*-1;var t=parseInt(iclone.style.top);var l=parseInt(iclone.style.left);var nt=t-((nh-velhoh)*.5);var nl=l-((nw-velhow)*.5);var fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala)}if(iclone){iclone.style.width=nw;iclone.style.height=nh;if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}}}YAHOO.janelaBotoes.xp.panel.render();YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){var elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[0].style.display=="inline"){return}if(elementos.length>0){var mostra=elementos[0];var i=0;do{if(elementos[i].style){if(elementos[i].style.display=="inline"){break}if(elementos[i].style.display=="none"){var mostra=elementos[i]}}var i=i+1}while(i<elementos.length)mostra.style.display="inline";var i=elementos.length-1;var mostra=elementos[i];do{if(elementos[i].style){if(elementos[i].style.display=="inline"){var mostra=elementos[i];break}}var i=i-1}while(i>=0)mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){var tipo="inline";if($i(idconteudonovo+"_")){var elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display==tipo){return}if(elementos.length>0){var i=0;do{if(elementos[i].style){if((elementos[i].style.display=="block")||(elementos[i].style.display=="inline")||(elementos[i].style.display=="")){elementos[i].style.display="none";break}}var i=i+1}while(i<elementos.length)var i=elementos.length-1;var mostra=elementos[i];do{if(elementos[i].style){if(elementos[i].style.display==tipo){break}if(elementos[i].style.display=="none"){var mostra=elementos[i]}}var i=i-1}while(i>=0)mostra.style.display=tipo}}}}i3GEO.barraDeBotoes.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show()},reativa:function(indice){if(arguments.length==1)i3GEO.barraDeBotoes.BARRAS[indice].show();else{var n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i++){i3GEO.barraDeBotoes.BARRAS[i].show()}}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.barraDeBotoes={BARRAS:new Array(),AUTOALTURA:false,TRANSICAOSUAVE:true,TRANSPARENCIA:50,PERMITEFECHAR:true,PERMITEDESLOCAR:true,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,BOTAOPADRAO:"pan",BOTAOCLICADO:"",ativaIcone:function(icone){i3GEO.barraDeBotoes.BOTAOCLICADO=icone;var ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(ko>=0){do{var temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico"&&temp){var ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}while(ko--)}if($i(icone)){with($i(icone).style){borderColor='white';borderWidth="1px"}}},ativaBotoes:function(padrao){if(arguments.length==0){var padrao=i3GEO.barraDeBotoes.BOTAOPADRAO}i3GEO.barraDeBotoes.BOTAOCLICADO=padrao;var l=i3GEO.barraDeBotoes.LISTABOTOES;var b=l.length-1;if(b>=0){do{if($i(l[b].iddiv)){if(l[b].conteudo){eval('$i(l[b].iddiv).innerHTML = "'+l[b].conteudo+'"')}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.ajuda.mostraJanela("'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.ajuda.mostraJanela("");};')}if(l[b].funcaoonclick){$i(l[b].iddiv).onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}},ativaBarraDeZoom:function(){$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1;$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';i3GEO.navega.zoomin();g_fatordezoom=0};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1;$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';i3GEO.navega.zoomout();g_fatordezoom=0}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y){var wj="36px";var recuo="0px";var novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";novoel.style.border="1px solid gray";novoel.style.background="white";if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.TRANSPARENCIA/100}}else{if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=.85}}var temp="";if(barraZoom==true){if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}temp+='<div id="vertMaisZoom" ></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';temp+='<div id=vertMenosZoom ></div>';if(navn){temp+='</div>'}}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:-6px;" ></div></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){if($i("i3geo_rosa")){$i("i3geo_rosa").style.display="none"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=.85}}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.TRANSPARENCIA/100}}}document.body.appendChild(novoel);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";if(i3GEO.barraDeBotoes.AUTOALTURA){var elementos=$i(idconteudonovo+"_").getElementsByTagName("img");if(elementos[0].id=="sobeferramentas"){try{var elementos=$i(idconteudonovo+"_").getElementsByTagName("div");var alturadisponivel=i3GEO.parametros.h-4;var numerobotoes=parseInt(alturadisponivel/30);var nelementos=elementos.length;var i=0;do{elementos[i].style.display="none";var i=i+1}while(i<nelementos)var i=0;do{elementos[i].style.display="inline";var i=i+1}while(i<numerobotoes)}catch(e){}if(i==numerobotoes){if($i("sobeferramentas")){$i("sobeferramentas").style.display="none"}if($i("desceferramentas")){$i("desceferramentas").style.display="none"}}}}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.AUTOALTURA==false)YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false});else YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false});if((barraZoom==true)&&$i("img")){i3GEO.barraDeBotoes.ativaBarraDeZoom();verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns)g_fatordezoom=0;verticalSlider.setValue(35,true)}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone)}var iclone=$i("imgtemp");var corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=corpo.style.top;iclone.style.left=corpo.style.left;$i("img").style.display="none";iclone.style.display="block"}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){var iclone=$i("imgtemp");var corpo=$i("img");if(!corpo){return}var nw=i3GEO.parametros.w;var nh=i3GEO.parametros.h;var nt=0;var nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;var velhoh=parseInt(iclone.style.height);var velhow=parseInt(iclone.style.width);var nh=i3GEO.parametros.h/g_fatordezoom;var nw=i3GEO.parametros.w/g_fatordezoom;var t=parseInt(iclone.style.top);var l=parseInt(iclone.style.left);var nt=t+((velhoh-nh)*.5);var nl=l+((velhow-nw)*.5);var fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;var velhoh=parseInt(iclone.style.height);var velhow=parseInt(iclone.style.width);var nh=i3GEO.parametros.h*g_fatordezoom*-1;var nw=i3GEO.parametros.w*g_fatordezoom*-1;var t=parseInt(iclone.style.top);var l=parseInt(iclone.style.left);var nt=t-((nh-velhoh)*.5);var nl=l-((nw-velhow)*.5);var fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala)}if(iclone){iclone.style.width=nw;iclone.style.height=nh;if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}}}YAHOO.janelaBotoes.xp.panel.render();if(i3GEO.barraDeBotoes.AUTOALTURA==true){var y=y-i3GEO.interface.BARRABOTOESTOP+2;var x=x-3}YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){var elementos=$i(idconteudonovo+"_").getElementsByTagName("div");var nelementos=elementos.length;if(elementos[0].style.display=="inline"&&elementos[0].id==""){return}if(elementos[1].style.display=="inline"&&elementos[1].id==""){return}if(nelementos>0){var mostra=elementos[0];var i=0;do{if(elementos[i].style){if(elementos[i].style.display=="inline"&&elementos[i].id==""){break}if(elementos[i].style.display=="none"&&elementos[i].id==""){var mostra=elementos[i]}}var i=i+1}while(i<nelementos)mostra.style.display="inline";var i=nelementos-1;var mostra=elementos[i];do{if(elementos[i].style){if(elementos[i].style.display=="inline"){var mostra=elementos[i];break}}var i=i-1}while(i>=0)mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){var tipo="inline";if($i(idconteudonovo+"_")){var elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display==tipo){return}var nelementos=elementos.length;if(nelementos>0){var i=0;do{var e=elementos[i];if(e.style){if((e.style.display=="block")||(e.style.display=="inline")||(e.style.display=="")){if(e.id==""){e.style.display="none";break}}}var i=i+1}while(i<nelementos)var i=nelementos-1;var mostra=elementos[i];do{var e=elementos[i];if(e.style){if(e.style.display==tipo){break}if(e.style.display=="none"){var mostra=e}}var i=i-1}while(i>=0)mostra.style.display=tipo}}}}i3GEO.barraDeBotoes.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show()},reativa:function(indice){if(arguments.length==1)i3GEO.barraDeBotoes.BARRAS[indice].show();else{var n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i++){i3GEO.barraDeBotoes.BARRAS[i].show()}}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_gadgets_compacto.js
1 | -if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.gadgets={PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"mostraUTM"},"mostraCoordenadasGEO":{idhtml:"localizarxy"},"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida"},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0}},mostraCoordenadasUTM:function(id){if(arguments.length==0||id==""){var id=i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml=id}var temp=$i(id);if(!temp){return}atualizaCoordenadasUTM=function(){if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}var tempUtm=function(retorno){setTimeout("$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';",3400);var temp=$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";temp.innerHTML="UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" datum="+retorno.data.datum}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}},mostraCoordenadasGEO:function(id){try{if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("xm")){var ins="<table style='text-align:center'><tr>";ins+="<td>localiza X: </td>";ins+="<td>"+$inputText(id,"315","xg","grau","3","-00")+" </td>";ins+="<td>"+$inputText("","","xm","minuto","3","00")+" </td>";ins+="<td>"+$inputText("","","xs","segundo","5","00.00")+" </td>";ins+="<td>Y:"+$inputText("","","yg","grau","3","-00")+" </td>";ins+="<td>"+$inputText("","","ym","minuto","3","00")+" </td>";ins+="<td>"+$inputText("","","ys","segundo","5","00.00")+"</td>";var temp='var xxx = i3GEO.calculo.dms2dd($i("xg").value,$i("xm").value,$i("xs").value);';temp+='var yyy = i3GEO.calculo.dms2dd($i("yg").value,$i("ym").value,$i("ys").value);';temp+='i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,xxx,yyy);';ins+="<td><img class='tic' title='zoom' onclick='"+temp+"' src='"+i3GEO.util.$im("branco.gif")+"' id=procurarxy /></td>";ins+="</tr></table>";$i(id).innerHTML=ins;$i3geo_temp_xg=$i("xg");$i3geo_temp_xm=$i("xm");$i3geo_temp_xs=$i("xs");$i3geo_temp_yg=$i("yg");$i3geo_temp_ym=$i("ym");$i3geo_temp_ys=$i("ys");atualizaLocalizarxy=function(){try{var x=objposicaocursor.dmsx.split(" ");var y=objposicaocursor.dmsy.split(" ");$i3geo_temp_xg.value=x[0];$i3geo_temp_xm.value=x[1];$i3geo_temp_xs.value=x[2];$i3geo_temp_yg.value=y[0];$i3geo_temp_ym.value=y[1];$i3geo_temp_ys.value=y[2]}catch(m){}};if($i(i3GEO.interface.IDMAPA)){YAHOO.util.Event.addListener($i(i3GEO.interface.IDMAPA),"mousemove",atualizaLocalizarxy)}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},mostraInserirKml:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){var i=$inputText(id,"280","i3geo_urlkml","kml url","40","");var ins="<table><tr><td>Kml: "+i;var temp='i3GEO.mapa.insereKml(true);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length==1)e.value=escala;else e.value=parseInt(i3GEO.parametros.mapscale)};if(!$i("i3geo_escalanum")){var i=$inputText(id,"138","i3geo_escalanum",$trad("d10"),"19",parseInt(i3GEO.parametros.mapscale));var ins="<table><tr><td>1:"+i;var temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}},mostraEscalaGrafica:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}if($i(id)){atualizaEscalaGrafica=function(){var e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}var temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){var ins="<img class='menuarrow' src=\""+g_localimg+"/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />"$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value==""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")}var i=$inputText(id,"180","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));var ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i;ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='i3geo_buscaRapida()' /></td></tr></table>";$i(id).innerHTML=ins}},mostraHistoricoZoom:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom==""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0)i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao);else marcadorZoom=0}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom==""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual<i3GEO.gadgets.quadros.quadrosfilme.length){marcadorZoom=marcadorZoom+1 if(marcadorZoom<i3GEO.gadgets.quadros.quadrosfilme.length)i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else marcadorZoom=i3GEO.gadgets.quadros.quadrosfilme.length}}},visual:{inicia:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraVisual.idhtml}if($i(id)){if(i3GEO.parametros.listavisual!=""){var l=i3GEO.parametros.listavisual.split(",");var visuais="";var li=l.length-1;if(li>=0){do{visuais+="<img title='"+l[li]+"' style=cursor:pointer onclick='i3GEO.gadgets.visual.troca(\""+l[li]+"\")' src='"+i3GEO.configura.locaplic+"/imagens/visual/"+l[li]+".png' /> "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");var imgstemp=retorno.data.arquivos;var imgs=new Array();var i=imgstemp.length-1;if(i>=0){do{var temp=imgstemp[i].split(".");if((temp[1]=="png")||(temp[1]=="gif")||(temp[1]=="jpg")){imgs.push(imgstemp[i])}}while(i--)}var elementos=document.getElementsByTagName("img");var elt=elementos.length;var caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";var j=imgs.length-1;if(j>=0){do{for(var i=0;i<elt;i++){if((elementos[i].src.search("branco")>-1)&&((elementos[i].className!="")||(elementos[i].id!=""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+imgs[j]+"')"}}}while(j--)}var j=imgs.length-1;if(j>=0){do{var busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}var elementos=new Array("barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic");var i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){var nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:new Array(),quadroatual:0,inicia:function(qs,lugarquadros){if(arguments.length==1){var lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q="<table class=tablefilme ><tr><td><div class='menuarrow' title='opções' onclick='i3GEO.gadgets.quadros.opcoes(this)' style='cursor:pointer'></div></td>";for(var i=0;i<qs;i++){q+="<td><img class='quadro' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" id='quadro"+i+"' ";q+="onmouseover='i3GEO.gadgets.quadros.trocaMapa(this.id);i3GEO.ajuda.mostraJanela(\"Clique para aplicar a extensão geográfica do quadro ao mapa\")' ";q+="onclick='i3GEO.gadgets.quadros.zoom(this.id)' /></td>";i3GEO.gadgets.quadros.quadrosfilme[i]=new Array()}q+="</tr></table>";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){var temp=$i("imgClone");var p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)==(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){var e=""}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice=quadro.replace("quadro","");var i=$i("img");var c=$i("imgClone");if(i){if(!c){var iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;var c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){var e=""}}},opcoes:function(obj){if(i3GEO.parametros.utilizacgi=="sim"){i3GEO.parametros.utilizacgi="nao";var volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{i3GEO.janela.cria("150px","150px",i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.htm","center","","Quadros <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=6&idajuda=54' > </a>")}},anima:function(Qanima,t){if(arguments.length==0){Qanima=0;var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;var t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){if(i3GEO.parametros.utilizacgi=="sim"){i3GEO.parametros.utilizacgi="nao";var volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{var wi=window.open("");var mensagem="<br><b>Não existem imagens guardadas.";wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o botão da direita do mouse sobre a imagem para fazer o download<br>");var i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Imagem: "+i+"<br>");wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"<br>");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].imagem+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].referencia+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].legenda+"' />")}i--}while(i>=0)}wi.document.write("<br>Fim</body></html>")}}},mostraMenuSuspenso:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=id}var objid=$i(id);if(objid){objid.className="yuimenubar";if($i("contemMenu")){$i("contemMenu").className="yui-navset"}if(!i3GEO.configura.oMenuData.menu){var ins="";ins+='<div class="bd" style="display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >';ins+='<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';var sobe="";if(navn){var sobe="line-height:0px;"}ins+='<li class="yuimenubaritem" style="padding-bottom:5px" ><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuajuda" > '+$trad("s1")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuanalise" > '+$trad("s2")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menujanelas" > '+$trad("s3")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuarquivos" > '+$trad("s4")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuinterface" > '+$trad("d27")+'</a></li>';ins+='</ul>';ins+='</div>';objid.innerHTML=ins}else{var ins="";var alinhamento="";if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){var alinhamento="left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"}ins+='<div class="bd" style="'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >';ins+='<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';var n=i3GEO.configura.oMenuData.menu.length;for(i=0;i<n;i++){if(i3GEO.parametros.w<550){i3GEO.configura.oMenuData.menu[i].id="";var estilo="padding-bottom:3px;top:0px;border: 0px solid white;"}else var estilo="padding-bottom:3px;top:0px;border: 0px solid white;";var t="";if(i3GEO.configura.oMenuData.menu[i].target){var t="target="+i3GEO.configura.oMenuData.menu[i].target}ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+i3GEO.configura.oMenuData.menu[i].id+'" > '+i3GEO.configura.oMenuData.menu[i].nome+'</a></li>'}ins+='</ul>';ins+='</div>';objid.innerHTML=ins}var onMenuBarBeforeRender=function(p_sType,p_sArgs){if(i3GEO.parametros.w>=500){var conta=0}else{var conta=0}for(var nomeMenu in i3GEO.configura.oMenuData.submenus){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:i3GEO.configura.oMenuData.submenus[nomeMenu]});var conta=conta+1}}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();var temp=objid.style;temp.backgroundPosition="0px -5px";temp.border="1px solid white"}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.gadgets={PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"},"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida"},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0}},mostraCoordenadasUTM:function(id){if(arguments.length==0||id==""){var id=i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml=id}var temp=$i(id);if(!temp){return}atualizaCoordenadasUTM=function(){if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}var tempUtm=function(retorno){var funcao="";funcao+="$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';";funcao+="if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml)";funcao+="{$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.gadgets.mostraCoordenadasGEO();}";setTimeout(funcao,3400);var temp=$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";temp.innerHTML="UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" "+retorno.data.datum}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}},mostraCoordenadasGEO:function(id){try{if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("xm")){var ins="<table style='text-align:center'><tr>";ins+="<td>localiza X: </td>";ins+="<td>"+$inputText(id,"315","xg","grau","3","-00")+" </td>";ins+="<td>"+$inputText("","","xm","minuto","3","00")+" </td>";ins+="<td>"+$inputText("","","xs","segundo","5","00.00")+" </td>";ins+="<td>Y:"+$inputText("","","yg","grau","3","-00")+" </td>";ins+="<td>"+$inputText("","","ym","minuto","3","00")+" </td>";ins+="<td>"+$inputText("","","ys","segundo","5","00.00")+"</td>";var temp='var xxx = i3GEO.calculo.dms2dd($i("xg").value,$i("xm").value,$i("xs").value);';temp+='var yyy = i3GEO.calculo.dms2dd($i("yg").value,$i("ym").value,$i("ys").value);';temp+='i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,xxx,yyy);';ins+="<td><img class='tic' title='zoom' onclick='"+temp+"' src='"+i3GEO.util.$im("branco.gif")+"' id=procurarxy /></td>";ins+="</tr></table>";$i(id).innerHTML=ins;$i3geo_temp_xg=$i("xg");$i3geo_temp_xm=$i("xm");$i3geo_temp_xs=$i("xs");$i3geo_temp_yg=$i("yg");$i3geo_temp_ym=$i("ym");$i3geo_temp_ys=$i("ys");atualizaLocalizarxy=function(){try{var x=objposicaocursor.dmsx.split(" ");var y=objposicaocursor.dmsy.split(" ");$i3geo_temp_xg.value=x[0];$i3geo_temp_xm.value=x[1];$i3geo_temp_xs.value=x[2];$i3geo_temp_yg.value=y[0];$i3geo_temp_ym.value=y[1];$i3geo_temp_ys.value=y[2]}catch(m){}};if($i(i3GEO.interface.IDMAPA)){YAHOO.util.Event.addListener($i(i3GEO.interface.IDMAPA),"mousemove",atualizaLocalizarxy)}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},mostraInserirKml:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){var i=$inputText(id,"280","i3geo_urlkml","kml url","40","");var ins="<table><tr><td>Kml: "+i;var temp='i3GEO.mapa.insereKml(true);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length==1)e.value=escala;else e.value=parseInt(i3GEO.parametros.mapscale)};if(!$i("i3geo_escalanum")){var i=$inputText(id,"138","i3geo_escalanum",$trad("d10"),"19",parseInt(i3GEO.parametros.mapscale));var ins="<table><tr><td>1:"+i;var temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}},mostraEscalaGrafica:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}if($i(id)){atualizaEscalaGrafica=function(){var e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}var temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){var ins="<img class='menuarrow' src=\""+g_localimg+"/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />"$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value==""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")}var i=$inputText(id,"180","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));var ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i;ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='i3geo_buscaRapida()' /></td></tr></table>";$i(id).innerHTML=ins}},mostraHistoricoZoom:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom==""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0)i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao);else marcadorZoom=0}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom==""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual<i3GEO.gadgets.quadros.quadrosfilme.length){marcadorZoom=marcadorZoom+1 if(marcadorZoom<i3GEO.gadgets.quadros.quadrosfilme.length)i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else marcadorZoom=i3GEO.gadgets.quadros.quadrosfilme.length}}},visual:{inicia:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraVisual.idhtml}if($i(id)){if(i3GEO.parametros.listavisual!=""){var l=i3GEO.parametros.listavisual.split(",");var visuais="";var li=l.length-1;if(li>=0){do{visuais+="<img title='"+l[li]+"' style=cursor:pointer onclick='i3GEO.gadgets.visual.troca(\""+l[li]+"\")' src='"+i3GEO.configura.locaplic+"/imagens/visual/"+l[li]+".png' /> "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");var imgstemp=retorno.data.arquivos;var imgs=new Array();var i=imgstemp.length-1;if(i>=0){do{var temp=imgstemp[i].split(".");if((temp[1]=="png")||(temp[1]=="gif")||(temp[1]=="jpg")){imgs.push(imgstemp[i])}}while(i--)}var elementos=document.getElementsByTagName("img");var elt=elementos.length;var caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";var j=imgs.length-1;if(j>=0){do{for(var i=0;i<elt;i++){if((elementos[i].src.search("branco")>-1)&&((elementos[i].className!="")||(elementos[i].id!=""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+imgs[j]+"')"}}}while(j--)}var j=imgs.length-1;if(j>=0){do{var busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}var elementos=new Array("barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic");var i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){var nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:new Array(),quadroatual:0,inicia:function(qs,lugarquadros){if(arguments.length==1){var lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q="<table class=tablefilme ><tr><td><div class='menuarrow' title='opções' onclick='i3GEO.gadgets.quadros.opcoes(this)' style='cursor:pointer'></div></td>";for(var i=0;i<qs;i++){q+="<td><img class='quadro' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" id='quadro"+i+"' ";q+="onmouseover='i3GEO.gadgets.quadros.trocaMapa(this.id);i3GEO.ajuda.mostraJanela(\"Clique para aplicar a extensão geográfica do quadro ao mapa\")' ";q+="onclick='i3GEO.gadgets.quadros.zoom(this.id)' /></td>";i3GEO.gadgets.quadros.quadrosfilme[i]=new Array()}q+="</tr></table>";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){var temp=$i("imgClone");var p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)==(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){var e=""}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice=quadro.replace("quadro","");var i=$i("img");var c=$i("imgClone");if(i){if(!c){var iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;var c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){var e=""}}},opcoes:function(obj){if(i3GEO.parametros.utilizacgi=="sim"){i3GEO.parametros.utilizacgi="nao";var volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{i3GEO.janela.cria("150px","150px",i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.htm","center","","Quadros <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=6&idajuda=54' > </a>")}},anima:function(Qanima,t){if(arguments.length==0){Qanima=0;var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;var t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){if(i3GEO.parametros.utilizacgi=="sim"){i3GEO.parametros.utilizacgi="nao";var volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{var wi=window.open("");var mensagem="<br><b>Não existem imagens guardadas.";wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o botão da direita do mouse sobre a imagem para fazer o download<br>");var i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Imagem: "+i+"<br>");wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"<br>");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].imagem+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].referencia+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].legenda+"' />")}i--}while(i>=0)}wi.document.write("<br>Fim</body></html>")}}},mostraMenuSuspenso:function(id){if(arguments.length==0){var id=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=id}var objid=$i(id);if(objid){objid.className="yuimenubar";if($i("contemMenu")){$i("contemMenu").className="yui-navset"}if(!i3GEO.configura.oMenuData.menu){var ins="";ins+='<div class="bd" style="display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >';ins+='<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';var sobe="";if(navn){var sobe="line-height:0px;"}ins+='<li class="yuimenubaritem" style="padding-bottom:5px" ><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuajuda" > '+$trad("s1")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuanalise" > '+$trad("s2")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menujanelas" > '+$trad("s3")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuarquivos" > '+$trad("s4")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuinterface" > '+$trad("d27")+'</a></li>';ins+='</ul>';ins+='</div>';objid.innerHTML=ins}else{var ins="";var alinhamento="";if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){var alinhamento="left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"}ins+='<div class="bd" style="'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >';ins+='<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';var n=i3GEO.configura.oMenuData.menu.length;for(i=0;i<n;i++){if(i3GEO.parametros.w<550){i3GEO.configura.oMenuData.menu[i].id="";var estilo="padding-bottom:3px;top:0px;border: 0px solid white;"}else var estilo="padding-bottom:3px;top:0px;border: 0px solid white;";var t="";if(i3GEO.configura.oMenuData.menu[i].target){var t="target="+i3GEO.configura.oMenuData.menu[i].target}ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+i3GEO.configura.oMenuData.menu[i].id+'" > '+i3GEO.configura.oMenuData.menu[i].nome+'</a></li>'}ins+='</ul>';ins+='</div>';objid.innerHTML=ins}var onMenuBarBeforeRender=function(p_sType,p_sArgs){if(i3GEO.parametros.w>=500){var conta=0}else{var conta=0}for(var nomeMenu in i3GEO.configura.oMenuData.submenus){if(i3GEO.configura.oMenuData.submenus[nomeMenu]!="")i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:i3GEO.configura.oMenuData.submenus[nomeMenu]});var conta=conta+1}}i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();var temp=objid.style;temp.backgroundPosition="0px -5px";temp.border="1px solid white"}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_i3geo_compacto.js
1 | -i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:""},temaAtivo:"",cria:function(){if(window.location.href.split("?")[1]){i3GEO.configura.sid=window.location.href.split("?")[1];g_sid=i3GEO.configura.sid;if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}g_panM="nao";try{i3GEO.configura.locaplic=g_locaplic}catch(e){g_locaplic=i3GEO.configura.locaplic};try{i3GEO.configura.diminuixM=g_diminuixM}catch(e){}try{i3GEO.configura.diminuixN=g_diminuixN}catch(e){}try{i3GEO.configura.diminuiyM=g_diminuiyM}catch(e){}try{i3GEO.configura.diminuiyN=g_diminuiyN}catch(e){}var diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;var diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;var menos=0;if($i("contemFerramentas")){menos=menos+parseInt($i("contemFerramentas").style.width)}if($i("ferramentas")){menos=menos+parseInt($i("ferramentas").style.width)}var novow=parseInt(screen.availWidth)-diminuix;var novoh=parseInt(screen.availHeight)-diminuiy;try{if(document.body.style.width<400){var novow=parseInt(screen.availWidth)-diminuix;var novoh=parseInt(screen.availHeight)-diminuiy;window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}catch(e){var e=""}document.body.style.width=novow-diminuix;document.body.style.height=novoh;var w=novow-menos-diminuix;var h=novoh-diminuiy;if(document.getElementById("corpoMapa")){if(document.getElementById("corpoMapa").style.width){var w=parseInt(document.getElementById("corpoMapa").style.width);var h=parseInt(document.getElementById("corpoMapa").style.width)}if(document.getElementById("corpoMapa").style.height){var h=parseInt(document.getElementById("corpoMapa").style.height)}}var temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){var w=parseInt(temp.style.width)}if(temp.style.height){var h=parseInt(temp.style.height)}}}if($i("contemImg")){$i("contemImg").style.height=h+"px";$i("contemImg").style.width=w+"px"}i3GEO.interface.cria(w,h);i3GEO.parametros={mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:w,h:h,locsistemas:"",locidentifica:"",r:"",locmapas:"",extentref:"",kmlurl:""};if(w<550){var i=$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml);if(i){i.style.display="none"}}},inicia:function(){if(typeof("i3GEOmantemCompatibilidade")=='function')i3GEOmantemCompatibilidade();var montaMapa=function(retorno){if(retorno==""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){i3GEO.janela.fechaAguarde("montaMapa");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){var tempo="";var titulo="";eval(retorno.data.variaveis);try{if(titulo!=""){top.document.title=titulo}}catch(e){var e=""}i3GEO.ajuda.mostraJanela("Tempo de desenho em segundos: "+tempo,"");i3GEO.parametros.mapexten=mapexten;i3GEO.parametros.mapscale=parseInt(mapscale);i3GEO.parametros.mapres=mapres;i3GEO.parametros.pixelsize=g_celula;i3GEO.parametros.mapfile=mapfile;i3GEO.parametros.cgi=cgi;i3GEO.parametros.extentTotal=mapexten;i3GEO.parametros.mapimagem=mapimagem;i3GEO.parametros.geoip=geoip;i3GEO.parametros.listavisual=listavisual;i3GEO.parametros.utilizacgi=utilizacgi;i3GEO.parametros.versaoms=versaoms;i3GEO.parametros.mensagens=mensagens;i3GEO.parametros.locsistemas=locsistemas;i3GEO.parametros.locidentifica=locidentifica;i3GEO.parametros.r=r;i3GEO.parametros.locmapas=locmapas;i3GEO.parametros.extentref=extentref;i3GEO.parametros.versaoms=versaoms;i3GEO.parametros.versaomscompleta=versaomscompleta;i3GEO.parametros.kmlurl=kmlurl;i3GEO.gadgets.quadros.inicia(10);i3GEO.gadgets.quadros.grava("extensao",mapexten);i3GEO.arvoreDeCamadas.cria("",retorno.data.temas,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.gadgets.mostraBuscaRapida();i3GEO.guias.cria();if($i("arvoreAdicionaTema"))i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"arvoreAdicionaTema");if($i("mst")){$i("mst").style.display="block"}i3GEO.atualiza(retorno);var temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}if(i3GEO.configura.entorno=="sim"){i3GEO.configura.entorno=="nao";i3GEO.navega.entorno.ativaDesativa()}i3GEO.navega.autoRedesenho.ativa();if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3GEO.parametros.mapscale}if((i3GEO.parametros.geoip=="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if(document.getElementById("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}var abreJM="sim";if(i3GEO.util.pegaCookie("g_janelaMen")){var abreJM=i3GEO.util.pegaCookie("g_janelaMen");if(abreJM=="sim")i3GEO.configura.iniciaJanelaMensagens=true;else i3GEO.configura.iniciaJanelaMensagens=false}if(i3GEO.configura.iniciaJanelaMensagens==true){i3GEO.ajuda.abreJanela()}i3GEO.janela.fechaAguarde("montaMapa");if(i3GEO.configura.liberaGuias=="sim"){i3GEO.guias.libera()}}if($i("mst")){$i("mst").style.visibility="visible"}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if($i("mst"))$i("mst").style.visibility="hidden";if(i3GEO.configura.sid==""){var mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia()};i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{i3GEO.janela.abreAguarde("montaMapa",$trad("o5"));i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}eval(i3GEO.finaliza)},finaliza:"",atualiza:function(retorno){try{if(retorno.data=="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}}catch(e){}var erro=function(){var legimagem="";i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)}try{eval(retorno.data.variaveis)}catch(e){erro.call();return}if(arguments.length==0||retorno==""||retorno.data.variaveis==undefined){erro.call();return}else{if(arguments.length==0){return}i3GEO.mapa.corpo.verifica(retorno);var tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale="";mapexten="";eval(retorno.data.variaveis);i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!=mapscale)i3GEO.arvoreDeCamadas.atualizaFarol(mapscale);i3GEO.parametros.mapexten=mapexten;i3GEO.parametros.mapscale=mapscale;i3GEO.parametros.mapres=mapres;i3GEO.parametros.pixelsize=g_celula;i3GEO.parametros.mapimagem=mapimagem;i3GEO.interface.redesenha();g_operacao="";i3GEO.parametros.mapexten=mapexten;if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.eventos.navegaMapa();if(i3GEO.configura.entorno=="sim"){i3GEO.navega.entorno.geraURL();i3GEO.navega.entorno.ajustaPosicao()}i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+tempo,"")}}}; | |
2 | 1 | \ No newline at end of file |
2 | +i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:""},temaAtivo:"",cria:function(){if(window.location.href.split("?")[1]){i3GEO.configura.sid=window.location.href.split("?")[1];g_sid=i3GEO.configura.sid;if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}g_panM="nao";try{i3GEO.configura.locaplic=g_locaplic}catch(e){g_locaplic=i3GEO.configura.locaplic};try{i3GEO.configura.diminuixM=g_diminuixM}catch(e){}try{i3GEO.configura.diminuixN=g_diminuixN}catch(e){}try{i3GEO.configura.diminuiyM=g_diminuiyM}catch(e){}try{i3GEO.configura.diminuiyN=g_diminuiyN}catch(e){}var diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;var diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;var menos=0;if($i("contemFerramentas")){menos=menos+parseInt($i("contemFerramentas").style.width)}if($i("ferramentas")){menos=menos+parseInt($i("ferramentas").style.width)}var novow=parseInt(screen.availWidth)-diminuix;var novoh=parseInt(screen.availHeight)-diminuiy;window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0);try{if(novow<800){var novow=800;var novoh=600}}catch(e){var e=""}document.body.style.width=novow-diminuix;document.body.style.height=novoh;var w=novow-menos-diminuix;var h=novoh-diminuiy;var temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){var w=parseInt(temp.style.width);var h=parseInt(temp.style.width)}if(temp.style.height){var h=parseInt(temp.style.height)}}}if($i("contemImg")){$i("contemImg").style.height=h+"px";$i("contemImg").style.width=w+"px"}i3GEO.interface.cria(w,h);i3GEO.parametros={mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:w,h:h,locsistemas:"",locidentifica:"",r:"",locmapas:"",extentref:"",kmlurl:""};if(w<550){var i=$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml);if(i){i.style.display="none"}}},inicia:function(){if(typeof("i3GEOmantemCompatibilidade")=='function')i3GEOmantemCompatibilidade();var montaMapa=function(retorno){if(retorno==""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){i3GEO.janela.fechaAguarde("montaMapa");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){var tempo="";var titulo="";eval(retorno.data.variaveis);try{if(titulo!=""){top.document.title=titulo}}catch(e){var e=""}i3GEO.ajuda.mostraJanela("Tempo de desenho em segundos: "+tempo,"");i3GEO.parametros.mapexten=mapexten;i3GEO.parametros.mapscale=parseInt(mapscale);i3GEO.parametros.mapres=mapres;i3GEO.parametros.pixelsize=g_celula;i3GEO.parametros.mapfile=mapfile;i3GEO.parametros.cgi=cgi;i3GEO.parametros.extentTotal=mapexten;i3GEO.parametros.mapimagem=mapimagem;i3GEO.parametros.geoip=geoip;i3GEO.parametros.listavisual=listavisual;i3GEO.parametros.utilizacgi=utilizacgi;i3GEO.parametros.versaoms=versaoms;i3GEO.parametros.mensagens=mensagens;i3GEO.parametros.locsistemas=locsistemas;i3GEO.parametros.locidentifica=locidentifica;i3GEO.parametros.r=r;i3GEO.parametros.locmapas=locmapas;i3GEO.parametros.extentref=extentref;i3GEO.parametros.versaoms=versaoms;i3GEO.parametros.versaomscompleta=versaomscompleta;i3GEO.parametros.kmlurl=kmlurl;i3GEO.gadgets.quadros.inicia(10);i3GEO.gadgets.quadros.grava("extensao",mapexten);i3GEO.arvoreDeCamadas.cria("",retorno.data.temas,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.gadgets.mostraBuscaRapida();i3GEO.guias.cria();if($i("arvoreAdicionaTema"))i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"arvoreAdicionaTema");if($i("mst")){$i("mst").style.display="block"}i3GEO.atualiza(retorno);var temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}if(i3GEO.configura.entorno=="sim"){i3GEO.configura.entorno=="nao";i3GEO.navega.entorno.ativaDesativa()}i3GEO.navega.autoRedesenho.ativa();if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3GEO.parametros.mapscale}if((i3GEO.parametros.geoip=="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if(document.getElementById("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}var abreJM="sim";if(i3GEO.util.pegaCookie("g_janelaMen")){var abreJM=i3GEO.util.pegaCookie("g_janelaMen");if(abreJM=="sim")i3GEO.configura.iniciaJanelaMensagens=true;else i3GEO.configura.iniciaJanelaMensagens=false}if(i3GEO.configura.iniciaJanelaMensagens==true){i3GEO.ajuda.abreJanela()}i3GEO.janela.fechaAguarde("montaMapa");if(i3GEO.configura.liberaGuias=="sim"){i3GEO.guias.libera()}}if($i("mst")){$i("mst").style.visibility="visible"}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if($i("mst"))$i("mst").style.visibility="hidden";if(i3GEO.configura.sid==""){var mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia()};i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{i3GEO.janela.abreAguarde("montaMapa",$trad("o5"));i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}eval(i3GEO.finaliza)},finaliza:"",atualiza:function(retorno){if(arguments.length==0){i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);return}try{if(retorno.data=="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}}catch(e){}var erro=function(){var legimagem="";var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)}else{i3GEO.janela.fechaAguarde()}}try{eval(retorno.data.variaveis)}catch(e){erro.call();return}if(arguments.length==0||retorno==""||retorno.data.variaveis==undefined){erro.call();return}else{if(arguments.length==0){return}i3GEO.mapa.corpo.verifica(retorno);var tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale="";mapexten="";eval(retorno.data.variaveis);i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!=mapscale)i3GEO.arvoreDeCamadas.atualizaFarol(mapscale);i3GEO.parametros.mapexten=mapexten;i3GEO.parametros.mapscale=mapscale;i3GEO.parametros.mapres=mapres;i3GEO.parametros.pixelsize=g_celula;i3GEO.parametros.mapimagem=mapimagem;i3GEO.interface.redesenha();g_operacao="";i3GEO.parametros.mapexten=mapexten;if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.eventos.navegaMapa();if(i3GEO.configura.entorno=="sim"){i3GEO.navega.entorno.geraURL();i3GEO.navega.entorno.ajustaPosicao()}i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+tempo,"")}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_mapa_compacto.js
1 | -if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.mapa={GEOXML:new Array(),ajustaPosicao:function(elemento){if(arguments.length==0){return}try{imagemxi=0;imagemyi=0;imagemxref=0;imagemyref=0;var dc=$i("i3geo");if(!dc){return}if(dc.style.left){imagemxi+=parseInt(dc.style.left)}if(dc.style.top){imagemyi+=parseInt(dc.style.top)}var dc=$i(elemento);while((dc.offsetParent)&&(dc.offsetParent.id!="i3geo")){dc=dc.offsetParent;imagemxi=imagemxi+dc.offsetLeft;imagemyi=imagemyi+dc.offsetTop}var c=$i(i3GEO.interface.IDCORPO);if(c){c.style.position="absolute";$left(i3GEO.interface.IDCORPO,imagemxi);$top(i3GEO.interface.IDCORPO,imagemyi);if($i("i3geo").style.left){$left(i3GEO.interface.IDCORPO,imagemxi+parseInt($i("i3geo").style.left))}if($i("i3geo").style.top){$top(i3GEO.interface.IDCORPO,imagemyi+parseInt($i("i3geo").style.top))}}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao"+e)}},ativaLogo:function(){i3GEO.php.ativalogo(i3GEO.atualiza)},insereToponimo:function(){if(g_tipoacao=="textofid"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;texto=doc.getElementById("texto").value;var f=doc.getElementById("fonte").value;var t=doc.getElementById("tamanho").value;var a=doc.getElementById("angulo").value;var cf=doc.getElementById("fundoc").value;if(cf==""){cf="off"}var cs=doc.getElementById("sombra").value;if(cs==""){cs="off"}var xs=doc.getElementById("sombrax").value;var ys=doc.getElementById("sombray").value;var c=doc.getElementById("frente").value;var m=doc.getElementById("mascara").value;if(m==""){m="off"}var fcs=doc.getElementById("frentes").value;if(fcs==""){fcs="off"}var fxs=doc.getElementById("frentex").value;var fys=doc.getElementById("frentey").value;var forca=doc.getElementById("force").value;var md=doc.getElementById("mindistance").value;var mf=doc.getElementById("minfeaturesize").value;var ox=doc.getElementById("offsetx").value;var oy=doc.getElementById("offsety").value;var pl=doc.getElementById("partials").value;var pos=doc.getElementById("position").value;var digi=function(retorno){if(texto==""){i3GEO.janela.fechaAguarde("i3GEO.atualiza");texto=retorno.data}if(texto!=" "){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.insereAnnotation(i3GEO.atualiza,g_nomepin+"topo",objposicaocursor.ddx+" "+objposicaocursor.ddy,texto,pos,pl,ox,oy,mf,md,forca,fcs,fxs,fys,m,c,ys,xs,cs,cf,a,t,f)}};if(doc.getElementById("tipoInsere").value=="digitando"){digi.call()}else{texto="";if((doc.getElementById("temasLigados"))&&(doc.getElementById("itemsel"))){var tema=doc.getElementById("temasLigados").value;var item=doc.getElementById("itemsel").value;i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.identificaunico(digi,objposicaocursor.ddx+","+objposicaocursor.ddy,tema,item)}}}else{i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.insereToponimo()")}},insereKml:function(pan,url){if(arguments.length==1){var i=$i("i3geo_urlkml");if(i){var url=i.value}else{var url=""}}if(url==""){return}var ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;i3GEO.mapa.GEOXML.push(ngeoxml);var zoom=function(){if(pan){eval("var ll = "+ngeoxml+".getDefaultCenter()");eval(ngeoxml+".gotoDefaultViewport(i3GeoMap)")}};eval(ngeoxml+" = new GGeoXml(url,zoom)");eval("i3GeoMap.addOverlay("+ngeoxml+")");i3GEO.mapa.criaNoArvoreGoogle(ngeoxml,ngeoxml)},criaNoArvoreGoogle:function(url,nomeOverlay){var root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();var node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idkml","raiz");if(!node){var titulo="<table><tr><td><b>Google Maps</b></td></tr></table>";var d={html:titulo,idkml:"raiz"};var node=new YAHOO.widget.HTMLNode(d,root,true,true)}html="<input onclick='i3GEO.mapa.ativaDesativaOverlayGoogle(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+nomeOverlay+"' checked />";html+=" <span style='cursor:move'>"+url+"</span>";var d={html:html};var nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.isleaf=true;i3GEO.arvoreDeCamadas.ARVORE.draw();i3GEO.arvoreDeCamadas.ARVORE.collapseAll();node.expand()},ativaDesativaOverlayGoogle:function(obj){if(!obj.checked){eval("i3GeoMap.removeOverlay("+obj.value+")")}else eval("i3GeoMap.addOverlay("+obj.value+")")},inserePonto:function(){if(g_tipoacao=="inserexy"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(doc.getElementById("resultado")){var ins=doc.getElementById("resultado").innerHTML;ins=ins+"<div style='font-size:12px' >"+objposicaocursor.ddx+" "+objposicaocursor.ddy+"</div><br>";doc.getElementById("resultado").innerHTML=ins}var item="";var valoritem="";if((doc.getElementById("valorItem"))&&(doc.getElementById("itemtema"))){var item=doc.getElementById("itemtema").value;var valoritem=doc.getElementById("valorItem").value}if(g_nomepin==""){alert("Nenhum tema definido para editar")}else{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.insereSHP(i3GEO.atualiza,g_nomepin,item,valoritem,objposicaocursor.ddx+" "+objposicaocursor.ddy)}}},insereGrafico:function(){if(g_tipoacao=="inseregrafico"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;var tema=doc.getElementById("temasLigados").value;var width=doc.getElementById("w").value;var inclinacao=doc.getElementById("inclinacao").value;var shadow_height=doc.getElementById("sombra").value;if(tema==""){alert("Nenhum tema definido para pegar os dados")}else{var listadeitens=new Array();var g=doc.getElementById("listai");var iguias=g.getElementsByTagName("input");var i=iguias.length-1;if(i>=0){do{if(iguias[i].checked==true){var it=iguias[i].id;var c=doc.getElementById("cor"+it).value;listadeitens.push(it+","+c)}}while(i--)}var itens=listadeitens.join("*");if(itens==""){alert("Nenhum item foi escolhido")}else{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.insereSHPgrafico(i3GEO.atualiza,tema,objposicaocursor.ddx,objposicaocursor.ddy,itens,shadow_height,width,inclinacao)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(i3GEO.mapa.recupera.TENTATIVA==0){i3GEO.mapa.recupera.TENTATIVA++;i3GEO.mapa.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{ID:"",cria:function(id){if(arguments.length==0){var id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var temp=function(retorno){if(i3GEO.mapa.legendaHTML.ID!=""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!="erro")&&(retorno.data!=undefined)){var s=i3GEO.configura.locaplic+"/imagens/solta.gif";$i(i3GEO.mapa.legendaHTML.ID).innerHTML="<img onclick='i3GEO.mapa.legendaHTML.libera()' id=soltaLeg src="+s+" title='clique para liberar'/><br><div id='corpoLegi' >"+retorno.data.legenda+"</div>"}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;var elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i++){elementos[i].style.display="none"}}};i3GEO.mapa.legendaHTML.obtem(temp)},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked)i3GEO.php.ligatemas(temp,inputbox.value,"");else i3GEO.php.ligatemas(temp,"",inputbox.value)},libera:function(){var temp=function(retorno){if(!$i("moveLegi")){var novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";var temp='<div class="hd">Legenda</div>';temp+='<div id="wlegenda" style="text-align:left;background-color:white" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.Panel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;var temp=$i("wlegenda").getElementsByTagName("input");var n=temp.length;for(i=0;i<n;i++){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show()}i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{autoredesenha:function(){i3GEO.janela.cria("300px","110px",i3GEO.configura.locaplic+"/ferramentas/opcoes_autoredesenha/index.htm","","","Temporizador <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=9' > </a>")},salvaMapa:function(){if(i3GEO.parametros==""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.janela.cria("300px","180px",i3GEO.configura.locaplic+"/ferramentas/salvamapa/index.htm","","","Salva mapa <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=10' > </a>")},carregaMapa:function(){i3GEO.janela.cria("300px","150px",i3GEO.configura.locaplic+"/ferramentas/carregamapa/index.htm?urlatual="+window.location,"","","Carrega mapa <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=11' > </a>")},convertews:function(){if(i3GEO.parametros.mapfile==""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.janela.cria("440px","280px",i3GEO.configura.locaplic+"/ferramentas/convertews/index.htm","","","WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=12' > </a>")},convertekml:function(){if(i3GEO.parametros.mapfile==""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.janela.cria("440px","280px",i3GEO.configura.locaplic+"/ferramentas/convertemapakml/index.htm","","","Kml <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=13' > </a>")},queryMap:function(){i3GEO.janela.cria("210px","80px",i3GEO.configura.locaplic+"/ferramentas/opcoes_querymap/index.htm","","","Cor da seleção <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=5' > </a>")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.janela.cria("150px","170px",i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/index.htm","","","Tamanho <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=4' > </a>")},tipoimagem:function(){i3GEO.janela.cria("300px","260px",i3GEO.configura.locaplic+"/ferramentas/tipoimagem/index.htm","","","Tipo de imagem <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=1' > </a>")},corFundo:function(){i3GEO.janela.cria("210px","80px",i3GEO.configura.locaplic+"/ferramentas/opcoes_fundo/index.htm","","","Cor do fundo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=6' > </a>")},opcoesEscala:function(){i3GEO.janela.cria("250px","300px",i3GEO.configura.locaplic+"/ferramentas/opcoes_escala/index.htm","center","center","Escala <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=3' > </a>")},opcoesLegenda:function(){i3GEO.janela.cria("320px","300px",i3GEO.configura.locaplic+"/ferramentas/opcoes_legenda/index.htm","","","Legenda <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=2' > </a>")},gradeCoord:function(){i3GEO.janela.cria("350px","330px",i3GEO.configura.locaplic+"/ferramentas/gradecoord/index.htm","","","Grade de coordenadas <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=7' > </a>")},cliqueTexto:function(){if(g_tipoacao!="textofid"){var temp=Math.random()+"b";temp=temp.split(".");g_nomepin="pin"+temp[1];g_tipoacao="textofid";var janela=i3GEO.janela.cria("360px","250px",i3GEO.configura.locaplic+"/ferramentas/inseretxt/index.htm","","","Texto");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.mapa.insereToponimo()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.mapa.insereToponimo()")}var temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.insereToponimo()");i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)}},cliquePonto:function(){if(g_tipoacao!="inserexy"){g_tipoacao="inserexy";var temp=Math.random()+"a";temp=temp.split(".");g_nomepin="pin"+temp[1];var janela=i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+'/ferramentas/inserexy2/index.htm',"","","Insere");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.mapa.inserePonto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.mapa.inserePonto()")}var temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.inserePonto()");i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)}},cliqueGrafico:function(){if(g_tipoacao!="inseregrafico"){g_tipoacao="inseregrafico";var temp=Math.random()+"a";temp=temp.split(".");g_nomepin="pin"+temp[1];var janela=i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+'/ferramentas/inseregrafico/index.htm',"","","Insere");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.mapa.insereGrafico()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.mapa.insereGrafico()")}var temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.insereGrafico()");i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)}}},corpo:{verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){var retorno=retorno.data}if(retorno.variaveis){var retorno=retorno.variaveis}if((retorno=="erro")||(retorno==undefined)){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.interface.ATUAL=="openlayers"){i3GEO.janela.fechaAguarde();return}if(i3GEO.mapa.recupera.TENTATIVA==0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(i3GEO.mapa.recupera.TENTATIVA==1){i3GEO.mapa.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.mapa={GEOXML:new Array(),ajustaPosicao:function(elemento){if(arguments.length==0){return}try{imagemxi=0;imagemyi=0;imagemxref=0;imagemyref=0;var dc=$i(elemento);while((dc.offsetParent)&&(dc.offsetParent.id!="i3geo")){dc=dc.offsetParent;imagemxi=imagemxi+dc.offsetLeft;imagemyi=imagemyi+dc.offsetTop}var c=$i(i3GEO.interface.IDCORPO);if(c){c.style.position="absolute";$left(i3GEO.interface.IDCORPO,imagemxi);$top(i3GEO.interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao"+e)}},ativaLogo:function(){i3GEO.php.ativalogo(i3GEO.atualiza)},insereToponimo:function(){if(g_tipoacao=="textofid"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;texto=doc.getElementById("texto").value;var f=doc.getElementById("fonte").value;var t=doc.getElementById("tamanho").value;var a=doc.getElementById("angulo").value;var cf=doc.getElementById("fundoc").value;if(cf==""){cf="off"}var cs=doc.getElementById("sombra").value;if(cs==""){cs="off"}var xs=doc.getElementById("sombrax").value;var ys=doc.getElementById("sombray").value;var c=doc.getElementById("frente").value;var m=doc.getElementById("mascara").value;if(m==""){m="off"}var fcs=doc.getElementById("frentes").value;if(fcs==""){fcs="off"}var fxs=doc.getElementById("frentex").value;var fys=doc.getElementById("frentey").value;var forca=doc.getElementById("force").value;var md=doc.getElementById("mindistance").value;var mf=doc.getElementById("minfeaturesize").value;var ox=doc.getElementById("offsetx").value;var oy=doc.getElementById("offsety").value;var pl=doc.getElementById("partials").value;var pos=doc.getElementById("position").value;var digi=function(retorno){if(texto==""){i3GEO.janela.fechaAguarde("i3GEO.atualiza");texto=retorno.data}if(texto!=" "){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.insereAnnotation(i3GEO.atualiza,g_nomepin+"topo",objposicaocursor.ddx+" "+objposicaocursor.ddy,texto,pos,pl,ox,oy,mf,md,forca,fcs,fxs,fys,m,c,ys,xs,cs,cf,a,t,f)}};if(doc.getElementById("tipoInsere").value=="digitando"){digi.call()}else{texto="";if((doc.getElementById("temasLigados"))&&(doc.getElementById("itemsel"))){var tema=doc.getElementById("temasLigados").value;var item=doc.getElementById("itemsel").value;i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.identificaunico(digi,objposicaocursor.ddx+","+objposicaocursor.ddy,tema,item)}}}else{i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.insereToponimo()")}},insereKml:function(pan,url){if(arguments.length==1){var i=$i("i3geo_urlkml");if(i){var url=i.value}else{var url=""}}if(url==""){return}var ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;i3GEO.mapa.GEOXML.push(ngeoxml);var zoom=function(){if(pan){eval("var ll = "+ngeoxml+".getDefaultCenter()");eval(ngeoxml+".gotoDefaultViewport(i3GeoMap)")}};eval(ngeoxml+" = new GGeoXml(url,zoom)");eval("i3GeoMap.addOverlay("+ngeoxml+")");i3GEO.mapa.criaNoArvoreGoogle(ngeoxml,ngeoxml)},criaNoArvoreGoogle:function(url,nomeOverlay){var root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();var node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idkml","raiz");if(!node){var titulo="<table><tr><td><b>Google Maps</b></td></tr></table>";var d={html:titulo,idkml:"raiz"};var node=new YAHOO.widget.HTMLNode(d,root,true,true)}html="<input onclick='i3GEO.mapa.ativaDesativaOverlayGoogle(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+nomeOverlay+"' checked />";html+=" <span style='cursor:move'>"+url+"</span>";var d={html:html};var nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.isleaf=true;i3GEO.arvoreDeCamadas.ARVORE.draw();i3GEO.arvoreDeCamadas.ARVORE.collapseAll();node.expand()},ativaDesativaOverlayGoogle:function(obj){if(!obj.checked){eval("i3GeoMap.removeOverlay("+obj.value+")")}else eval("i3GeoMap.addOverlay("+obj.value+")")},inserePonto:function(){if(g_tipoacao=="inserexy"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(doc.getElementById("resultado")){var ins=doc.getElementById("resultado").innerHTML;ins=ins+"<div style='font-size:12px' >"+objposicaocursor.ddx+" "+objposicaocursor.ddy+"</div><br>";doc.getElementById("resultado").innerHTML=ins}var item="";var valoritem="";if((doc.getElementById("valorItem"))&&(doc.getElementById("itemtema"))){var item=doc.getElementById("itemtema").value;var valoritem=doc.getElementById("valorItem").value}if(g_nomepin==""){alert("Nenhum tema definido para editar")}else{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.insereSHP(i3GEO.atualiza,g_nomepin,item,valoritem,objposicaocursor.ddx+" "+objposicaocursor.ddy)}}},insereGrafico:function(){if(g_tipoacao=="inseregrafico"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;var tema=doc.getElementById("temasLigados").value;var width=doc.getElementById("w").value;var inclinacao=doc.getElementById("inclinacao").value;var shadow_height=doc.getElementById("sombra").value;if(tema==""){alert("Nenhum tema definido para pegar os dados")}else{var listadeitens=new Array();var g=doc.getElementById("listai");var iguias=g.getElementsByTagName("input");var i=iguias.length-1;if(i>=0){do{if(iguias[i].checked==true){var it=iguias[i].id;var c=doc.getElementById("cor"+it).value;listadeitens.push(it+","+c)}}while(i--)}var itens=listadeitens.join("*");if(itens==""){alert("Nenhum item foi escolhido")}else{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.insereSHPgrafico(i3GEO.atualiza,tema,objposicaocursor.ddx,objposicaocursor.ddy,itens,shadow_height,width,inclinacao)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(i3GEO.mapa.recupera.TENTATIVA==0){i3GEO.mapa.recupera.TENTATIVA++;i3GEO.mapa.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{ID:"",cria:function(id){if(arguments.length==0){var id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var temp=function(retorno){if(i3GEO.mapa.legendaHTML.ID!=""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!="erro")&&(retorno.data!=undefined)){var s=i3GEO.configura.locaplic+"/imagens/solta.gif";$i(i3GEO.mapa.legendaHTML.ID).innerHTML="<img onclick='i3GEO.mapa.legendaHTML.libera()' id=soltaLeg src="+s+" title='clique para liberar'/><br><div id='corpoLegi' >"+retorno.data.legenda+"</div>"}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;var elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i++){elementos[i].style.display="none"}}};i3GEO.mapa.legendaHTML.obtem(temp)},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked)i3GEO.php.ligatemas(temp,inputbox.value,"");else i3GEO.php.ligatemas(temp,"",inputbox.value)},libera:function(){var temp=function(retorno){if(!$i("moveLegi")){var novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";var temp='<div class="hd">Legenda</div>';temp+='<div id="wlegenda" style="text-align:left;background-color:white" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.Panel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;var temp=$i("wlegenda").getElementsByTagName("input");var n=temp.length;for(i=0;i<n;i++){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show()}i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{autoredesenha:function(){i3GEO.janela.cria("300px","110px",i3GEO.configura.locaplic+"/ferramentas/opcoes_autoredesenha/index.htm","","","Temporizador <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=9' > </a>")},salvaMapa:function(){if(i3GEO.parametros==""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.janela.cria("300px","180px",i3GEO.configura.locaplic+"/ferramentas/salvamapa/index.htm","","","Salva mapa <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=10' > </a>")},carregaMapa:function(){i3GEO.janela.cria("300px","150px",i3GEO.configura.locaplic+"/ferramentas/carregamapa/index.htm?urlatual="+window.location,"","","Carrega mapa <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=11' > </a>")},convertews:function(){if(i3GEO.parametros.mapfile==""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.janela.cria("440px","280px",i3GEO.configura.locaplic+"/ferramentas/convertews/index.htm","","","WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=12' > </a>")},convertekml:function(){if(i3GEO.parametros.mapfile==""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.janela.cria("440px","280px",i3GEO.configura.locaplic+"/ferramentas/convertemapakml/index.htm","","","Kml <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=2&idajuda=13' > </a>")},queryMap:function(){i3GEO.janela.cria("210px","80px",i3GEO.configura.locaplic+"/ferramentas/opcoes_querymap/index.htm","","","Cor da seleção <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=5' > </a>")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.janela.cria("150px","170px",i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/index.htm","","","Tamanho <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=4' > </a>")},tipoimagem:function(){i3GEO.janela.cria("300px","260px",i3GEO.configura.locaplic+"/ferramentas/tipoimagem/index.htm","","","Tipo de imagem <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=1' > </a>")},corFundo:function(){i3GEO.janela.cria("210px","80px",i3GEO.configura.locaplic+"/ferramentas/opcoes_fundo/index.htm","","","Cor do fundo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=6' > </a>")},opcoesEscala:function(){i3GEO.janela.cria("250px","300px",i3GEO.configura.locaplic+"/ferramentas/opcoes_escala/index.htm","center","center","Escala <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=3' > </a>")},opcoesLegenda:function(){i3GEO.janela.cria("320px","300px",i3GEO.configura.locaplic+"/ferramentas/opcoes_legenda/index.htm","","","Legenda <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=2' > </a>")},gradeCoord:function(){i3GEO.janela.cria("350px","330px",i3GEO.configura.locaplic+"/ferramentas/gradecoord/index.htm","","","Grade de coordenadas <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=7' > </a>")},cliqueTexto:function(){if(g_tipoacao!="textofid"){var temp=Math.random()+"b";temp=temp.split(".");g_nomepin="pin"+temp[1];g_tipoacao="textofid";var janela=i3GEO.janela.cria("360px","250px",i3GEO.configura.locaplic+"/ferramentas/inseretxt/index.htm","","","Texto");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.mapa.insereToponimo()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.mapa.insereToponimo()")}var temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.insereToponimo()");i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)}},cliquePonto:function(){if(g_tipoacao!="inserexy"){g_tipoacao="inserexy";var temp=Math.random()+"a";temp=temp.split(".");g_nomepin="pin"+temp[1];var janela=i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+'/ferramentas/inserexy2/index.htm',"","","Insere");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.mapa.inserePonto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.mapa.inserePonto()")}var temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.inserePonto()");i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)}},cliqueGrafico:function(){if(g_tipoacao!="inseregrafico"){g_tipoacao="inseregrafico";var temp=Math.random()+"a";temp=temp.split(".");g_nomepin="pin"+temp[1];var janela=i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+'/ferramentas/inseregrafico/index.htm',"","","Insere");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.mapa.insereGrafico()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.mapa.insereGrafico()")}var temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.mapa.insereGrafico()");i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)}}},corpo:{verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){var retorno=retorno.data}if(retorno.variaveis){var retorno=retorno.variaveis}if((retorno=="erro")||(retorno==undefined)){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.interface.ATUAL=="openlayers"){i3GEO.janela.fechaAguarde();return}if(i3GEO.mapa.recupera.TENTATIVA==0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(i3GEO.mapa.recupera.TENTATIVA==1){i3GEO.mapa.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_maparef_compacto.js
1 | -if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.maparef={fatorZoomDinamico:-3,TOP:4,RIGHT:0,inicia:function(){if(!$i("i3geo_winRef")){var novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";var ins='<div class="hd" style="text-align:left;z-index:20;"><span id=maparefmaismenosZoom ';var temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";var temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";ins+="<select id='refDinamico' onchange='javascript:i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>";ins+="</div>";ins+='<div class="bd" style="text-align:left;padding:3px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;" id=imagemReferencia src="" onclick="javascript:i3GEO.maparef.click()">';novoel.innerHTML=ins;document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!="block"){$i("i3geo_winRef").style.display="block";YAHOO.namespace("janelaRef.xp");YAHOO.janelaRef.xp.panel=new YAHOO.widget.Panel("i3geo_winRef",{width:"156px",fixedcenter:false,constraintoviewport:true,underlay:"shadow",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaRef.xp.panel.render();var r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 179px, 0px)";r.style.position="absolute"}var pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO));var moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;var moveY=pos[1]+i3GEO.maparef.TOP;YAHOO.janelaRef.xp.panel.moveTo(moveX,moveY);var escondeRef=function(){YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close,"click");YAHOO.janelaRef.xp.panel.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if(typeof(atualizaLocalizarxy)=="function"){if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml)YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",atualizaLocalizarxy)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza()},atualiza:function(){var dinamico=false;if($i("refDinamico")){var tiporef=$i("refDinamico").value}if($i("mapaReferencia")){var temp=$i("maparefmaismenosZoom");if(tiporef=="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef=="fixo"){if(($i("imagemReferencia").src=="")||(i3GEO.parametros.cgi!="sim")){i3GEO.php.referencia(i3GEO.maparef.processaImagem);if(temp){temp.style.display="none"}}else{var re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.interface.IDMAPA).src.replace(re,'&mode=reference');i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}}if(tiporef=="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{if($i("imagemReferencia"))i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src);i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){i3GEO.janela.fechaAguarde("ajaxreferencia1");if((retorno.data!="erro")&&(retorno.data!=undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;if($i("imagemReferencia")){var m=new Image();m.src=refimagem;$i("imagemReferencia").src=m.src}i3GEO.gadgets.quadros.grava("referencia",refimagem);var tiporef="fixo";if($i("refDinamico")){var tiporef=$i("refDinamico").value}var box=$i("boxref");if(tiporef!="fixo"){if(box){box.style.display="none"}return}if(!box){var novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.cursor="move";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=.4}$i("mapaReferencia").appendChild(novoel);var boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect=$i("boxref");var telaminx=parseInt(rect.style.left);var telamaxy=parseInt(rect.style.top);var telamaxx=telaminx+parseInt(rect.style.width);var telaminy=telamaxy+parseInt(rect.style.height);var m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref);var x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref);var ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)}var box=$i("boxref")}i3GEO.calculo.ext2rect("boxref",extentref,i3GEO.parametros.mapexten,g_celularef,$i("mapaReferencia"));if(parseInt(box.style.width)>120)box.style.display="none";else{box.style.display="block";box.style.top=parseInt(box.style.top)+2;box.style.left=parseInt(box.style.left)+2}}},click:function(){try{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){var e="";i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}i3GEO.maparef={fatorZoomDinamico:-3,TRANSICAOSUAVE:true,TRANSPARENCIA:50,TOP:4,RIGHT:0,inicia:function(){if(!$i("i3geo_winRef")){var novoel=document.createElement("div");if(i3GEO.maparef.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')'}else{novoel.style.opacity=i3GEO.maparef.TRANSPARENCIA/100}novoel.onmouseover=function(){if(navm){novoel.style.filter='alpha(opacity=100)'}else{novoel.style.opacity=1}};novoel.onmouseout=function(){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')'}else{novoel.style.opacity=i3GEO.maparef.TRANSPARENCIA/100}}}novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";var ins='<div class="hd" style="text-align:left;z-index:20;"><span id=maparefmaismenosZoom ';var temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";var temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";ins+="<select id='refDinamico' onchange='javascript:i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>";ins+="</div>";ins+='<div class="bd" style="text-align:left;padding:3px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;" id=imagemReferencia src="" onclick="javascript:i3GEO.maparef.click()">';novoel.innerHTML=ins;document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!="block"){$i("i3geo_winRef").style.display="block";YAHOO.namespace("janelaRef.xp");YAHOO.janelaRef.xp.panel=new YAHOO.widget.Panel("i3geo_winRef",{width:"156px",fixedcenter:false,constraintoviewport:true,underlay:"shadow",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaRef.xp.panel.render();var r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 179px, 0px)";r.style.position="absolute"}var pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO));var moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;var moveY=pos[1]+i3GEO.maparef.TOP;YAHOO.janelaRef.xp.panel.moveTo(moveX,moveY);var escondeRef=function(){YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close,"click");YAHOO.janelaRef.xp.panel.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if(typeof(atualizaLocalizarxy)=="function"){if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml)YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",atualizaLocalizarxy)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza()},atualiza:function(){var dinamico=false;if($i("refDinamico")){var tiporef=$i("refDinamico").value}if($i("mapaReferencia")){var temp=$i("maparefmaismenosZoom");if(tiporef=="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef=="fixo"){if(($i("imagemReferencia").src=="")||(i3GEO.parametros.cgi!="sim")){i3GEO.php.referencia(i3GEO.maparef.processaImagem);if(temp){temp.style.display="none"}}else{var re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.interface.IDMAPA).src.replace(re,'&mode=reference');i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}}if(tiporef=="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{if($i("imagemReferencia"))i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src);i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){i3GEO.janela.fechaAguarde("ajaxreferencia1");if((retorno.data!="erro")&&(retorno.data!=undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;if($i("imagemReferencia")){var m=new Image();m.src=refimagem;$i("imagemReferencia").src=m.src}i3GEO.gadgets.quadros.grava("referencia",refimagem);var tiporef="fixo";if($i("refDinamico")){var tiporef=$i("refDinamico").value}var box=$i("boxref");if(tiporef!="fixo"){if(box){box.style.display="none"}return}if(!box){var novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.cursor="move";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=.4}$i("mapaReferencia").appendChild(novoel);var boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect=$i("boxref");var telaminx=parseInt(rect.style.left);var telamaxy=parseInt(rect.style.top);var telamaxx=telaminx+parseInt(rect.style.width);var telaminy=telamaxy+parseInt(rect.style.height);var m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref);var x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref);var ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)}var box=$i("boxref")}i3GEO.calculo.ext2rect("boxref",extentref,i3GEO.parametros.mapexten,g_celularef,$i("mapaReferencia"));if(parseInt(box.style.width)>120)box.style.display="none";else{box.style.display="block";box.style.top=parseInt(box.style.top)+2;box.style.left=parseInt(box.style.left)+2}}},click:function(){try{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){var e="";i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_util_compacto.js
1 | -if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}navm=false;navn=false;var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;g_operacao="";g_tipoacao="zoomli";g_postpx="px";g_tipotop="top";g_tipoleft="left";if(navm){g_postpx="";g_tipotop="pixelTop";g_tipoleft="pixelLeft"}$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var i=this.indexOf(s);if(i!=-1)this.splice(i,1)}catch(e){}};i3GEO.util={PINS:new Array(),BOXES:new Array(),escapeURL:function(sUrl){var sUrl=escape(sUrl);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor){document.cookie=nome+"="+valor+";path=/"},pegaCookie:function(nome){var cookies=document.cookie;var i=cookies.indexOf(nome);if(i==-1){return null}var fim=cookies.indexOf(";",i);if(fim==-1){var fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys=[];for(var key in obj){keys.push(key)}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{clearTimeout(tempoBotaoAplicar)}catch(e){};tempoBotaoAplicar=eval("setTimeout('"+nomeFuncao+"\(\)',(i3GEO.configura.tempoAplicar))");autoRedesenho("reinicia");if(arguments.length==1){var titulo="Aplicar"}if(arguments.length==1||arguments.length==2){var classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){var novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{var novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length==4){novoel.style.display="block";var xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){if(!$i(onde)){return}var currentIconMode;YAHOO.example.treeExample=new function(){function buildTree(){arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();var tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false}buildTree()}();var titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";var d={html:titulo};var tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);var c=obj.propriedades.length;for(var i=0,j=c;i<j;i++){var linha=obj.propriedades[i];var conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>";var d={html:conteudo};var temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true)}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re=/ã|á|à|â/gi;palavra=palavra.replace(re,"a");var re=/é/gi;palavra=palavra.replace(re,"e");var re=/í/gi;palavra=palavra.replace(re,"i");var re=/ó|õ/gi;palavra=palavra.replace(re,"o");var re=/ç/gi;palavra=palavra.replace(re,"c");var re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;var u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(obj.style.position=="absolute"){return[(parseInt(obj.style.left)),(parseInt(obj.style.top))]}else{var curleft=curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop}while(obj=obj.offsetParent)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}}else{return[0,0]}},pegaElementoPai:function(e){var targ;if(!e){var e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.nodeType==3){targ=targ.parentNode}var tname;tparent=targ.parentNode;return(tparent)},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var o=document.getElementById(idobjeto);var c=eval("cursores."+tipo+".ie");if(c=="default"||c=="pointer"||c=="crosshair"||c=="help"||c=="move"||c=="text")o.style.cursor=c;else{if(o){if(navm){o.style.cursor="URL(\""+locaplic+eval("cursores."+tipo+".ie")+"\"),auto"}else{o.style.cursor="URL(\""+locaplic+eval("cursores."+tipo+".ff")+"\"),auto"}}}},criaBox:function(id){if(arguments.length==0){var id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}},escondeBox:function(){var l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h){if(arguments.length<1||id==""){var id="boxpin"}if(arguments.length<2||imagem==""){var imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w==""){var w="21px"}if(arguments.length<4||h==""){var h="25px"}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=w;novoel.style.height=h;novoel.src=imagem;if(id=="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}},posicionaImagemNoMapa:function(id){var i=$i(id);var mx=parseInt(i.style.width)/2;var my=parseInt(i.style.height)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my;i.style.left=objposicaocursor.telax-mx},escondePin:function(){var l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/"+i3GEO.configura.visual+"/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor){if(idPai!=""){if(larguraIdPai!=""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center";$i(idPai).onmouseover=function(){this.className="digitarMouseover"};$i(idPai).onmouseout=function(){this.className=""}}var i="<input onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.className=\"digitarMouseclick\";' id="+idInput+" title='"+titulo+"' type=text size="+digitos+" class=digitar value='"+valor+"' />";return i},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:new Array(),cria:function(xi,yi,funcaoOnclick,container){try{if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0)i3GEO.util.insereMarca.CONTAINER.push(container);if(!$i(container)){var novoel=document.createElement("div");novoel.id=container;var i=novoel.style;i.position="absolute";i.top=parseInt($i("img").style.top);i.left=parseInt($i("img").style.left);document.body.appendChild(novoel)}var container=$i(container);var novoel=document.createElement("div");var i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-4)+"px";i.left=(xi-4)+"px";i.width="4px";i.height="4px";var novoimg=document.createElement("img");if(funcaoOnclick!=""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=i3GEO.configura.locaplic+"/imagens/dot1.gif";with(novoimg.style){width="6px";height="6px";zIndex=2000}novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i]))$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}i3GEO.util.insereMarca.CONTAINER=new Array();i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=path.split(".");if((temp[1]=="SHP")||(temp[1]=="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janela,elemento){i3GEO.janela.cria("400","240",i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento,"","","Cor","i3geo_janelaCor",true)},ajaxhttp:function(){try{var objhttp1=new XMLHttpRequest()}catch(ee){try{var objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{var objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){var objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){if(programa.search("http")==0){var h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}var ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);var retorno="";ohttp.onreadystatechange=function(){if(ohttp.readyState==4){var retorno=ohttp.responseText;if(retorno!=undefined){if(document.implementation.createDocument){var parser=new DOMParser();var dom=parser.parseFromString(retorno,"text/xml")}else{var dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{var dom="erro"}if(funcao!="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n=parseInt(tempo/intervalo);var tempo=n*intervalo;var intervalo=(intervalo*100)/tempo;var obj=$i(id);var opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";var fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100)var tempoFade=setTimeout(fadei,tempo);else{clearTimeout(tempoFadei);if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};var tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n=parseInt(tempo/intervalo);var tempo=n*intervalo;var intervalo=(intervalo*100)/tempo;var obj=$i(id);var opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";var fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){var tempoFade=setTimeout(fade,tempo)}else{clearTimeout(tempoFade);obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){var p=obj.parentNode;p.removeChild(obj)}}};var tempoFade=setTimeout(fade,tempo)}};$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor){return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)=='undefined'){i3GEO=new Array()}navm=false;navn=false;var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;g_operacao="";g_tipoacao="zoomli";g_postpx="px";g_tipotop="top";g_tipoleft="left";if(navm){g_postpx="";g_tipotop="pixelTop";g_tipoleft="pixelLeft"}$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var i=this.indexOf(s);if(i!=-1)this.splice(i,1)}catch(e){}};i3GEO.util={PINS:new Array(),BOXES:new Array(),escapeURL:function(sUrl){var sUrl=escape(sUrl);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor){document.cookie=nome+"="+valor+";path=/"},pegaCookie:function(nome){var cookies=document.cookie;var i=cookies.indexOf(nome);if(i==-1){return null}var fim=cookies.indexOf(";",i);if(fim==-1){var fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys=[];for(var key in obj){keys.push(key)}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{clearTimeout(tempoBotaoAplicar)}catch(e){};tempoBotaoAplicar=eval("setTimeout('"+nomeFuncao+"\(\)',(i3GEO.configura.tempoAplicar))");autoRedesenho("reinicia");if(arguments.length==1){var titulo="Aplicar"}if(arguments.length==1||arguments.length==2){var classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){var novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{var novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length==4){novoel.style.display="block";var xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){if(!$i(onde)){return}var currentIconMode;YAHOO.example.treeExample=new function(){function buildTree(){arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();var tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false}buildTree()}();var titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";var d={html:titulo};var tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);var c=obj.propriedades.length;for(var i=0,j=c;i<j;i++){var linha=obj.propriedades[i];var conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>";var d={html:conteudo};var temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true)}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re=/ã|á|à|â/gi;palavra=palavra.replace(re,"a");var re=/é/gi;palavra=palavra.replace(re,"e");var re=/í/gi;palavra=palavra.replace(re,"i");var re=/ó|õ/gi;palavra=palavra.replace(re,"o");var re=/ç/gi;palavra=palavra.replace(re,"c");var re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;var u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(obj.style.position=="absolute"){return[(parseInt(obj.style.left)),(parseInt(obj.style.top))]}else{var curleft=curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop}while(obj=obj.offsetParent)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}}else{return[0,0]}},pegaElementoPai:function(e){var targ;if(!e){var e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.nodeType==3){targ=targ.parentNode}var tname;tparent=targ.parentNode;return(tparent)},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var o=document.getElementById(idobjeto);var c=eval("cursores."+tipo+".ie");if(c=="default"||c=="pointer"||c=="crosshair"||c=="help"||c=="move"||c=="text")o.style.cursor=c;else{if(o){if(navm){o.style.cursor="URL(\""+locaplic+eval("cursores."+tipo+".ie")+"\"),auto"}else{o.style.cursor="URL(\""+locaplic+eval("cursores."+tipo+".ff")+"\"),auto"}}}},criaBox:function(id){if(arguments.length==0){var id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}},escondeBox:function(){var l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h){if(arguments.length<1||id==""){var id="boxpin"}if(arguments.length<2||imagem==""){var imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w==""){var w="21px"}if(arguments.length<4||h==""){var h="25px"}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=w;novoel.style.height=h;novoel.src=imagem;if(id=="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}},posicionaImagemNoMapa:function(id){var i=$i(id);var mx=parseInt(i.style.width)/2;var my=parseInt(i.style.height)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my;i.style.left=objposicaocursor.telax-mx},escondePin:function(){var l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/"+i3GEO.configura.visual+"/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor){if(idPai!=""){if(larguraIdPai!=""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center";$i(idPai).onmouseover=function(){this.className="digitarMouseover"};$i(idPai).onmouseout=function(){this.className=""}}var i="<input onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.className=\"digitarMouseclick\";' id="+idInput+" title='"+titulo+"' type=text size="+digitos+" class=digitar value='"+valor+"' />";return i},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:new Array(),cria:function(xi,yi,funcaoOnclick,container){try{if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0)i3GEO.util.insereMarca.CONTAINER.push(container);if(!$i(container)){var novoel=document.createElement("div");novoel.id=container;var i=novoel.style;i.position="absolute";i.top=parseInt($i("img").style.top);i.left=parseInt($i("img").style.left);document.body.appendChild(novoel)}var container=$i(container);var novoel=document.createElement("div");var i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-4)+"px";i.left=(xi-4)+"px";i.width="4px";i.height="4px";var novoimg=document.createElement("img");if(funcaoOnclick!=""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=i3GEO.configura.locaplic+"/imagens/dot1.gif";with(novoimg.style){width="6px";height="6px";zIndex=2000}novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i]))$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}i3GEO.util.insereMarca.CONTAINER=new Array();i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=path.split(".");if((temp[1]=="SHP")||(temp[1]=="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janela,elemento){i3GEO.janela.cria("400","240",i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento,"","","Cor","i3geo_janelaCor",true)},ajaxhttp:function(){try{var objhttp1=new XMLHttpRequest()}catch(ee){try{var objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{var objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){var objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){if(programa.search("http")==0){var h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}var ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);var retorno="";ohttp.onreadystatechange=function(){if(ohttp.readyState==4){var retorno=ohttp.responseText;if(retorno!=undefined){if(document.implementation.createDocument){var parser=new DOMParser();var dom=parser.parseFromString(retorno,"text/xml")}else{var dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{var dom="erro"}if(funcao!="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n=parseInt(tempo/intervalo);var tempo=n*intervalo;var intervalo=(intervalo*100)/tempo;var obj=$i(id);var opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";var fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100)var tempoFade=setTimeout(fadei,tempo);else{clearTimeout(tempoFadei);if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};var tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n=parseInt(tempo/intervalo);var tempo=n*intervalo;var intervalo=(intervalo*100)/tempo;var obj=$i(id);var opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";var fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){var tempoFade=setTimeout(fade,tempo)}else{clearTimeout(tempoFade);obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){var p=obj.parentNode;if(p)p.removeChild(obj)}}};var tempoFade=setTimeout(fade,tempo)}};$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor){return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/i3geo_tudo_compacto.js
... | ... | @@ -3943,13 +3943,14 @@ i3GEO = { |
3943 | 3943 | {menos = menos + parseInt($i("ferramentas").style.width);} |
3944 | 3944 | var novow = parseInt(screen.availWidth) - diminuix; |
3945 | 3945 | var novoh = parseInt(screen.availHeight) - diminuiy; |
3946 | + window.resizeTo(screen.availWidth,screen.availHeight); | |
3947 | + window.moveTo(0,0); | |
3948 | + | |
3946 | 3949 | //o try aqui é necessário por conta do uso possível do i3geo em um iframe |
3947 | 3950 | try{ |
3948 | - if (document.body.style.width < 400){ | |
3949 | - var novow = parseInt(screen.availWidth) - diminuix; | |
3950 | - var novoh = parseInt(screen.availHeight) - diminuiy; | |
3951 | - window.resizeTo(screen.availWidth,screen.availHeight); | |
3952 | - window.moveTo(0,0); | |
3951 | + if (novow < 800){ | |
3952 | + var novow = 800; | |
3953 | + var novoh = 600; | |
3953 | 3954 | } |
3954 | 3955 | } |
3955 | 3956 | catch(e){var e = "";} |
... | ... | @@ -3957,19 +3958,15 @@ i3GEO = { |
3957 | 3958 | document.body.style.height = novoh; |
3958 | 3959 | var w = novow - menos - diminuix; |
3959 | 3960 | var h = novoh - diminuiy; |
3960 | - if (document.getElementById("corpoMapa")){ | |
3961 | - if (document.getElementById("corpoMapa").style.width){ | |
3962 | - var w = parseInt(document.getElementById("corpoMapa").style.width); | |
3963 | - var h = parseInt(document.getElementById("corpoMapa").style.width); | |
3964 | - } | |
3965 | - if (document.getElementById("corpoMapa").style.height) | |
3966 | - {var h = parseInt(document.getElementById("corpoMapa").style.height);} | |
3967 | - } | |
3968 | 3961 | var temp = $i("corpoMapa"); |
3969 | - if(temp){ | |
3962 | + if (temp){ | |
3970 | 3963 | if(temp.style){ |
3971 | - if(temp.style.width){var w = parseInt(temp.style.width);} | |
3972 | - if(temp.style.height){var h = parseInt(temp.style.height);} | |
3964 | + if (temp.style.width){ | |
3965 | + var w = parseInt(temp.style.width); | |
3966 | + var h = parseInt(temp.style.width); | |
3967 | + } | |
3968 | + if (temp.style.height) | |
3969 | + {var h = parseInt(temp.style.height);} | |
3973 | 3970 | } |
3974 | 3971 | } |
3975 | 3972 | if($i("contemImg")){ |
... | ... | @@ -4173,6 +4170,11 @@ i3GEO = { |
4173 | 4170 | dessa chamada é armazenada em i3GEO.parametros |
4174 | 4171 | */ |
4175 | 4172 | atualiza: function(retorno){ |
4173 | + if(arguments.length == 0){ | |
4174 | + i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
4175 | + i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
4176 | + return; | |
4177 | + } | |
4176 | 4178 | //verifica se o parâmetro retorno existe, caso contrário, |
4177 | 4179 | //faz a chamada ao programa PHP para obter os parâmetros |
4178 | 4180 | try{ |
... | ... | @@ -4184,8 +4186,14 @@ i3GEO = { |
4184 | 4186 | catch(e){} |
4185 | 4187 | var erro = function(){ |
4186 | 4188 | var legimagem = ""; |
4187 | - i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
4188 | - i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
4189 | + var c = confirm("Ocorreu um erro, quer tentar novamente?"); | |
4190 | + if(c){ | |
4191 | + i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
4192 | + i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
4193 | + } | |
4194 | + else{ | |
4195 | + i3GEO.janela.fechaAguarde(); | |
4196 | + } | |
4189 | 4197 | } |
4190 | 4198 | try{eval(retorno.data.variaveis);} |
4191 | 4199 | catch(e){erro.call();return;} |
... | ... | @@ -5110,7 +5118,7 @@ i3GEO.util = { |
5110 | 5118 | /* |
5111 | 5119 | Function: desaparece |
5112 | 5120 | |
5113 | - Aplica efeito de desaparecimento suave de um objetov | |
5121 | + Aplica efeito de desaparecimento suave de um objeto | |
5114 | 5122 | |
5115 | 5123 | Parameters: |
5116 | 5124 | |
... | ... | @@ -5151,6 +5159,7 @@ i3GEO.util = { |
5151 | 5159 | {obj.style.opacity= 1;} |
5152 | 5160 | if(removeobj){ |
5153 | 5161 | var p = obj.parentNode; |
5162 | + if(p) | |
5154 | 5163 | p.removeChild(obj); |
5155 | 5164 | } |
5156 | 5165 | } |
... | ... | @@ -11194,10 +11203,6 @@ i3GEO.mapa = { |
11194 | 11203 | imagemyi = 0; |
11195 | 11204 | imagemxref = 0; |
11196 | 11205 | imagemyref = 0; |
11197 | - var dc = $i("i3geo"); | |
11198 | - if(!dc){return;} | |
11199 | - if (dc.style.left){imagemxi += parseInt(dc.style.left);} | |
11200 | - if (dc.style.top){imagemyi += parseInt(dc.style.top);} | |
11201 | 11206 | var dc = $i(elemento); |
11202 | 11207 | while ((dc.offsetParent) && (dc.offsetParent.id != "i3geo")){ |
11203 | 11208 | dc = dc.offsetParent; |
... | ... | @@ -11209,8 +11214,12 @@ i3GEO.mapa = { |
11209 | 11214 | c.style.position="absolute"; |
11210 | 11215 | $left(i3GEO.interface.IDCORPO,imagemxi); |
11211 | 11216 | $top(i3GEO.interface.IDCORPO,imagemyi); |
11212 | - if ($i("i3geo").style.left){$left(i3GEO.interface.IDCORPO,imagemxi + parseInt($i("i3geo").style.left));} | |
11213 | - if ($i("i3geo").style.top){$top(i3GEO.interface.IDCORPO,imagemyi + parseInt($i("i3geo").style.top));} | |
11217 | + /* | |
11218 | + if($i("i3geo")){ | |
11219 | + if ($i("i3geo").style.left){$left(i3GEO.interface.IDCORPO,imagemxi + parseInt($i("i3geo").style.left));} | |
11220 | + if ($i("i3geo").style.top){$top(i3GEO.interface.IDCORPO,imagemyi + parseInt($i("i3geo").style.top));} | |
11221 | + } | |
11222 | + */ | |
11214 | 11223 | } |
11215 | 11224 | } |
11216 | 11225 | catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao"+e);} |
... | ... | @@ -12580,6 +12589,32 @@ i3GEO.maparef = { |
12580 | 12589 | */ |
12581 | 12590 | fatorZoomDinamico: -3, |
12582 | 12591 | /* |
12592 | + Property: TRANSICAOSUAVE | |
12593 | + | |
12594 | + Altera a transparência quando o mouse sobrepõe ao mapa de referência e quando sai | |
12595 | + | |
12596 | + Type: | |
12597 | + {boolean} | |
12598 | + | |
12599 | + Default: | |
12600 | + {true} | |
12601 | + */ | |
12602 | + TRANSICAOSUAVE: true, | |
12603 | + /* | |
12604 | + Property: TRANSPARENCIA | |
12605 | + | |
12606 | + Valor da transparência máxima utilizada quando TRANSICAOSUAVE for igual a true. | |
12607 | + | |
12608 | + Varia de 0 a 100, sendo 0 a menor transparência | |
12609 | + | |
12610 | + Type: | |
12611 | + {numeric} | |
12612 | + | |
12613 | + Default: | |
12614 | + {30} | |
12615 | + */ | |
12616 | + TRANSPARENCIA: 50, | |
12617 | + /* | |
12583 | 12618 | Property: TOP |
12584 | 12619 | |
12585 | 12620 | Posição da janela em relação ao topo do mapa |
... | ... | @@ -12604,6 +12639,24 @@ i3GEO.maparef = { |
12604 | 12639 | //YAHOO.log("initJanelaRef", "i3geo"); |
12605 | 12640 | if (!$i("i3geo_winRef")){ |
12606 | 12641 | var novoel = document.createElement("div"); |
12642 | + if(i3GEO.maparef.TRANSICAOSUAVE){ | |
12643 | + if (navm) | |
12644 | + {novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')';} | |
12645 | + else | |
12646 | + {novoel.style.opacity= i3GEO.maparef.TRANSPARENCIA / 100;} | |
12647 | + novoel.onmouseover = function(){ | |
12648 | + if (navm) | |
12649 | + {novoel.style.filter='alpha(opacity=100)';} | |
12650 | + else | |
12651 | + {novoel.style.opacity= 1;} | |
12652 | + }; | |
12653 | + novoel.onmouseout = function(){ | |
12654 | + if (navm) | |
12655 | + {novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')';} | |
12656 | + else | |
12657 | + {novoel.style.opacity= i3GEO.maparef.TRANSPARENCIA / 100;} | |
12658 | + } | |
12659 | + } | |
12607 | 12660 | novoel.id = "i3geo_winRef"; |
12608 | 12661 | novoel.style.display="none"; |
12609 | 12662 | novoel.style.borderColor="gray"; |
... | ... | @@ -18079,6 +18132,41 @@ i3GEO.barraDeBotoes = { |
18079 | 18132 | */ |
18080 | 18133 | BARRAS: new Array(), |
18081 | 18134 | /* |
18135 | + Property: AUTOALTURA | |
18136 | + | |
18137 | + Ajusta automaticamente a altura das barras conforme a altura do mapa. | |
18138 | + | |
18139 | + Type: | |
18140 | + {boolean} | |
18141 | + */ | |
18142 | + AUTOALTURA: false, | |
18143 | + /* | |
18144 | + Property: TRANSICAOSUAVE | |
18145 | + | |
18146 | + Altera a transparência das barras quando o mouse sobrepõe a barra e quando sai da barra | |
18147 | + | |
18148 | + Type: | |
18149 | + {boolean} | |
18150 | + | |
18151 | + Default: | |
18152 | + {true} | |
18153 | + */ | |
18154 | + TRANSICAOSUAVE: true, | |
18155 | + /* | |
18156 | + Property: TRANSPARENCIA | |
18157 | + | |
18158 | + Valor da transparência máxima utilizada quando TRANSICAOSUAVE for igual a true. | |
18159 | + | |
18160 | + Varia de 0 a 100, sendo 0 a menor transparência | |
18161 | + | |
18162 | + Type: | |
18163 | + {numeric} | |
18164 | + | |
18165 | + Default: | |
18166 | + {30} | |
18167 | + */ | |
18168 | + TRANSPARENCIA: 50, | |
18169 | + /* | |
18082 | 18170 | Property: PERMITEFECHAR |
18083 | 18171 | |
18084 | 18172 | Mostra o botão para fechar as barras ou não. |
... | ... | @@ -18275,12 +18363,21 @@ i3GEO.barraDeBotoes = { |
18275 | 18363 | novoel.style.display="block"; |
18276 | 18364 | novoel.style.border="1px solid gray"; |
18277 | 18365 | novoel.style.background="white"; |
18278 | - if (navm) | |
18279 | - {novoel.style.filter='alpha(opacity=90)';} | |
18280 | - else | |
18281 | - {novoel.style.opacity= .85;} | |
18282 | - //var temp = '<div class="hd" > </div>'; | |
18283 | - //temp += '<div class="bd" style="background-color:rgb(250,250,250);width='+wj+'px" >'; | |
18366 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
18367 | + if (navm){ | |
18368 | + | |
18369 | + novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')'; | |
18370 | + } | |
18371 | + else{ | |
18372 | + novoel.style.opacity= i3GEO.barraDeBotoes.TRANSPARENCIA / 100; | |
18373 | + } | |
18374 | + } | |
18375 | + else{ | |
18376 | + if (navm) | |
18377 | + {novoel.style.filter='alpha(opacity=90)';} | |
18378 | + else | |
18379 | + {novoel.style.opacity= .85;} | |
18380 | + } | |
18284 | 18381 | var temp = ""; |
18285 | 18382 | if (barraZoom == true) |
18286 | 18383 | { |
... | ... | @@ -18297,19 +18394,63 @@ i3GEO.barraDeBotoes = { |
18297 | 18394 | //objposicaocursor.imgx = 0; |
18298 | 18395 | if($i("i3geo_rosa")) |
18299 | 18396 | {$i("i3geo_rosa").style.display="none";} |
18397 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
18398 | + if (navm) | |
18399 | + {novoel.style.filter='alpha(opacity=90)';} | |
18400 | + else | |
18401 | + {novoel.style.opacity= .85;} | |
18402 | + } | |
18300 | 18403 | }; |
18404 | + novoel.onmouseout = function(){ | |
18405 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
18406 | + if (navm) | |
18407 | + {novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')';} | |
18408 | + else | |
18409 | + {novoel.style.opacity= i3GEO.barraDeBotoes.TRANSPARENCIA / 100;} | |
18410 | + } | |
18411 | + } | |
18301 | 18412 | document.body.appendChild(novoel); |
18302 | 18413 | //copia os botoes do HTML para a janela |
18303 | 18414 | if ($i(idconteudo)) |
18304 | 18415 | { |
18305 | 18416 | $i(idconteudonovo+"_").innerHTML = $i(idconteudo).innerHTML; |
18306 | 18417 | $i(idconteudo).innerHTML = ""; |
18418 | + //faz o cálculo do número de botões que devem ficar visíveis em função do tamanho da barra | |
18419 | + if(i3GEO.barraDeBotoes.AUTOALTURA){ | |
18420 | + var elementos = $i(idconteudonovo+"_").getElementsByTagName("img"); | |
18421 | + if(elementos[0].id == "sobeferramentas"){ | |
18422 | + try{ | |
18423 | + var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); | |
18424 | + var alturadisponivel = i3GEO.parametros.h - 4; | |
18425 | + var numerobotoes = parseInt(alturadisponivel / 30); | |
18426 | + var nelementos = elementos.length; | |
18427 | + var i = 0; | |
18428 | + do{ | |
18429 | + elementos[i].style.display = "none"; | |
18430 | + var i = i + 1; | |
18431 | + } | |
18432 | + while(i < nelementos) | |
18433 | + var i = 0; | |
18434 | + do{ | |
18435 | + elementos[i].style.display = "inline"; | |
18436 | + var i = i + 1; | |
18437 | + } | |
18438 | + while(i < numerobotoes) | |
18439 | + }catch(e){} | |
18440 | + if(i == numerobotoes){ | |
18441 | + if($i("sobeferramentas")){$i("sobeferramentas").style.display="none";} | |
18442 | + if($i("desceferramentas")){$i("desceferramentas").style.display="none";} | |
18443 | + } | |
18444 | + } | |
18445 | + } | |
18307 | 18446 | } |
18308 | 18447 | YAHOO.namespace("janelaBotoes.xp"); |
18309 | - YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
18448 | + if(i3GEO.barraDeBotoes.AUTOALTURA == false) | |
18449 | + YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
18450 | + else | |
18451 | + YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {height:i3GEO.parametros.h - 4,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
18310 | 18452 | if((barraZoom == true) && $i("img")){ |
18311 | 18453 | i3GEO.barraDeBotoes.ativaBarraDeZoom(); |
18312 | - | |
18313 | 18454 | verticalSlider = YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom", 0, 70); |
18314 | 18455 | verticalSlider.onChange = function(offsetFromStart) |
18315 | 18456 | {g_fatordezoom = (offsetFromStart - 35) / 5;}; |
... | ... | @@ -18397,28 +18538,35 @@ i3GEO.barraDeBotoes = { |
18397 | 18538 | } |
18398 | 18539 | } |
18399 | 18540 | YAHOO.janelaBotoes.xp.panel.render(); |
18541 | + if(i3GEO.barraDeBotoes.AUTOALTURA == true){ | |
18542 | + var y = y - i3GEO.interface.BARRABOTOESTOP + 2; | |
18543 | + var x = x - 3; | |
18544 | + } | |
18400 | 18545 | YAHOO.janelaBotoes.xp.panel.moveTo(x,y); |
18401 | 18546 | if($i("sobeferramentas")){ |
18402 | 18547 | $i("sobeferramentas").onclick = function(){ |
18403 | 18548 | var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
18404 | - if(elementos[0].style.display == "inline") | |
18549 | + var nelementos = elementos.length; | |
18550 | + if(elementos[0].style.display == "inline" && elementos[0].id == "") | |
18551 | + {return;} | |
18552 | + if(elementos[1].style.display == "inline" && elementos[1].id == "") | |
18405 | 18553 | {return;} |
18406 | - if(elementos.length > 0){ | |
18554 | + if(nelementos > 0){ | |
18407 | 18555 | var mostra = elementos[0]; |
18408 | 18556 | var i = 0; |
18409 | 18557 | do{ |
18410 | 18558 | if(elementos[i].style){ |
18411 | - if(elementos[i].style.display == "inline") | |
18559 | + if(elementos[i].style.display == "inline" && elementos[i].id == "") | |
18412 | 18560 | {break;} |
18413 | - if(elementos[i].style.display == "none") | |
18561 | + if(elementos[i].style.display == "none" && elementos[i].id == "") | |
18414 | 18562 | {var mostra = elementos[i];} |
18415 | 18563 | } |
18416 | 18564 | var i = i + 1; |
18417 | 18565 | } |
18418 | - while(i < elementos.length) | |
18566 | + while(i < nelementos) | |
18419 | 18567 | mostra.style.display="inline"; |
18420 | 18568 | //esconde o último botao |
18421 | - var i = elementos.length - 1; | |
18569 | + var i = nelementos - 1; | |
18422 | 18570 | var mostra = elementos[i]; |
18423 | 18571 | do{ |
18424 | 18572 | if(elementos[i].style){ |
... | ... | @@ -18439,26 +18587,31 @@ i3GEO.barraDeBotoes = { |
18439 | 18587 | var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
18440 | 18588 | if(elementos[elementos.length - 1].style.display == tipo) |
18441 | 18589 | {return;} |
18442 | - if(elementos.length > 0){ | |
18590 | + var nelementos = elementos.length; | |
18591 | + if(nelementos > 0){ | |
18443 | 18592 | //esconde o primeiro botao |
18444 | 18593 | var i = 0; |
18445 | 18594 | do{ |
18446 | - if(elementos[i].style){ | |
18447 | - if((elementos[i].style.display == "block") || (elementos[i].style.display == "inline") || (elementos[i].style.display == "")) | |
18448 | - {elementos[i].style.display="none";break;} | |
18595 | + var e = elementos[i]; | |
18596 | + if(e.style){ | |
18597 | + if((e.style.display == "block") || (e.style.display == "inline") || (e.style.display == "")){ | |
18598 | + if(e.id == "") | |
18599 | + {e.style.display="none";break;} | |
18600 | + } | |
18449 | 18601 | } |
18450 | 18602 | var i = i + 1; |
18451 | 18603 | } |
18452 | - while(i < elementos.length) | |
18604 | + while(i < nelementos) | |
18453 | 18605 | //mostra o último botao |
18454 | - var i = elementos.length-1; | |
18606 | + var i = nelementos-1; | |
18455 | 18607 | var mostra = elementos[i]; |
18456 | 18608 | do{ |
18457 | - if(elementos[i].style){ | |
18458 | - if(elementos[i].style.display == tipo) | |
18609 | + var e = elementos[i]; | |
18610 | + if(e.style){ | |
18611 | + if(e.style.display == tipo) | |
18459 | 18612 | {break;} |
18460 | - if(elementos[i].style.display == "none") | |
18461 | - {var mostra = elementos[i];} | |
18613 | + if(e.style.display == "none") | |
18614 | + {var mostra = e;} | |
18462 | 18615 | } |
18463 | 18616 | var i = i - 1; |
18464 | 18617 | } |
... | ... | @@ -19448,7 +19601,7 @@ i3GEO.gadgets = { |
19448 | 19601 | */ |
19449 | 19602 | PARAMETROS: { |
19450 | 19603 | "mostraCoordenadasUTM": |
19451 | - {idhtml:"mostraUTM"}, | |
19604 | + {idhtml:"localizarxy"}, | |
19452 | 19605 | "mostraCoordenadasGEO": |
19453 | 19606 | {idhtml:"localizarxy"}, |
19454 | 19607 | "mostraInserirKml": |
... | ... | @@ -19479,7 +19632,11 @@ i3GEO.gadgets = { |
19479 | 19632 | está estacionado sobre o mapa. Por default isso já é feito pelo i3Geo. |
19480 | 19633 | |
19481 | 19634 | Se você não quer essa função no mapa, elimine o elemento HTML existente no mapa que contenha o |
19482 | - id definido em i3GEO.gadgets.PARAMETROS (mostraUTM) ou altere a variável i3GEO.eventos.MOUSEPARADO | |
19635 | + id definido em i3GEO.gadgets.PARAMETROS (mostraCoordenadasUTM) ou altere a variável i3GEO.eventos.MOUSEPARADO | |
19636 | + | |
19637 | + Se i3GEO.gadgets.mostraCoordenadasUTM.idhtml for igual a i3GEO.gadgets.mostraCoordenadasGEO.idhtml | |
19638 | + | |
19639 | + os valores mostrados serão intercalados entre GEO e UTM | |
19483 | 19640 | |
19484 | 19641 | Parameters: |
19485 | 19642 | |
... | ... | @@ -19505,11 +19662,15 @@ i3GEO.gadgets = { |
19505 | 19662 | if($i("wdoca")){return;} |
19506 | 19663 | var tempUtm = function(retorno){ |
19507 | 19664 | //alert(retorno) |
19508 | - setTimeout("$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';",3400); | |
19665 | + var funcao = ""; | |
19666 | + funcao += "$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"; | |
19667 | + funcao += "if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml)"; | |
19668 | + funcao += "{$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.gadgets.mostraCoordenadasGEO();}"; | |
19669 | + setTimeout(funcao,3400); | |
19509 | 19670 | var temp = $i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml); |
19510 | 19671 | if(retorno.data){ |
19511 | 19672 | temp.style.display="block"; |
19512 | - temp.innerHTML = "UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" datum="+retorno.data.datum; | |
19673 | + temp.innerHTML = "UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" "+retorno.data.datum; | |
19513 | 19674 | //return (retorno.data); |
19514 | 19675 | } |
19515 | 19676 | }; |
... | ... | @@ -20190,7 +20351,10 @@ i3GEO.gadgets = { |
20190 | 20351 | else |
20191 | 20352 | {var conta = 0;} |
20192 | 20353 | for(var nomeMenu in i3GEO.configura.oMenuData.submenus){ |
20354 | + if(i3GEO.configura.oMenuData.submenus[nomeMenu] != "") | |
20193 | 20355 | i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata: i3GEO.configura.oMenuData.submenus[nomeMenu]}); |
20356 | + //alert(nomeMenu) | |
20357 | + //alert(i3GEO.configura.oMenuData.submenus[nomeMenu].length) | |
20194 | 20358 | var conta=conta+1; |
20195 | 20359 | } |
20196 | 20360 | } | ... | ... |
classesjs/i3geo_tudo_compacto.js.php
... | ... | @@ -3943,13 +3943,14 @@ i3GEO = { |
3943 | 3943 | {menos = menos + parseInt($i("ferramentas").style.width);} |
3944 | 3944 | var novow = parseInt(screen.availWidth) - diminuix; |
3945 | 3945 | var novoh = parseInt(screen.availHeight) - diminuiy; |
3946 | + window.resizeTo(screen.availWidth,screen.availHeight); | |
3947 | + window.moveTo(0,0); | |
3948 | + | |
3946 | 3949 | //o try aqui é necessário por conta do uso possível do i3geo em um iframe |
3947 | 3950 | try{ |
3948 | - if (document.body.style.width < 400){ | |
3949 | - var novow = parseInt(screen.availWidth) - diminuix; | |
3950 | - var novoh = parseInt(screen.availHeight) - diminuiy; | |
3951 | - window.resizeTo(screen.availWidth,screen.availHeight); | |
3952 | - window.moveTo(0,0); | |
3951 | + if (novow < 800){ | |
3952 | + var novow = 800; | |
3953 | + var novoh = 600; | |
3953 | 3954 | } |
3954 | 3955 | } |
3955 | 3956 | catch(e){var e = "";} |
... | ... | @@ -3957,19 +3958,15 @@ i3GEO = { |
3957 | 3958 | document.body.style.height = novoh; |
3958 | 3959 | var w = novow - menos - diminuix; |
3959 | 3960 | var h = novoh - diminuiy; |
3960 | - if (document.getElementById("corpoMapa")){ | |
3961 | - if (document.getElementById("corpoMapa").style.width){ | |
3962 | - var w = parseInt(document.getElementById("corpoMapa").style.width); | |
3963 | - var h = parseInt(document.getElementById("corpoMapa").style.width); | |
3964 | - } | |
3965 | - if (document.getElementById("corpoMapa").style.height) | |
3966 | - {var h = parseInt(document.getElementById("corpoMapa").style.height);} | |
3967 | - } | |
3968 | 3961 | var temp = $i("corpoMapa"); |
3969 | - if(temp){ | |
3962 | + if (temp){ | |
3970 | 3963 | if(temp.style){ |
3971 | - if(temp.style.width){var w = parseInt(temp.style.width);} | |
3972 | - if(temp.style.height){var h = parseInt(temp.style.height);} | |
3964 | + if (temp.style.width){ | |
3965 | + var w = parseInt(temp.style.width); | |
3966 | + var h = parseInt(temp.style.width); | |
3967 | + } | |
3968 | + if (temp.style.height) | |
3969 | + {var h = parseInt(temp.style.height);} | |
3973 | 3970 | } |
3974 | 3971 | } |
3975 | 3972 | if($i("contemImg")){ |
... | ... | @@ -4173,6 +4170,11 @@ i3GEO = { |
4173 | 4170 | dessa chamada é armazenada em i3GEO.parametros |
4174 | 4171 | */ |
4175 | 4172 | atualiza: function(retorno){ |
4173 | + if(arguments.length == 0){ | |
4174 | + i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
4175 | + i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
4176 | + return; | |
4177 | + } | |
4176 | 4178 | //verifica se o parâmetro retorno existe, caso contrário, |
4177 | 4179 | //faz a chamada ao programa PHP para obter os parâmetros |
4178 | 4180 | try{ |
... | ... | @@ -4184,8 +4186,14 @@ i3GEO = { |
4184 | 4186 | catch(e){} |
4185 | 4187 | var erro = function(){ |
4186 | 4188 | var legimagem = ""; |
4187 | - i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
4188 | - i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
4189 | + var c = confirm("Ocorreu um erro, quer tentar novamente?"); | |
4190 | + if(c){ | |
4191 | + i3GEO.janela.abreAguarde("ajaxiniciaParametros",$trad("o1")+" atualizando"); | |
4192 | + i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem); | |
4193 | + } | |
4194 | + else{ | |
4195 | + i3GEO.janela.fechaAguarde(); | |
4196 | + } | |
4189 | 4197 | } |
4190 | 4198 | try{eval(retorno.data.variaveis);} |
4191 | 4199 | catch(e){erro.call();return;} |
... | ... | @@ -5110,7 +5118,7 @@ i3GEO.util = { |
5110 | 5118 | /* |
5111 | 5119 | Function: desaparece |
5112 | 5120 | |
5113 | - Aplica efeito de desaparecimento suave de um objetov | |
5121 | + Aplica efeito de desaparecimento suave de um objeto | |
5114 | 5122 | |
5115 | 5123 | Parameters: |
5116 | 5124 | |
... | ... | @@ -5151,6 +5159,7 @@ i3GEO.util = { |
5151 | 5159 | {obj.style.opacity= 1;} |
5152 | 5160 | if(removeobj){ |
5153 | 5161 | var p = obj.parentNode; |
5162 | + if(p) | |
5154 | 5163 | p.removeChild(obj); |
5155 | 5164 | } |
5156 | 5165 | } |
... | ... | @@ -11194,10 +11203,6 @@ i3GEO.mapa = { |
11194 | 11203 | imagemyi = 0; |
11195 | 11204 | imagemxref = 0; |
11196 | 11205 | imagemyref = 0; |
11197 | - var dc = $i("i3geo"); | |
11198 | - if(!dc){return;} | |
11199 | - if (dc.style.left){imagemxi += parseInt(dc.style.left);} | |
11200 | - if (dc.style.top){imagemyi += parseInt(dc.style.top);} | |
11201 | 11206 | var dc = $i(elemento); |
11202 | 11207 | while ((dc.offsetParent) && (dc.offsetParent.id != "i3geo")){ |
11203 | 11208 | dc = dc.offsetParent; |
... | ... | @@ -11209,8 +11214,12 @@ i3GEO.mapa = { |
11209 | 11214 | c.style.position="absolute"; |
11210 | 11215 | $left(i3GEO.interface.IDCORPO,imagemxi); |
11211 | 11216 | $top(i3GEO.interface.IDCORPO,imagemyi); |
11212 | - if ($i("i3geo").style.left){$left(i3GEO.interface.IDCORPO,imagemxi + parseInt($i("i3geo").style.left));} | |
11213 | - if ($i("i3geo").style.top){$top(i3GEO.interface.IDCORPO,imagemyi + parseInt($i("i3geo").style.top));} | |
11217 | + /* | |
11218 | + if($i("i3geo")){ | |
11219 | + if ($i("i3geo").style.left){$left(i3GEO.interface.IDCORPO,imagemxi + parseInt($i("i3geo").style.left));} | |
11220 | + if ($i("i3geo").style.top){$top(i3GEO.interface.IDCORPO,imagemyi + parseInt($i("i3geo").style.top));} | |
11221 | + } | |
11222 | + */ | |
11214 | 11223 | } |
11215 | 11224 | } |
11216 | 11225 | catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao"+e);} |
... | ... | @@ -12580,6 +12589,32 @@ i3GEO.maparef = { |
12580 | 12589 | */ |
12581 | 12590 | fatorZoomDinamico: -3, |
12582 | 12591 | /* |
12592 | + Property: TRANSICAOSUAVE | |
12593 | + | |
12594 | + Altera a transparência quando o mouse sobrepõe ao mapa de referência e quando sai | |
12595 | + | |
12596 | + Type: | |
12597 | + {boolean} | |
12598 | + | |
12599 | + Default: | |
12600 | + {true} | |
12601 | + */ | |
12602 | + TRANSICAOSUAVE: true, | |
12603 | + /* | |
12604 | + Property: TRANSPARENCIA | |
12605 | + | |
12606 | + Valor da transparência máxima utilizada quando TRANSICAOSUAVE for igual a true. | |
12607 | + | |
12608 | + Varia de 0 a 100, sendo 0 a menor transparência | |
12609 | + | |
12610 | + Type: | |
12611 | + {numeric} | |
12612 | + | |
12613 | + Default: | |
12614 | + {30} | |
12615 | + */ | |
12616 | + TRANSPARENCIA: 50, | |
12617 | + /* | |
12583 | 12618 | Property: TOP |
12584 | 12619 | |
12585 | 12620 | Posição da janela em relação ao topo do mapa |
... | ... | @@ -12604,6 +12639,24 @@ i3GEO.maparef = { |
12604 | 12639 | //YAHOO.log("initJanelaRef", "i3geo"); |
12605 | 12640 | if (!$i("i3geo_winRef")){ |
12606 | 12641 | var novoel = document.createElement("div"); |
12642 | + if(i3GEO.maparef.TRANSICAOSUAVE){ | |
12643 | + if (navm) | |
12644 | + {novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')';} | |
12645 | + else | |
12646 | + {novoel.style.opacity= i3GEO.maparef.TRANSPARENCIA / 100;} | |
12647 | + novoel.onmouseover = function(){ | |
12648 | + if (navm) | |
12649 | + {novoel.style.filter='alpha(opacity=100)';} | |
12650 | + else | |
12651 | + {novoel.style.opacity= 1;} | |
12652 | + }; | |
12653 | + novoel.onmouseout = function(){ | |
12654 | + if (navm) | |
12655 | + {novoel.style.filter='alpha(opacity='+i3GEO.maparef.TRANSPARENCIA+')';} | |
12656 | + else | |
12657 | + {novoel.style.opacity= i3GEO.maparef.TRANSPARENCIA / 100;} | |
12658 | + } | |
12659 | + } | |
12607 | 12660 | novoel.id = "i3geo_winRef"; |
12608 | 12661 | novoel.style.display="none"; |
12609 | 12662 | novoel.style.borderColor="gray"; |
... | ... | @@ -18079,6 +18132,41 @@ i3GEO.barraDeBotoes = { |
18079 | 18132 | */ |
18080 | 18133 | BARRAS: new Array(), |
18081 | 18134 | /* |
18135 | + Property: AUTOALTURA | |
18136 | + | |
18137 | + Ajusta automaticamente a altura das barras conforme a altura do mapa. | |
18138 | + | |
18139 | + Type: | |
18140 | + {boolean} | |
18141 | + */ | |
18142 | + AUTOALTURA: false, | |
18143 | + /* | |
18144 | + Property: TRANSICAOSUAVE | |
18145 | + | |
18146 | + Altera a transparência das barras quando o mouse sobrepõe a barra e quando sai da barra | |
18147 | + | |
18148 | + Type: | |
18149 | + {boolean} | |
18150 | + | |
18151 | + Default: | |
18152 | + {true} | |
18153 | + */ | |
18154 | + TRANSICAOSUAVE: true, | |
18155 | + /* | |
18156 | + Property: TRANSPARENCIA | |
18157 | + | |
18158 | + Valor da transparência máxima utilizada quando TRANSICAOSUAVE for igual a true. | |
18159 | + | |
18160 | + Varia de 0 a 100, sendo 0 a menor transparência | |
18161 | + | |
18162 | + Type: | |
18163 | + {numeric} | |
18164 | + | |
18165 | + Default: | |
18166 | + {30} | |
18167 | + */ | |
18168 | + TRANSPARENCIA: 50, | |
18169 | + /* | |
18082 | 18170 | Property: PERMITEFECHAR |
18083 | 18171 | |
18084 | 18172 | Mostra o botão para fechar as barras ou não. |
... | ... | @@ -18275,12 +18363,21 @@ i3GEO.barraDeBotoes = { |
18275 | 18363 | novoel.style.display="block"; |
18276 | 18364 | novoel.style.border="1px solid gray"; |
18277 | 18365 | novoel.style.background="white"; |
18278 | - if (navm) | |
18279 | - {novoel.style.filter='alpha(opacity=90)';} | |
18280 | - else | |
18281 | - {novoel.style.opacity= .85;} | |
18282 | - //var temp = '<div class="hd" > </div>'; | |
18283 | - //temp += '<div class="bd" style="background-color:rgb(250,250,250);width='+wj+'px" >'; | |
18366 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
18367 | + if (navm){ | |
18368 | + | |
18369 | + novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')'; | |
18370 | + } | |
18371 | + else{ | |
18372 | + novoel.style.opacity= i3GEO.barraDeBotoes.TRANSPARENCIA / 100; | |
18373 | + } | |
18374 | + } | |
18375 | + else{ | |
18376 | + if (navm) | |
18377 | + {novoel.style.filter='alpha(opacity=90)';} | |
18378 | + else | |
18379 | + {novoel.style.opacity= .85;} | |
18380 | + } | |
18284 | 18381 | var temp = ""; |
18285 | 18382 | if (barraZoom == true) |
18286 | 18383 | { |
... | ... | @@ -18297,19 +18394,63 @@ i3GEO.barraDeBotoes = { |
18297 | 18394 | //objposicaocursor.imgx = 0; |
18298 | 18395 | if($i("i3geo_rosa")) |
18299 | 18396 | {$i("i3geo_rosa").style.display="none";} |
18397 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
18398 | + if (navm) | |
18399 | + {novoel.style.filter='alpha(opacity=90)';} | |
18400 | + else | |
18401 | + {novoel.style.opacity= .85;} | |
18402 | + } | |
18300 | 18403 | }; |
18404 | + novoel.onmouseout = function(){ | |
18405 | + if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | |
18406 | + if (navm) | |
18407 | + {novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.TRANSPARENCIA+')';} | |
18408 | + else | |
18409 | + {novoel.style.opacity= i3GEO.barraDeBotoes.TRANSPARENCIA / 100;} | |
18410 | + } | |
18411 | + } | |
18301 | 18412 | document.body.appendChild(novoel); |
18302 | 18413 | //copia os botoes do HTML para a janela |
18303 | 18414 | if ($i(idconteudo)) |
18304 | 18415 | { |
18305 | 18416 | $i(idconteudonovo+"_").innerHTML = $i(idconteudo).innerHTML; |
18306 | 18417 | $i(idconteudo).innerHTML = ""; |
18418 | + //faz o cálculo do número de botões que devem ficar visíveis em função do tamanho da barra | |
18419 | + if(i3GEO.barraDeBotoes.AUTOALTURA){ | |
18420 | + var elementos = $i(idconteudonovo+"_").getElementsByTagName("img"); | |
18421 | + if(elementos[0].id == "sobeferramentas"){ | |
18422 | + try{ | |
18423 | + var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); | |
18424 | + var alturadisponivel = i3GEO.parametros.h - 4; | |
18425 | + var numerobotoes = parseInt(alturadisponivel / 30); | |
18426 | + var nelementos = elementos.length; | |
18427 | + var i = 0; | |
18428 | + do{ | |
18429 | + elementos[i].style.display = "none"; | |
18430 | + var i = i + 1; | |
18431 | + } | |
18432 | + while(i < nelementos) | |
18433 | + var i = 0; | |
18434 | + do{ | |
18435 | + elementos[i].style.display = "inline"; | |
18436 | + var i = i + 1; | |
18437 | + } | |
18438 | + while(i < numerobotoes) | |
18439 | + }catch(e){} | |
18440 | + if(i == numerobotoes){ | |
18441 | + if($i("sobeferramentas")){$i("sobeferramentas").style.display="none";} | |
18442 | + if($i("desceferramentas")){$i("desceferramentas").style.display="none";} | |
18443 | + } | |
18444 | + } | |
18445 | + } | |
18307 | 18446 | } |
18308 | 18447 | YAHOO.namespace("janelaBotoes.xp"); |
18309 | - YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
18448 | + if(i3GEO.barraDeBotoes.AUTOALTURA == false) | |
18449 | + YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
18450 | + else | |
18451 | + YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {height:i3GEO.parametros.h - 4,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false } ); | |
18310 | 18452 | if((barraZoom == true) && $i("img")){ |
18311 | 18453 | i3GEO.barraDeBotoes.ativaBarraDeZoom(); |
18312 | - | |
18313 | 18454 | verticalSlider = YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom", 0, 70); |
18314 | 18455 | verticalSlider.onChange = function(offsetFromStart) |
18315 | 18456 | {g_fatordezoom = (offsetFromStart - 35) / 5;}; |
... | ... | @@ -18397,28 +18538,35 @@ i3GEO.barraDeBotoes = { |
18397 | 18538 | } |
18398 | 18539 | } |
18399 | 18540 | YAHOO.janelaBotoes.xp.panel.render(); |
18541 | + if(i3GEO.barraDeBotoes.AUTOALTURA == true){ | |
18542 | + var y = y - i3GEO.interface.BARRABOTOESTOP + 2; | |
18543 | + var x = x - 3; | |
18544 | + } | |
18400 | 18545 | YAHOO.janelaBotoes.xp.panel.moveTo(x,y); |
18401 | 18546 | if($i("sobeferramentas")){ |
18402 | 18547 | $i("sobeferramentas").onclick = function(){ |
18403 | 18548 | var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
18404 | - if(elementos[0].style.display == "inline") | |
18549 | + var nelementos = elementos.length; | |
18550 | + if(elementos[0].style.display == "inline" && elementos[0].id == "") | |
18551 | + {return;} | |
18552 | + if(elementos[1].style.display == "inline" && elementos[1].id == "") | |
18405 | 18553 | {return;} |
18406 | - if(elementos.length > 0){ | |
18554 | + if(nelementos > 0){ | |
18407 | 18555 | var mostra = elementos[0]; |
18408 | 18556 | var i = 0; |
18409 | 18557 | do{ |
18410 | 18558 | if(elementos[i].style){ |
18411 | - if(elementos[i].style.display == "inline") | |
18559 | + if(elementos[i].style.display == "inline" && elementos[i].id == "") | |
18412 | 18560 | {break;} |
18413 | - if(elementos[i].style.display == "none") | |
18561 | + if(elementos[i].style.display == "none" && elementos[i].id == "") | |
18414 | 18562 | {var mostra = elementos[i];} |
18415 | 18563 | } |
18416 | 18564 | var i = i + 1; |
18417 | 18565 | } |
18418 | - while(i < elementos.length) | |
18566 | + while(i < nelementos) | |
18419 | 18567 | mostra.style.display="inline"; |
18420 | 18568 | //esconde o último botao |
18421 | - var i = elementos.length - 1; | |
18569 | + var i = nelementos - 1; | |
18422 | 18570 | var mostra = elementos[i]; |
18423 | 18571 | do{ |
18424 | 18572 | if(elementos[i].style){ |
... | ... | @@ -18439,26 +18587,31 @@ i3GEO.barraDeBotoes = { |
18439 | 18587 | var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
18440 | 18588 | if(elementos[elementos.length - 1].style.display == tipo) |
18441 | 18589 | {return;} |
18442 | - if(elementos.length > 0){ | |
18590 | + var nelementos = elementos.length; | |
18591 | + if(nelementos > 0){ | |
18443 | 18592 | //esconde o primeiro botao |
18444 | 18593 | var i = 0; |
18445 | 18594 | do{ |
18446 | - if(elementos[i].style){ | |
18447 | - if((elementos[i].style.display == "block") || (elementos[i].style.display == "inline") || (elementos[i].style.display == "")) | |
18448 | - {elementos[i].style.display="none";break;} | |
18595 | + var e = elementos[i]; | |
18596 | + if(e.style){ | |
18597 | + if((e.style.display == "block") || (e.style.display == "inline") || (e.style.display == "")){ | |
18598 | + if(e.id == "") | |
18599 | + {e.style.display="none";break;} | |
18600 | + } | |
18449 | 18601 | } |
18450 | 18602 | var i = i + 1; |
18451 | 18603 | } |
18452 | - while(i < elementos.length) | |
18604 | + while(i < nelementos) | |
18453 | 18605 | //mostra o último botao |
18454 | - var i = elementos.length-1; | |
18606 | + var i = nelementos-1; | |
18455 | 18607 | var mostra = elementos[i]; |
18456 | 18608 | do{ |
18457 | - if(elementos[i].style){ | |
18458 | - if(elementos[i].style.display == tipo) | |
18609 | + var e = elementos[i]; | |
18610 | + if(e.style){ | |
18611 | + if(e.style.display == tipo) | |
18459 | 18612 | {break;} |
18460 | - if(elementos[i].style.display == "none") | |
18461 | - {var mostra = elementos[i];} | |
18613 | + if(e.style.display == "none") | |
18614 | + {var mostra = e;} | |
18462 | 18615 | } |
18463 | 18616 | var i = i - 1; |
18464 | 18617 | } |
... | ... | @@ -19448,7 +19601,7 @@ i3GEO.gadgets = { |
19448 | 19601 | */ |
19449 | 19602 | PARAMETROS: { |
19450 | 19603 | "mostraCoordenadasUTM": |
19451 | - {idhtml:"mostraUTM"}, | |
19604 | + {idhtml:"localizarxy"}, | |
19452 | 19605 | "mostraCoordenadasGEO": |
19453 | 19606 | {idhtml:"localizarxy"}, |
19454 | 19607 | "mostraInserirKml": |
... | ... | @@ -19479,7 +19632,11 @@ i3GEO.gadgets = { |
19479 | 19632 | está estacionado sobre o mapa. Por default isso já é feito pelo i3Geo. |
19480 | 19633 | |
19481 | 19634 | Se você não quer essa função no mapa, elimine o elemento HTML existente no mapa que contenha o |
19482 | - id definido em i3GEO.gadgets.PARAMETROS (mostraUTM) ou altere a variável i3GEO.eventos.MOUSEPARADO | |
19635 | + id definido em i3GEO.gadgets.PARAMETROS (mostraCoordenadasUTM) ou altere a variável i3GEO.eventos.MOUSEPARADO | |
19636 | + | |
19637 | + Se i3GEO.gadgets.mostraCoordenadasUTM.idhtml for igual a i3GEO.gadgets.mostraCoordenadasGEO.idhtml | |
19638 | + | |
19639 | + os valores mostrados serão intercalados entre GEO e UTM | |
19483 | 19640 | |
19484 | 19641 | Parameters: |
19485 | 19642 | |
... | ... | @@ -19505,11 +19662,15 @@ i3GEO.gadgets = { |
19505 | 19662 | if($i("wdoca")){return;} |
19506 | 19663 | var tempUtm = function(retorno){ |
19507 | 19664 | //alert(retorno) |
19508 | - setTimeout("$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';",3400); | |
19665 | + var funcao = ""; | |
19666 | + funcao += "$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"; | |
19667 | + funcao += "if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml)"; | |
19668 | + funcao += "{$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.gadgets.mostraCoordenadasGEO();}"; | |
19669 | + setTimeout(funcao,3400); | |
19509 | 19670 | var temp = $i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml); |
19510 | 19671 | if(retorno.data){ |
19511 | 19672 | temp.style.display="block"; |
19512 | - temp.innerHTML = "UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" datum="+retorno.data.datum; | |
19673 | + temp.innerHTML = "UTM: x="+retorno.data.x+" y="+retorno.data.y+" zona="+retorno.data.zona+" "+retorno.data.datum; | |
19513 | 19674 | //return (retorno.data); |
19514 | 19675 | } |
19515 | 19676 | }; |
... | ... | @@ -20190,7 +20351,10 @@ i3GEO.gadgets = { |
20190 | 20351 | else |
20191 | 20352 | {var conta = 0;} |
20192 | 20353 | for(var nomeMenu in i3GEO.configura.oMenuData.submenus){ |
20354 | + if(i3GEO.configura.oMenuData.submenus[nomeMenu] != "") | |
20193 | 20355 | i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata: i3GEO.configura.oMenuData.submenus[nomeMenu]}); |
20356 | + //alert(nomeMenu) | |
20357 | + //alert(i3GEO.configura.oMenuData.submenus[nomeMenu].length) | |
20194 | 20358 | var conta=conta+1; |
20195 | 20359 | } |
20196 | 20360 | } | ... | ... |
exemplos/mashup1.htm
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <meta http-equiv="Category" content="I3Geo Mapa interativo MMA"> |
5 | 5 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
6 | 6 | <title>MMA - Mapa interativo</title> |
7 | -<script type="text/javascript" src="../classesjs/i3geo.js"></script> | |
7 | +<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | |
8 | 8 | |
9 | 9 | </head> |
10 | 10 | <body style="background-color:rgb(200,200,200);z-index:0;" class=yui-skin-sam > | ... | ... |
exemplos/mashup4.htm
... | ... | @@ -7,18 +7,17 @@ |
7 | 7 | <script type="text/javascript" src="../classesjs/i3geo.js"></script> |
8 | 8 | </head> |
9 | 9 | <body style="background-color:rgb(200,200,200);z-index:0;" class=yui-skin-sam > |
10 | + | |
10 | 11 | <div style=position:absolute;left:10px;top:50px;width:200px; > |
11 | 12 | <p style=text-align:left;font-size:12pt >Você pode chamar o I3Geo de dentro de uma outra página criando o DIV com id=i3geo<br><br> |
12 | 13 | <p style=text-align:left;font-size:12pt >Para chamar a página não é necessário rodar o i3geo/ms_criamapa.php.<br><br> |
13 | 14 | <p style=text-align:left;font-size:12pt >Nem todos os elementos precisam estar no mapa.<br><br> |
14 | 15 | <p style=text-align:left;font-size:12pt >Você pode esconder ou mudar as ferramentas de lugar.<br><br> |
15 | 16 | </div> |
16 | -<div id=i3geo > | |
17 | -<p style=text-align:center;font-size:12pt >Este é um exemplo de inclusão do I3Geo dentro de uma página qualquer.<br><br> | |
18 | 17 | |
19 | -<center> | |
18 | +<div id=i3geo style="left:300px;top:100px;position:absolute" > | |
19 | + | |
20 | 20 | <table id='mst' style=display:none width=100% cellspacing='0'> |
21 | -<!-- Inclui o menu suspenso. Se vc não quiser o menu, é só comentar --> | |
22 | 21 | <tr style="border:0px"><td style="background-image:url('../imagens/visual/default/cabeca.png');height:10px"></td></tr> |
23 | 22 | <tr> |
24 | 23 | <td> |
... | ... | @@ -59,7 +58,7 @@ |
59 | 58 | <tr style="border:0px"><td style="background-image:url('../imagens/visual/default/rodape.png');height:10px"></td></tr> |
60 | 59 | </table> |
61 | 60 | <a style=text-align:center;color:white href="mailto:edmar.moretti@mma.gov.br">Críticas e sugestões</a> |
62 | -</center> | |
61 | + | |
63 | 62 | </div> |
64 | 63 | <script type="text/javascript"> |
65 | 64 | i3GEO.configura.locaplic = "http://"+window.location.host+"/i3geo"; | ... | ... |