Commit c2cc08f291abd2ab0a4b2ce8fc3275f1cd539cbd
1 parent
0ed2a2d8
Exists in
master
and in
7 other branches
Nova opção de iniciallização da interface que possibilita a inicialização do i3g…
…eo diretamente do html, sem passar primeiro pelo ms_criamapa.php. Veja no diretório exemplos a interface mashup.htm. Os parâmetros de inicialização podem ser passados como uma variável de inicialização javascript. Os htmls das interfaces existentes foram revistos acrescentando-se o id=i3geo no elemento DOM onde o mapa será inserido.
Showing
18 changed files
with
402 additions
and
546 deletions
Show diff stats
aplicmap/admin.htm
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | <link rel="stylesheet" type="text/css" href="../css/panel-aqua.css" /> |
12 | 12 | --> |
13 | 13 | </head> |
14 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1"> | |
14 | +<body id=i3geo onmouseover="javascript:this.onmousemove=processevent1"> | |
15 | 15 | <center> |
16 | 16 | <table id='mst' width=100% cellspacing='0'> |
17 | 17 | <!-- Inclui o menu suspenso. Se vc não quiser o menu, é só comentar--> | ... | ... |
aplicmap/geral.htm
... | ... | @@ -13,7 +13,7 @@ arquivos não compactados, bastando substituir por i3geonaocompacto --> |
13 | 13 | <link rel="stylesheet" type="text/css" href="../css/panel-aqua.css" /> |
14 | 14 | --> |
15 | 15 | </head> |
16 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1"> | |
16 | +<body id=i3geo > | |
17 | 17 | <center> |
18 | 18 | <table id='mst' style=display:none width=100% cellspacing='0'> |
19 | 19 | <!-- Inclui o menu suspenso. Se vc não quiser o menu, é só comentar --> |
... | ... | @@ -400,6 +400,19 @@ g_3dmap = "3dmap.map"; |
400 | 400 | |
401 | 401 | g_embedLegenda = "nao"; |
402 | 402 | */ |
403 | + | |
404 | +/* | |
405 | +Variable: g_mashuppar | |
406 | + | |
407 | +Parâmetros de inicialização que podem ser utilizados na interface mashup. | |
408 | + | |
409 | +Os parâmetros são os mesmos que podem ser utilizados quando o i3geo é inicializado pelo ms_criamapa.php. | |
410 | + | |
411 | +Exemplo: g_mashuppar = "&pontos=-54 -12&temasa=biomas&layers=biomas" | |
412 | + | |
413 | +g_mashuppar = "&mapext=-53 -26 -42 -18"; | |
414 | +*/ | |
415 | + | |
403 | 416 | /* |
404 | 417 | Variable: g_mensagempadrao |
405 | 418 | ... | ... |
aplicmap/geral3.htm
... | ... | @@ -1,466 +0,0 @@ |
1 | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 | -<html> | |
3 | -<head> | |
4 | -<meta http-equiv="Category" content="I3Geo Mapa interativo MMA"> | |
5 | -<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
6 | -<title>MMA - Mapa interativo</title> | |
7 | - | |
8 | -<!-- Leitura dos programas javaScript e estilos individualmente. Pode-se ler os | |
9 | -arquivos não compactados, bastando substituir por i3geonaocompacto --> | |
10 | -<script type="text/javascript" src="../classesjs/i3geo.js"></script> | |
11 | - | |
12 | -<!-- formatação alternativa das janelas internas, para usar é só descomentar | |
13 | -<link rel="stylesheet" type="text/css" href="../css/panel-aqua.css" /> | |
14 | ---> | |
15 | - | |
16 | -</head> | |
17 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1"> | |
18 | -<center> | |
19 | -<table id='mst' style=display:none width=100% cellspacing='0'> | |
20 | -<!-- Inclui o menu suspenso. Se vc não quiser o menu, é só comentar --> | |
21 | -<tr><td colspan=3 class=verdeescuro style="text-align:right;"> | |
22 | - <div id="menus" class="yuimenubar" > | |
23 | - </div> | |
24 | -</td></tr> | |
25 | -<tr> | |
26 | -<td title="libera guias" class=tdclara id=encolheFerramentas style="vertical-align:top;width:5px;text-align:left;"></td> | |
27 | - <td class=tdbranca id=contemFerramentas style="vertical-align:top;width:268px;text-align:left;"> | |
28 | - <table width=100% cellspacing=0 cellpadding=0 > | |
29 | - <tr><td style="border-bottom:1px solid rgb(230,230,230)"> | |
30 | - <!-- Guias principais, não mude o ID, apenas o nome se for desejado --> | |
31 | - <div class=verdeescuro style="top:0px;cursor:pointer"> | |
32 | - <div id=guia1 class=guia value="Mostra os temas atualmente inseridos no mapa e que podem estar visíveis ou não." > Temas </div> | |
33 | - <div id=guia2 class=guia value="Mostra a lista de temas disponíveis no servidor de dados, possibilitando que novos temas sejam adicionados ao mapa."> Adiciona </div> | |
34 | - <div id=guia4 class=guia value="Mostra a legnda do mapa atual." > Legenda </div> | |
35 | - <div id=guia5 class=guia value="Lista mapas já preparados, com temáticas específicas,que podem ser abertos no I3Geo"> Mapas </div> | |
36 | - </div> | |
37 | - </td></tr> | |
38 | - </table> | |
39 | - <!-- Esta div acrescenta a lista de propriedades do mapa | |
40 | - <div id=listaPropriedades ></div> | |
41 | - --> | |
42 | - <!-- Esta div acrescenta a opção de busca rápida | |
43 | - <div id=buscaRapida ></div> | |
44 | - --> | |
45 | - <div id='guia1obj' ><div id=buscaRapida ></div><div id=listaPropriedades ></div><div id=listaTemas ></div></div> | |
46 | - <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /></div> | |
47 | - <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> | |
48 | - <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> | |
49 | - </td> | |
50 | - <td class=verdeclaro style="vertical-align:top;border-width:0px;"> | |
51 | - <table width="100%" style="vertical-align:top;"> | |
52 | - <!-- Corpo do mapa. Pode ser reposicionado, mas não mude os IDs. Se vc quiser que o mapa tenha um tamanho específico, inclua o estilo, exemplo, style=width:300px;height:300px --> | |
53 | - <tr><td class=verdeclaro id=contemImg > | |
54 | - <div id=corpoMapa style="background-image:url('../imagens/i3geo1bw.jpg');"></div> | |
55 | - </td></tr> | |
56 | - </table> | |
57 | - </td> | |
58 | - </tr> | |
59 | -<!-- Mostra as coordenadas conforme o mouse é movimentado | |
60 | - <div class=pcenter10 id='longlat'>Longitude e latitude</div> | |
61 | ---> | |
62 | -<!-- Escala gráfica. Pode ser excluída. | |
63 | - <div id="escalaGrafica" style="text-align:left"></div> | |
64 | ---> | |
65 | -<!--- vc pode optar por colocar mensagens de ajuda em algum lugar | |
66 | -<tr><td colspan=3 ><div id=ajuda class=verdeescuro style="text-align:left;" >I3Geo</div></td></tr> | |
67 | ---> | |
68 | -<tr> | |
69 | - <td colspan=2 class=verdeclaro ><div id=visual ></div> | |
70 | - </td> | |
71 | - <td class=verdeclaro > | |
72 | - <table width=100% ><tr> | |
73 | - <td class=verdeclaro ><div id=lugarquadros ></div></td> | |
74 | - <td class=verdeclaro ><div id=localizarxy >Aguarde...</div></td> | |
75 | - <td class=verdeclaro ><div id=escala ></div></td> | |
76 | - </tr></table> | |
77 | - </td> | |
78 | -</tr> | |
79 | -</table> | |
80 | -<a style=text-align:center;color:white href="mailto:edmar.moretti@mma.gov.br">Críticas e sugestões</a> | |
81 | -</center> | |
82 | -<!-- barra de botoes que serão incluídos na janela móvel de navegação --> | |
83 | -<div id=barraDeBotoes1 style='display:none'> | |
84 | - <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> | |
85 | - <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> | |
86 | - <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> | |
87 | - <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> | |
88 | - <table title="extensao" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="extensao" alt="" src="../imagens/branco.gif" id="exten"/></td></tr></table> | |
89 | - <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> | |
90 | - <table title="imprimir" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="imprimir" alt="" src="../imagens/branco.gif" id='imprimir'/></td></tr></table> | |
91 | - <table style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'></td></tr></table> | |
92 | -</div> | |
93 | -<div id=barraDeBotoes2 style='display:none'> | |
94 | - <table title="reinicia" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="reinicia" alt="" src="../imagens/branco.gif" id='reinicia'/></td></tr></table> | |
95 | - <table title="referencia" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="referencia" alt="" src="../imagens/branco.gif" id='referencia'/></td></tr></table> | |
96 | - <table title="insere xy" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="insere xy" alt="" src="../imagens/branco.gif" id='inserexy'/></td></tr></table> | |
97 | - <table title="insere grafico" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="insere grafico" alt="" src="../imagens/branco.gif" id='inseregrafico'/></td></tr></table> | |
98 | - <table title="selecao" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="selecao" alt="" src="../imagens/branco.gif" id='selecao'/></td></tr></table> | |
99 | - <table title="texto" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="texto" alt="" src="../imagens/branco.gif" id='textofid'/></td></tr></table> | |
100 | - <table title="lente" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="lente" alt="" src="../imagens/branco.gif" id='lentei'/></td></tr></table> | |
101 | - <table title="scielo" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="scielo" alt="" src="../imagens/branco.gif" id='scielo'/></td></tr></table> | |
102 | - <table title="confluencias" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="confluencias" alt="" src="../imagens/branco.gif" id='confluence'/></td></tr></table> | |
103 | - <table title="busca na wikipedia" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="busca na wikipedia" alt="" src="../imagens/branco.gif" id='wiki'/></td></tr></table> | |
104 | - <table title="google" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="google" alt="" src="../imagens/branco.gif" id='google'/></td></tr></table> | |
105 | - <table id=botao3d title="3d - experimental" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="3d" alt="" src="../imagens/branco.gif" id='v3d'/></td></tr></table> | |
106 | - <table style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'></td></tr></table> | |
107 | -</div> | |
108 | -<!-- Variáveis globais e inicialização do mapa--> | |
109 | -<script type="text/javascript"> | |
110 | -/* | |
111 | -Title: Interface normal | |
112 | - | |
113 | -Abre o i3geo com todas as suas funcionalidades. | |
114 | - | |
115 | -File: geral.htm | |
116 | - | |
117 | -Exemplo: | |
118 | - | |
119 | -http://<host>/i3geo/ms_criamapa.php | |
120 | - | |
121 | -*/ | |
122 | -/* | |
123 | - Variable: g_locaplic | |
124 | - | |
125 | - Indica a localização correta do i3geo. | |
126 | - | |
127 | - É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
128 | -*/ | |
129 | -g_locaplic = "http://"+window.location.host+"/i3geo"; | |
130 | -/* | |
131 | - Variable: g_localimg | |
132 | - | |
133 | - Indica a localização correta das imagens. | |
134 | - | |
135 | - É utilizada para identificar o local correto onde estão as imagens que são utilizados. | |
136 | -*/ | |
137 | -g_localimg = "http://"+window.location.host+"/i3geo/imagens"; | |
138 | -/* | |
139 | - Variable: g_funcaoTip | |
140 | - | |
141 | - Função ajax que será executada para mostrar informações do tipo TIP. | |
142 | - | |
143 | - A função é executada pelo CPAINT e avaliada com "eval". | |
144 | - | |
145 | - Default: | |
146 | - | |
147 | - g_funcaoTip = "verificaTipDefault()"; | |
148 | -*/ | |
149 | - | |
150 | -/* | |
151 | - Variable: g_tempotip (opcional) | |
152 | - | |
153 | - Tempo utilizado para verificar se o mouse está parado. | |
154 | - | |
155 | - Se o mouse estiver parado, a função de mostrar tip é ativada. | |
156 | - | |
157 | - Default: | |
158 | - | |
159 | - g_tempotip = 1000; | |
160 | -*/ | |
161 | - | |
162 | -/* | |
163 | - Variable: g_tipotip | |
164 | - | |
165 | - Define como o tip será mostrado. | |
166 | - | |
167 | - Pode ser definida como "simples" ou "completo" | |
168 | - | |
169 | - Default: | |
170 | - | |
171 | - g_tipotip = "completo"; | |
172 | -*/ | |
173 | - | |
174 | -/* | |
175 | - Variable: g_tipoimagem | |
176 | - | |
177 | - Indica o tipo de filtro de imagem que está ativo. O filtro ativo é aplicado sobre a imagem toda a vez que o mapa é refeito. | |
178 | - | |
179 | - Default: | |
180 | - | |
181 | - g_tipoimagem = "nenhum"; | |
182 | -*/ | |
183 | - | |
184 | -/* | |
185 | - Variable: destacaTamanho | |
186 | - | |
187 | - Valor em pixel do retângulo de destaque de temas. | |
188 | - | |
189 | - Default: | |
190 | - | |
191 | - destacaTamanho = 75; | |
192 | -*/ | |
193 | - | |
194 | -/* | |
195 | - Variable: g_entorno | |
196 | - | |
197 | - Indica se o preenchimento do entorno do mapa está ou não ativo. | |
198 | - | |
199 | - Utilizado para criar o efeito de auto-preenchimento do mapa quando é executada a função pan. | |
200 | - | |
201 | - É alterada em uma opção específica no menu suspenso. | |
202 | - | |
203 | - Default: | |
204 | - | |
205 | - g_entorno = "nao"; | |
206 | -*/ | |
207 | - | |
208 | -/* | |
209 | - Variable: g_guiaativa | |
210 | - | |
211 | - Indica qual guia do mapa iniciará ativa. | |
212 | - | |
213 | - Default: | |
214 | - | |
215 | - g_guiaativa = "guia1"; | |
216 | -*/ | |
217 | - | |
218 | -/* | |
219 | - Variable: g_diminuixM | |
220 | - | |
221 | - Diminui a largura do mapa em pixels no caso do navegador ser o IE. | |
222 | - | |
223 | - Default: | |
224 | - | |
225 | - g_diminuixM = 20; | |
226 | -*/ | |
227 | - | |
228 | -/* | |
229 | - Variable: g_diminuixN | |
230 | - | |
231 | - Diminui a largura do mapa em pixels no caso do navegador ser o FF. | |
232 | - | |
233 | - Default: | |
234 | - | |
235 | - g_diminuixN = 20; | |
236 | -*/ | |
237 | - | |
238 | -/* | |
239 | - Variable: g_diminuiyM | |
240 | - | |
241 | - Diminui a altura do mapa em pixels no caso do navegador ser o IE. | |
242 | - | |
243 | - Default: | |
244 | - | |
245 | - g_diminuiyM = 150; | |
246 | -*/ | |
247 | - | |
248 | -/* | |
249 | - Variable: g_diminuiyN | |
250 | - | |
251 | - Diminui a altura do mapa em pixels no caso do navegador ser o FF. | |
252 | - | |
253 | - Default: | |
254 | - | |
255 | - g_diminuiyN = 120; | |
256 | -*/ | |
257 | - | |
258 | -/* | |
259 | - Variable: g_janelazoom | |
260 | - | |
261 | - Define se a barra de zoom será aberta no mapa. | |
262 | - | |
263 | - Default: | |
264 | - | |
265 | - g_janelazoom = "sim" | |
266 | -*/ | |
267 | - | |
268 | -/* | |
269 | - Variable: g_barraFerramentas1 | |
270 | - | |
271 | - Define se a barra de ferramentas 1 será mostrada | |
272 | - | |
273 | - Defaul: | |
274 | - | |
275 | - g_barraFerramentas1 = "sim" | |
276 | -*/ | |
277 | - | |
278 | -/* | |
279 | - Variable: g_barraFerramentas2 | |
280 | - | |
281 | - Define se a barra de ferramentas 2 será mostrada | |
282 | - | |
283 | - Defaul: | |
284 | - | |
285 | - g_barraFerramentas2 = "sim" | |
286 | -*/ | |
287 | - | |
288 | -/* | |
289 | - Variable: g_mapaRefDisplay | |
290 | - | |
291 | - Indica a visibilidade do mapa de referência na inicialização | |
292 | - | |
293 | - Pode ser "block" ou "none". | |
294 | -*/ | |
295 | -g_mapaRefDisplay = "block" | |
296 | - | |
297 | -/* | |
298 | - Variable: g_docaguias | |
299 | - | |
300 | - Variável que define se o mapa deve iniciar com as guias em janela ou não. | |
301 | - | |
302 | - Default: | |
303 | - | |
304 | - g_docaguias = "nao"; | |
305 | -*/ | |
306 | - | |
307 | -/* | |
308 | - Variable: g_downloadbase | |
309 | - | |
310 | - Variável que define se na guia 2 será mostrada a opção de download. | |
311 | - | |
312 | - Default: | |
313 | - | |
314 | - g_downloadbase = "sim"; | |
315 | -*/ | |
316 | - | |
317 | -/* | |
318 | - Variable: g_conectargeorss | |
319 | - | |
320 | - Variável que define se na guia 2 será mostrada a opção de conexão com GeoRSS. | |
321 | - | |
322 | - Default: | |
323 | - | |
324 | - g_conectargeorss = "sim"; | |
325 | -*/ | |
326 | - | |
327 | -/* | |
328 | - Variable: g_uploadlocal | |
329 | - | |
330 | - Variável que define se na guia 2 será mostrada a opção de upload. | |
331 | - | |
332 | - Default: | |
333 | - | |
334 | - g_uploadlocal = "sim"; | |
335 | -*/ | |
336 | - | |
337 | -/* | |
338 | - Variable: g_conectarwms | |
339 | - | |
340 | - Variável que define se na guia 2 será mostrada a opção de conexão com WMS. | |
341 | - | |
342 | - Default: | |
343 | - | |
344 | - g_conectarwms = "sim"; | |
345 | -*/ | |
346 | - | |
347 | -/* | |
348 | - Variable: g_janelaMen | |
349 | - | |
350 | - Variável que define se a janela de mensagens começará aberta. | |
351 | - | |
352 | - Default: | |
353 | - | |
354 | - g_janelaMen = "sim"; | |
355 | -*/ | |
356 | - | |
357 | -/* | |
358 | - Variable: g_mostraRosa | |
359 | - | |
360 | - Variável que define se a rosa dos ventos deve ser mostrada junto ao mouse | |
361 | - | |
362 | - Default: | |
363 | - | |
364 | - g_mostraRosa = "sim" | |
365 | -*/ | |
366 | - | |
367 | -/* | |
368 | - Variable: g_opcoesTemas | |
369 | - | |
370 | - Variável que define se as opcoes adicionais de cada tema serao mostradas. | |
371 | - | |
372 | - Default: | |
373 | - | |
374 | - g_opcoesTemas = "sim"; | |
375 | -*/ | |
376 | - | |
377 | -/* | |
378 | - Variable: g_3dmap | |
379 | - | |
380 | - Variável que define o nome do map_file que possuí o layer para uso na função 3d. | |
381 | - | |
382 | - Pode ser caminho completo. Se não, busca no aplicmap. | |
383 | -*/ | |
384 | -g_3dmap = "3dmap.map"; | |
385 | - | |
386 | -/* | |
387 | - Variable: g_embedLegenda | |
388 | - | |
389 | - Indica se a legenda deve ser incluida no corpo do mapa. | |
390 | - | |
391 | - Default: | |
392 | - | |
393 | - g_embedLegenda = "nao"; | |
394 | -*/ | |
395 | -/* | |
396 | - Variable: g_mensagempadrao | |
397 | - | |
398 | - Mensagem padrão que será mostrada na janela de mensagens. | |
399 | - | |
400 | - g_mensagempadrao = "O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>"; | |
401 | -*/ | |
402 | - | |
403 | -objmapa = new Mapa(); | |
404 | - | |
405 | -/* | |
406 | -Variable: g_visual | |
407 | - | |
408 | -Indica qual o tipo de visual para abertura do mapa. | |
409 | - | |
410 | -Os visuais disponíveis são obtidos do diretório i3geo/imagens/visual na inicialização do i3geo. | |
411 | -*/ | |
412 | -g_visual = "default"; | |
413 | - | |
414 | -/* | |
415 | - Variable: objmapa.guiaTemas | |
416 | - | |
417 | - Define qual div corresponde ao local de listagem das camadas disponíveis no mapa | |
418 | -*/ | |
419 | -objmapa.guiaTemas = "guia1" | |
420 | - | |
421 | -/* | |
422 | - Variable: objmapa.guiaMenu | |
423 | - | |
424 | - Define qual div corresponde ao local de inclusão do menu de temas | |
425 | -*/ | |
426 | -objmapa.guiaMenu = "guia2"; | |
427 | - | |
428 | -/* | |
429 | - Variable: objmapa.guiaLegenda | |
430 | - | |
431 | - Define qual div corresponde ao local onde será incluida a legenda em HTML | |
432 | -*/ | |
433 | -objmapa.guiaLegenda = "guia4"; | |
434 | - | |
435 | -/* | |
436 | - Variable: objmapa.guiaListaMapas | |
437 | - | |
438 | - Define qual div corresponde ao local onde será colocada a lista de links para outros mapas | |
439 | -*/ | |
440 | -objmapa.guiaListaMapas = "guia5"; | |
441 | - | |
442 | -/* | |
443 | - Este é um exemplo de como incluir opções que são executadas | |
444 | - quando o usuário clica no mapa. | |
445 | - Vc pode criar um botao novo, e quando ele for clicado, | |
446 | - definir a variavel 'clicouBotaoTeste'. | |
447 | - O objeto 'funcoesClickMapa' é um array que pode armazenar strigs. | |
448 | - | |
449 | - function teste() | |
450 | - { | |
451 | - g_tipoacao = ""; | |
452 | - clicouBotaoTeste = "sim"; | |
453 | - if (clicouBotaoTeste == "sim") | |
454 | - {wdocaf("300px","280px",g_locaplic+'/ferramentas/exemplo/index.htm?x='+objposicaocursor.ddx+'&y='+objposicaocursor.ddy,"","","");} | |
455 | - } | |
456 | - objmapa.funcoesClickMapa.push("teste()") | |
457 | -*/ | |
458 | - | |
459 | -/* | |
460 | - Inicializa o mapa | |
461 | -*/ | |
462 | -objmapa.inicializa(); | |
463 | -</script> | |
464 | - | |
465 | -</body> | |
466 | -</html> | |
467 | 0 | \ No newline at end of file |
aplicmap/minima.htm
... | ... | @@ -14,7 +14,7 @@ arquivos não compactados, bastando substituir por i3geonaocompacto --> |
14 | 14 | --> |
15 | 15 | |
16 | 16 | </head> |
17 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1"> | |
17 | +<body id=i3geo onmouseover="javascript:this.onmousemove=processevent1"> | |
18 | 18 | <center> |
19 | 19 | <table id='mst' style=display:none width=100% cellspacing='0'> |
20 | 20 | <tr><td colspan=3 class=verdeescuro > </td></tr> | ... | ... |
aplicmap/openlayers.htm
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <link rel="stylesheet" type="text/css" href="../css/panel-aqua.css" /> |
20 | 20 | --> |
21 | 21 | </head> |
22 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1" > | |
22 | +<body id=i3geo onmouseover="javascript:this.onmousemove=processevent1" > | |
23 | 23 | <center> |
24 | 24 | <table id='mst' width=100% cellspacing='0'> |
25 | 25 | <!-- Inclui o menu suspenso. Se vc não quiser o menu, é só comentar --> |
... | ... | @@ -166,7 +166,7 @@ function criaOL(posfixo) |
166 | 166 | objposicaocursor.ddy = lonlat.lat; |
167 | 167 | objposicaocursor.telax = p.x; |
168 | 168 | objposicaocursor.telay = p.y; |
169 | - var dc = $i("corpo"); | |
169 | + var dc = $i("i3geo"); | |
170 | 170 | if ($i("openlayers_OpenLayers_Container")){var dc = $i("openlayers_OpenLayers_Container");} |
171 | 171 | while (dc.offsetParent) |
172 | 172 | { | ... | ... |
aplicmap/simples.php
... | ... | @@ -11,7 +11,7 @@ echo ' |
11 | 11 | <script type="text/javascript" src="'.$caminho.'classesjs/ferramentas_compacto.js"></script> |
12 | 12 | <script type="text/javascript" src="'.$caminho.'classesjs/ajax_compacto.js"></script> |
13 | 13 | <script type="text/javascript" src="'.$caminho.'classesjs/iniciamma_compacto.js"></script> |
14 | -<body id=corpo > | |
14 | +<body id=i3geo > | |
15 | 15 | <center> |
16 | 16 | <table id="mst" width=100% cellspacing="0"> |
17 | 17 | <tr> | ... | ... |
aplicmap/simples1.htm
... | ... | @@ -14,7 +14,7 @@ arquivos não compactados, bastando substituir por i3geonaocompacto --> |
14 | 14 | --> |
15 | 15 | |
16 | 16 | </head> |
17 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1"> | |
17 | +<body id=i3geo onmouseover="javascript:this.onmousemove=processevent1"> | |
18 | 18 | <center> |
19 | 19 | <table id='mst' style=display:none width=100% cellspacing='0'> |
20 | 20 | <tr><td colspan=3 class=verdeescuro > </td></tr> | ... | ... |
aplicmap/simples2.htm
... | ... | @@ -14,7 +14,7 @@ arquivos não compactados, bastando substituir por i3geonaocompacto --> |
14 | 14 | --> |
15 | 15 | |
16 | 16 | </head> |
17 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1"> | |
17 | +<body id=i3geo onmouseover="javascript:this.onmousemove=processevent1"> | |
18 | 18 | <center> |
19 | 19 | <table id='mst' style=display:none width=100% cellspacing='0'> |
20 | 20 | <tr><td colspan=3 class=verdeescuro > </td></tr> | ... | ... |
classesjs/funcoes.js
... | ... | @@ -917,7 +917,7 @@ function aguarde() |
917 | 917 | eval ('YAHOO.aguarde.'+aguardeId+' = new YAHOO.widget.Panel("wait",{width:"240px",fixedcenter:false,underlay:"matte",close:false,draggable:false,modal:false})'); |
918 | 918 | eval ('YAHOO.aguarde.'+aguardeId+'.setBody("<span><img src=\'"+g_locaplic+"/imagens/aguarde.gif\' /></span><span style=font-size:10px >"+texto+" </span>")'); |
919 | 919 | eval ('YAHOO.aguarde.'+aguardeId+'.render(document.body)'); |
920 | - eval ('YAHOO.aguarde.'+aguardeId+'.moveTo(0,0)'); | |
920 | + eval ('YAHOO.aguarde.'+aguardeId+'.moveTo('+imagemxi+','+imagemyi+')'); | |
921 | 921 | eval('YAHOO.aguarde.'+aguardeId+'.show()'); |
922 | 922 | } |
923 | 923 | this.fecha = function(aguardeId) |
... | ... | @@ -970,8 +970,14 @@ function ativaClicks(docMapa) |
970 | 970 | var ny = objposicaocursor.telay - topinicial - clicinicialy; |
971 | 971 | if (g_entorno == "nao") |
972 | 972 | { |
973 | - $i("img").style.left = nx; | |
974 | - $i("img").style.top = ny; | |
973 | + var l = 0; | |
974 | + if (parseInt($i("i3geo").style.left)) | |
975 | + {var l = parseInt($i("i3geo").style.left);} | |
976 | + $i("img").style.left = nx - l; | |
977 | + var t = 0; | |
978 | + if (parseInt($i("i3geo").style.top)) | |
979 | + {var t = parseInt($i("i3geo").style.top);} | |
980 | + $i("img").style.top = ny - t; | |
975 | 981 | } |
976 | 982 | else |
977 | 983 | { |
... | ... | @@ -1429,10 +1435,12 @@ function mudaboxnf(tipo) |
1429 | 1435 | } |
1430 | 1436 | if (navn) |
1431 | 1437 | { |
1438 | + var l = objposicaomouse.x; | |
1439 | + var t = objposicaomouse.y+document.body.scrollTop; | |
1432 | 1440 | with ($i("aplicari").style) |
1433 | 1441 | { |
1434 | - left = objposicaomouse.x; | |
1435 | - top = objposicaomouse.y+document.body.scrollTop; | |
1442 | + left = l; | |
1443 | + top = t; | |
1436 | 1444 | } |
1437 | 1445 | } |
1438 | 1446 | } |
... | ... | @@ -2731,7 +2739,7 @@ function remapaf() |
2731 | 2739 | Section: eventos |
2732 | 2740 | */ |
2733 | 2741 | /* |
2734 | -Function: processevent1 | |
2742 | +Function: processevent1 (depreciado) | |
2735 | 2743 | |
2736 | 2744 | Captura a posição do mouse tendo como referência o navegador. |
2737 | 2745 | |
... | ... | @@ -2746,6 +2754,7 @@ exy1 - objeto evento. |
2746 | 2754 | function processevent1(exy1) |
2747 | 2755 | { |
2748 | 2756 | //detec�o do navegador |
2757 | + /* | |
2749 | 2758 | navm = false; // IE |
2750 | 2759 | navn = false; // netscape |
2751 | 2760 | var app = navigator.appName.substring(0,1); |
... | ... | @@ -2761,6 +2770,7 @@ function processevent1(exy1) |
2761 | 2770 | objposicaomouse.x = window.event.clientX; |
2762 | 2771 | objposicaomouse.y = window.event.clientY; |
2763 | 2772 | } |
2773 | + */ | |
2764 | 2774 | } |
2765 | 2775 | /* |
2766 | 2776 | Function: calcposf |
... | ... | @@ -2775,32 +2785,38 @@ function calcposf() |
2775 | 2785 | imagemyi = 0; |
2776 | 2786 | imagemxref = 0; //posicao da tag ref |
2777 | 2787 | imagemyref = 0; |
2778 | - if(!$i("corpo")){return;} | |
2779 | - var dc = $i("corpo"); | |
2788 | + if(!$i("i3geo")){return;} | |
2789 | + if ($i("i3geo").style.left){imagemxi += parseInt($i("i3geo").style.left);} | |
2790 | + if ($i("i3geo").style.top){imagemyi += parseInt($i("i3geo").style.top);} | |
2791 | + var dc = $i("i3geo"); | |
2780 | 2792 | if ($i("img")) |
2781 | 2793 | {var dc = $i("contemImg");} |
2782 | 2794 | if ($i("openlayers_OpenLayers_Container")) |
2783 | 2795 | {var dc = $i("openlayers_OpenLayers_Container");} |
2784 | - while (dc.offsetParent) | |
2796 | + while ((dc.offsetParent) && (dc.offsetParent.id != "i3geo")) | |
2785 | 2797 | { |
2786 | 2798 | dc = dc.offsetParent; |
2787 | 2799 | imagemxi = imagemxi + dc.offsetLeft; |
2788 | 2800 | imagemyi = imagemyi + dc.offsetTop; |
2789 | 2801 | } |
2802 | + | |
2790 | 2803 | if ($i("img")) |
2791 | 2804 | { |
2792 | 2805 | $left("corpoMapa",imagemxi); |
2793 | 2806 | $top("corpoMapa",imagemyi); |
2807 | + if ($i("i3geo").style.left){$left("corpoMapa",imagemxi - parseInt($i("i3geo").style.left));} | |
2808 | + if ($i("i3geo").style.top){$top("corpoMapa",imagemyi - parseInt($i("i3geo").style.top));} | |
2794 | 2809 | } |
2795 | 2810 | if ($i("mostradistancia")) |
2796 | 2811 | { |
2797 | 2812 | $left("mostradistancia",imagemxi); |
2798 | 2813 | $top("mostradistancia",imagemyi); |
2799 | 2814 | } |
2815 | + | |
2800 | 2816 | if ($i("ref")) |
2801 | 2817 | { |
2802 | 2818 | var dc = $i("ref"); |
2803 | - while (dc.offsetParent.id != "corpo") | |
2819 | + while (dc.offsetParent.id != "i3geo") | |
2804 | 2820 | { |
2805 | 2821 | dc = dc.offsetParent; |
2806 | 2822 | imagemxref = imagemxref + dc.offsetLeft; |
... | ... | @@ -2880,7 +2896,7 @@ function capturaposicao(exy) |
2880 | 2896 | var xreffig = e.clientX - imagemxref + document.body.scrollLeft; |
2881 | 2897 | var yreffig = e.clientY - imagemyref + document.body.scrollTop; |
2882 | 2898 | } |
2883 | - var teladd = calcddf (xfig,yfig,g_celula,objmapa.extent); | |
2899 | + var teladd = calcddf(xfig,yfig,g_celula,objmapa.extent); | |
2884 | 2900 | var teladms = convdmsf(teladd[0],teladd[1]); |
2885 | 2901 | with(objposicaocursor) |
2886 | 2902 | { | ... | ... |
classesjs/funcoes_compacto.js
... | ... | @@ -88,7 +88,7 @@ function mostraferramenta(guia){ if($i("ferr"+guia)){ var fs=[1,2,3,4,5,6,7,8,9, |
88 | 88 | $i("ferr"+guia).style.backgroundColor="rgb(255,255,255)"; if($i("ferr"+guia+"obj")){$i("ferr"+guia+"obj").style.display="block";} |
89 | 89 | else{alert("O objeto ferr"+guia+"obj nao existe.");}}} |
90 | 90 | function borra(tipo){ } |
91 | -function aguarde(){ this.abre=function(aguardeId,texto){ YAHOO.namespace("aguarde"); eval('YAHOO.aguarde.'+aguardeId+'=new YAHOO.widget.Panel("wait",{width:"240px",fixedcenter:false,underlay:"matte",close:false,draggable:false,modal:false})'); eval('YAHOO.aguarde.'+aguardeId+'.setBody("<span><img src=\'"+g_locaplic+"/imagens/aguarde.gif\'/></span><span style=font-size:10px >"+texto+" </span>")'); eval('YAHOO.aguarde.'+aguardeId+'.render(document.body)'); eval('YAHOO.aguarde.'+aguardeId+'.moveTo(0,0)'); eval('YAHOO.aguarde.'+aguardeId+'.show()');} | |
91 | +function aguarde(){ this.abre=function(aguardeId,texto){ YAHOO.namespace("aguarde"); eval('YAHOO.aguarde.'+aguardeId+'=new YAHOO.widget.Panel("wait",{width:"240px",fixedcenter:false,underlay:"matte",close:false,draggable:false,modal:false})'); eval('YAHOO.aguarde.'+aguardeId+'.setBody("<span><img src=\'"+g_locaplic+"/imagens/aguarde.gif\'/></span><span style=font-size:10px >"+texto+" </span>")'); eval('YAHOO.aguarde.'+aguardeId+'.render(document.body)'); eval('YAHOO.aguarde.'+aguardeId+'.moveTo('+imagemxi+','+imagemyi+')'); eval('YAHOO.aguarde.'+aguardeId+'.show()');} | |
92 | 92 | this.fecha=function(aguardeId){ if(eval('YAHOO.aguarde.'+aguardeId)){ eval('YAHOO.aguarde.'+aguardeId+'.destroy()');}} |
93 | 93 | } |
94 | 94 | function ativaClicks(docMapa){ docMapa.onmouseover=function(){ if($i("imgh")){$i("imgh").style.display="block";} |
... | ... | @@ -98,7 +98,9 @@ function ativaClicks(docMapa){ docMapa.onmouseover=function(){ if($i("imgh")){$i |
98 | 98 | this.onmousemove=function(exy){ if($i("tip")){$i("tip").style.display="none";} |
99 | 99 | capturaposicao(exy); if(g_destaca !=""){$i("imgh").style.display="none";$i("div_d").style.clip='rect('+(objposicaocursor.imgy-destacaTamanho)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-destacaTamanho)+')';} |
100 | 100 | if(g_realca=="sim"){ $i("areaRealce").style.left=objposicaocursor.telax-destacaTamanho+10; $i("areaRealce").style.top=objposicaocursor.telay-destacaTamanho+10;} |
101 | - if($i("img")&&(g_panM=="sim")){ var nx=objposicaocursor.telax-leftinicial-clicinicialx; var ny=objposicaocursor.telay-topinicial-clicinicialy; if(g_entorno=="nao"){ $i("img").style.left=nx; $i("img").style.top=ny;} | |
101 | + if($i("img")&&(g_panM=="sim")){ var nx=objposicaocursor.telax-leftinicial-clicinicialx; var ny=objposicaocursor.telay-topinicial-clicinicialy; if(g_entorno=="nao"){ var l=0; if(parseInt($i("i3geo").style.left)){var l=parseInt($i("i3geo").style.left);} | |
102 | + $i("img").style.left=nx-l; var t=0; if(parseInt($i("i3geo").style.top)){var t=parseInt($i("i3geo").style.top);} | |
103 | + $i("img").style.top=ny-t;} | |
102 | 104 | else{ $left("img",objmapa.w*-1+nx); $left("imgS",objmapa.w*-1+nx); $left("imgL",objmapa.w+nx); $left("imgO",objmapa.w*-3+nx); $left("imgN",objmapa.w*-1+nx); $top("img",objmapa.h*-1+ny); $top("imgS",objmapa.h*-1+ny); $top("imgL",objmapa.h*-1+ny); $top("imgN",objmapa.h*-1+ny); $top("imgO",objmapa.h*-1+ny);}} |
103 | 105 | movecursor(); if($i("longlat")){$i("longlat").innerHTML=objposicaocursor.dmsx+" "+objposicaocursor.dmsy;} |
104 | 106 | if(g_tipoacao=="mede"){ $i("mostradistancia").style.display="block"; var n=pontosdistobj.xpt.length; if(n > 0){ var d=calculadistancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy); if(objmapa.scale > 500000){ var d=parseInt(d);} |
... | ... | @@ -157,7 +159,7 @@ function initJanelaRef(){ if(!$i("winRef")){ var novoel=document.createElement(" |
157 | 159 | var escondeRef=function(){ YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close, "click"); YAHOO.janelaRef.xp.panel.destroy(); iCookie("g_mapaRefDisplay","none");} |
158 | 160 | YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close, "click", escondeRef); iCookie("g_mapaRefDisplay","block"); objmapa.atualizaReferencia();} |
159 | 161 | function mudaboxnf(tipo){ g_operacao=tipo; clearTimeout(objmapa.tempo); objmapa.tempo=setTimeout('remapaf()',(4000)); autoRedesenho("reinicia"); if($i("aplicari")){ $i("aplicari").style.display="block"; if(navm){ mx=objposicaomouse.x-10; my=objposicaomouse.y-15; with($i("aplicari").style){ pixelLeft=mx+document.body.scrollLeft; pixelTop=my+document.body.scrollTop;}} |
160 | - if(navn){ with($i("aplicari").style){ left=objposicaomouse.x; top=objposicaomouse.y+document.body.scrollTop;}}}} | |
162 | + if(navn){ var l=objposicaomouse.x; var t=objposicaomouse.y+document.body.scrollTop; with($i("aplicari").style){ left=l; top=t;}}}} | |
161 | 163 | function movelentef(){ if($i("lente")){ if($i("lente").style.visibility=="visible"){ var esq=(objposicaocursor.telax-imagemxi)*2.25; var topo=(objposicaocursor.telay-imagemyi)*2.25; var clipt="rect("+(topo-40)+" "+(esq+40)+" "+(topo+40)+" "+(esq-40)+")"; with($i("lente").style){ clip=clipt; eval(g_tipotop+"=(imagemyi-(topo-40))+g_postpx"); eval(g_tipoleft+"=(imagemxi-(esq-40))+g_postpx");}}}} |
162 | 164 | function zoomiauto(){ objaguarde.abre("ajaxredesenha","Aguarde..."); g_fatordezoom=0; var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel=2&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); g_operacao="navega"; cp.call(p,"aproxima",ajaxredesenha);} |
163 | 165 | function zoomoauto(){ objaguarde.abre("ajaxredesenha","Aguarde..."); g_fatordezoom=0; var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel=2&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); g_operacao="navega"; cp.call(p,"afasta",ajaxredesenha);} |
... | ... | @@ -294,16 +296,17 @@ function remapaf(){ clearTimeout(objmapa.tempo); objmapa.tempo=""; objmapa.temaA |
294 | 296 | if((tsd.length > 0)||(tsl.length > 0)){ objaguarde.abre("remapa","Aguarde...refazendo o mapa"); var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+(tsd.toString())+"&ligar="+(tsl.toString())+"&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); cp.call(p,"ligaDesligaTemas",remapaAdicNovos);} |
295 | 297 | else{remapaAdicNovos();}} |
296 | 298 | else{remapaAdicNovos();}} |
297 | -function processevent1(exy1){ navm=false; navn=false; var app=navigator.appName.substring(0,1); if(app=='N')navn=true;else navm=true; if($i("img")){calcposf();} | |
298 | - if(navn){ objposicaomouse.x=exy1.clientX; objposicaomouse.y=exy1.clientY;} | |
299 | - if(navm){ objposicaomouse.x=window.event.clientX; objposicaomouse.y=window.event.clientY;}} | |
300 | -function calcposf(){ imagemxi=0; imagemyi=0; imagemxref=0; imagemyref=0; if(!$i("corpo")){return;} | |
301 | - var dc=$i("corpo"); if($i("img")){var dc=$i("contemImg");} | |
299 | +function processevent1(exy1){ } | |
300 | +function calcposf(){ imagemxi=0; imagemyi=0; imagemxref=0; imagemyref=0; if(!$i("i3geo")){return;} | |
301 | + if($i("i3geo").style.left){imagemxi+=parseInt($i("i3geo").style.left);} | |
302 | + if($i("i3geo").style.top){imagemyi+=parseInt($i("i3geo").style.top);} | |
303 | + var dc=$i("i3geo"); if($i("img")){var dc=$i("contemImg");} | |
302 | 304 | if($i("openlayers_OpenLayers_Container")){var dc=$i("openlayers_OpenLayers_Container");} |
303 | - while(dc.offsetParent){ dc=dc.offsetParent; imagemxi=imagemxi+dc.offsetLeft; imagemyi=imagemyi+dc.offsetTop;} | |
304 | - if($i("img")){ $left("corpoMapa",imagemxi); $top("corpoMapa",imagemyi);} | |
305 | + while((dc.offsetParent)&&(dc.offsetParent.id !="i3geo")){ dc=dc.offsetParent; imagemxi=imagemxi+dc.offsetLeft; imagemyi=imagemyi+dc.offsetTop;} | |
306 | + if($i("img")){ $left("corpoMapa",imagemxi); $top("corpoMapa",imagemyi); if($i("i3geo").style.left){$left("corpoMapa",imagemxi-parseInt($i("i3geo").style.left));} | |
307 | + if($i("i3geo").style.top){$top("corpoMapa",imagemyi-parseInt($i("i3geo").style.top));}} | |
305 | 308 | if($i("mostradistancia")){ $left("mostradistancia",imagemxi); $top("mostradistancia",imagemyi);} |
306 | - if($i("ref")){ var dc=$i("ref"); while(dc.offsetParent.id !="corpo"){ dc=dc.offsetParent; imagemxref=imagemxref+dc.offsetLeft; imagemyref=imagemyref+dc.offsetTop;}} | |
309 | + if($i("ref")){ var dc=$i("ref"); while(dc.offsetParent.id !="i3geo"){ dc=dc.offsetParent; imagemxref=imagemxref+dc.offsetLeft; imagemyref=imagemyref+dc.offsetTop;}} | |
307 | 310 | if($i("aguarde")){ $top("aguarde",imagemyi); $left("aguarde",imagemxi);}} |
308 | 311 | function movecursor(){ var obje=$i("obj").style; if($i("img")){ eval("obje."+g_tipotop+"=objposicaocursor.telay+5+g_postpx"); eval("obje."+g_tipoleft+"=objposicaocursor.telax+5+g_postpx");} |
309 | 312 | else{ eval("obje."+g_tipotop+"=objposicaocursor.telay-15+g_postpx"); eval("obje."+g_tipoleft+"=objposicaocursor.telax+15+g_postpx");} | ... | ... |
classesjs/i3geo_tudo_compacto.js
... | ... | @@ -848,7 +848,7 @@ function mostraferramenta(guia){ if($i("ferr"+guia)){ var fs=[1,2,3,4,5,6,7,8,9, |
848 | 848 | $i("ferr"+guia).style.backgroundColor="rgb(255,255,255)"; if($i("ferr"+guia+"obj")){$i("ferr"+guia+"obj").style.display="block";} |
849 | 849 | else{alert("O objeto ferr"+guia+"obj nao existe.");}}} |
850 | 850 | function borra(tipo){ } |
851 | -function aguarde(){ this.abre=function(aguardeId,texto){ YAHOO.namespace("aguarde"); eval('YAHOO.aguarde.'+aguardeId+'=new YAHOO.widget.Panel("wait",{width:"240px",fixedcenter:false,underlay:"matte",close:false,draggable:false,modal:false})'); eval('YAHOO.aguarde.'+aguardeId+'.setBody("<span><img src=\'"+g_locaplic+"/imagens/aguarde.gif\'/></span><span style=font-size:10px >"+texto+" </span>")'); eval('YAHOO.aguarde.'+aguardeId+'.render(document.body)'); eval('YAHOO.aguarde.'+aguardeId+'.moveTo(0,0)'); eval('YAHOO.aguarde.'+aguardeId+'.show()');} | |
851 | +function aguarde(){ this.abre=function(aguardeId,texto){ YAHOO.namespace("aguarde"); eval('YAHOO.aguarde.'+aguardeId+'=new YAHOO.widget.Panel("wait",{width:"240px",fixedcenter:false,underlay:"matte",close:false,draggable:false,modal:false})'); eval('YAHOO.aguarde.'+aguardeId+'.setBody("<span><img src=\'"+g_locaplic+"/imagens/aguarde.gif\'/></span><span style=font-size:10px >"+texto+" </span>")'); eval('YAHOO.aguarde.'+aguardeId+'.render(document.body)'); eval('YAHOO.aguarde.'+aguardeId+'.moveTo('+imagemxi+','+imagemyi+')'); eval('YAHOO.aguarde.'+aguardeId+'.show()');} | |
852 | 852 | this.fecha=function(aguardeId){ if(eval('YAHOO.aguarde.'+aguardeId)){ eval('YAHOO.aguarde.'+aguardeId+'.destroy()');}} |
853 | 853 | } |
854 | 854 | function ativaClicks(docMapa){ docMapa.onmouseover=function(){ if($i("imgh")){$i("imgh").style.display="block";} |
... | ... | @@ -858,7 +858,9 @@ function ativaClicks(docMapa){ docMapa.onmouseover=function(){ if($i("imgh")){$i |
858 | 858 | this.onmousemove=function(exy){ if($i("tip")){$i("tip").style.display="none";} |
859 | 859 | capturaposicao(exy); if(g_destaca !=""){$i("imgh").style.display="none";$i("div_d").style.clip='rect('+(objposicaocursor.imgy-destacaTamanho)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-destacaTamanho)+')';} |
860 | 860 | if(g_realca=="sim"){ $i("areaRealce").style.left=objposicaocursor.telax-destacaTamanho+10; $i("areaRealce").style.top=objposicaocursor.telay-destacaTamanho+10;} |
861 | - if($i("img")&&(g_panM=="sim")){ var nx=objposicaocursor.telax-leftinicial-clicinicialx; var ny=objposicaocursor.telay-topinicial-clicinicialy; if(g_entorno=="nao"){ $i("img").style.left=nx; $i("img").style.top=ny;} | |
861 | + if($i("img")&&(g_panM=="sim")){ var nx=objposicaocursor.telax-leftinicial-clicinicialx; var ny=objposicaocursor.telay-topinicial-clicinicialy; if(g_entorno=="nao"){ var l=0; if(parseInt($i("i3geo").style.left)){var l=parseInt($i("i3geo").style.left);} | |
862 | + $i("img").style.left=nx-l; var t=0; if(parseInt($i("i3geo").style.top)){var t=parseInt($i("i3geo").style.top);} | |
863 | + $i("img").style.top=ny-t;} | |
862 | 864 | else{ $left("img",objmapa.w*-1+nx); $left("imgS",objmapa.w*-1+nx); $left("imgL",objmapa.w+nx); $left("imgO",objmapa.w*-3+nx); $left("imgN",objmapa.w*-1+nx); $top("img",objmapa.h*-1+ny); $top("imgS",objmapa.h*-1+ny); $top("imgL",objmapa.h*-1+ny); $top("imgN",objmapa.h*-1+ny); $top("imgO",objmapa.h*-1+ny);}} |
863 | 865 | movecursor(); if($i("longlat")){$i("longlat").innerHTML=objposicaocursor.dmsx+" "+objposicaocursor.dmsy;} |
864 | 866 | if(g_tipoacao=="mede"){ $i("mostradistancia").style.display="block"; var n=pontosdistobj.xpt.length; if(n > 0){ var d=calculadistancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy); if(objmapa.scale > 500000){ var d=parseInt(d);} |
... | ... | @@ -917,7 +919,7 @@ function initJanelaRef(){ if(!$i("winRef")){ var novoel=document.createElement(" |
917 | 919 | var escondeRef=function(){ YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close, "click"); YAHOO.janelaRef.xp.panel.destroy(); iCookie("g_mapaRefDisplay","none");} |
918 | 920 | YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close, "click", escondeRef); iCookie("g_mapaRefDisplay","block"); objmapa.atualizaReferencia();} |
919 | 921 | function mudaboxnf(tipo){ g_operacao=tipo; clearTimeout(objmapa.tempo); objmapa.tempo=setTimeout('remapaf()',(4000)); autoRedesenho("reinicia"); if($i("aplicari")){ $i("aplicari").style.display="block"; if(navm){ mx=objposicaomouse.x-10; my=objposicaomouse.y-15; with($i("aplicari").style){ pixelLeft=mx+document.body.scrollLeft; pixelTop=my+document.body.scrollTop;}} |
920 | - if(navn){ with($i("aplicari").style){ left=objposicaomouse.x; top=objposicaomouse.y+document.body.scrollTop;}}}} | |
922 | + if(navn){ var l=objposicaomouse.x; var t=objposicaomouse.y+document.body.scrollTop; with($i("aplicari").style){ left=l; top=t;}}}} | |
921 | 923 | function movelentef(){ if($i("lente")){ if($i("lente").style.visibility=="visible"){ var esq=(objposicaocursor.telax-imagemxi)*2.25; var topo=(objposicaocursor.telay-imagemyi)*2.25; var clipt="rect("+(topo-40)+" "+(esq+40)+" "+(topo+40)+" "+(esq-40)+")"; with($i("lente").style){ clip=clipt; eval(g_tipotop+"=(imagemyi-(topo-40))+g_postpx"); eval(g_tipoleft+"=(imagemxi-(esq-40))+g_postpx");}}}} |
922 | 924 | function zoomiauto(){ objaguarde.abre("ajaxredesenha","Aguarde..."); g_fatordezoom=0; var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel=2&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); g_operacao="navega"; cp.call(p,"aproxima",ajaxredesenha);} |
923 | 925 | function zoomoauto(){ objaguarde.abre("ajaxredesenha","Aguarde..."); g_fatordezoom=0; var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel=2&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); g_operacao="navega"; cp.call(p,"afasta",ajaxredesenha);} |
... | ... | @@ -1054,16 +1056,17 @@ function remapaf(){ clearTimeout(objmapa.tempo); objmapa.tempo=""; objmapa.temaA |
1054 | 1056 | if((tsd.length > 0)||(tsl.length > 0)){ objaguarde.abre("remapa","Aguarde...refazendo o mapa"); var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+(tsd.toString())+"&ligar="+(tsl.toString())+"&g_sid="+g_sid; var cp=new cpaint(); cp.set_response_type("JSON"); cp.call(p,"ligaDesligaTemas",remapaAdicNovos);} |
1055 | 1057 | else{remapaAdicNovos();}} |
1056 | 1058 | else{remapaAdicNovos();}} |
1057 | -function processevent1(exy1){ navm=false; navn=false; var app=navigator.appName.substring(0,1); if(app=='N')navn=true;else navm=true; if($i("img")){calcposf();} | |
1058 | - if(navn){ objposicaomouse.x=exy1.clientX; objposicaomouse.y=exy1.clientY;} | |
1059 | - if(navm){ objposicaomouse.x=window.event.clientX; objposicaomouse.y=window.event.clientY;}} | |
1060 | -function calcposf(){ imagemxi=0; imagemyi=0; imagemxref=0; imagemyref=0; if(!$i("corpo")){return;} | |
1061 | - var dc=$i("corpo"); if($i("img")){var dc=$i("contemImg");} | |
1059 | +function processevent1(exy1){ } | |
1060 | +function calcposf(){ imagemxi=0; imagemyi=0; imagemxref=0; imagemyref=0; if(!$i("i3geo")){return;} | |
1061 | + if($i("i3geo").style.left){imagemxi+=parseInt($i("i3geo").style.left);} | |
1062 | + if($i("i3geo").style.top){imagemyi+=parseInt($i("i3geo").style.top);} | |
1063 | + var dc=$i("i3geo"); if($i("img")){var dc=$i("contemImg");} | |
1062 | 1064 | if($i("openlayers_OpenLayers_Container")){var dc=$i("openlayers_OpenLayers_Container");} |
1063 | - while(dc.offsetParent){ dc=dc.offsetParent; imagemxi=imagemxi+dc.offsetLeft; imagemyi=imagemyi+dc.offsetTop;} | |
1064 | - if($i("img")){ $left("corpoMapa",imagemxi); $top("corpoMapa",imagemyi);} | |
1065 | + while((dc.offsetParent)&&(dc.offsetParent.id !="i3geo")){ dc=dc.offsetParent; imagemxi=imagemxi+dc.offsetLeft; imagemyi=imagemyi+dc.offsetTop;} | |
1066 | + if($i("img")){ $left("corpoMapa",imagemxi); $top("corpoMapa",imagemyi); if($i("i3geo").style.left){$left("corpoMapa",imagemxi-parseInt($i("i3geo").style.left));} | |
1067 | + if($i("i3geo").style.top){$top("corpoMapa",imagemyi-parseInt($i("i3geo").style.top));}} | |
1065 | 1068 | if($i("mostradistancia")){ $left("mostradistancia",imagemxi); $top("mostradistancia",imagemyi);} |
1066 | - if($i("ref")){ var dc=$i("ref"); while(dc.offsetParent.id !="corpo"){ dc=dc.offsetParent; imagemxref=imagemxref+dc.offsetLeft; imagemyref=imagemyref+dc.offsetTop;}} | |
1069 | + if($i("ref")){ var dc=$i("ref"); while(dc.offsetParent.id !="i3geo"){ dc=dc.offsetParent; imagemxref=imagemxref+dc.offsetLeft; imagemyref=imagemyref+dc.offsetTop;}} | |
1067 | 1070 | if($i("aguarde")){ $top("aguarde",imagemyi); $left("aguarde",imagemxi);}} |
1068 | 1071 | function movecursor(){ var obje=$i("obj").style; if($i("img")){ eval("obje."+g_tipotop+"=objposicaocursor.telay+5+g_postpx"); eval("obje."+g_tipoleft+"=objposicaocursor.telax+5+g_postpx");} |
1069 | 1072 | else{ eval("obje."+g_tipotop+"=objposicaocursor.telay-15+g_postpx"); eval("obje."+g_tipoleft+"=objposicaocursor.telax+15+g_postpx");} |
... | ... | @@ -1255,8 +1258,12 @@ function ajaxabrelente(retorno){ try{ var retorno=retorno.data; if(retorno=="err |
1255 | 1258 | function ajaxdestaca(retorno){ var retorno=retorno.data; var m=new Image(); m.src=retorno; if(!$i("img_d")){ var novoel=document.createElement("div"); novoel.id="div_d"; document.body.appendChild(novoel); $i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d'/>"; $i("div_d").style.left=parseInt($i("corpoMapa").style.left); $i("div_d").style.top=parseInt($i("corpoMapa").style.top); $i("img_d").style.left=0; $i("img_d").style.top=0; $i("img_d").style.width=objmapa.w; $i("img_d").style.height=objmapa.h; $i("div_d").style.clip='rect(0 75 75 0)'; $i("img_d").src=retorno; var novoeli=document.createElement("div"); novoeli.id="div_di"; novoel.appendChild(novoeli); $i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>";} |
1256 | 1259 | $i("div_d").innerHTML=""; var novoel=document.createElement("input"); novoel.id="img_d"; novoel.style.position="relative"; novoel.style.top="0px"; novoel.style.left="0px"; novoel.type="image"; novoel.src=m.src; novoel.style.display="block"; $i("div_d").appendChild(novoel); objaguarde.fecha("ajaxdestaca");}function testaajax(){} |
1257 | 1260 | |
1258 | -g_autoRedesenha=0;g_sid=window.location.href.split("?")[1];atuaLeg="nao";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
1261 | +g_autoRedesenha=0;if(window.location.href.split("?")[1]){g_sid=window.location.href.split("?")[1];} | |
1262 | +else{g_sid="";} | |
1263 | +imagemxi=0;imagemyi=0;atuaLeg="nao";g_mashuppar="";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
1259 | 1264 | else{ g_postpx="px"; g_tipotop="top"; g_tipoleft="left";}window.onresize=function(){window.status="Após alterar o tamanho da janela, clique no botão de refresh do navegador";} |
1265 | +function cria(){var mashup=function(retorno){ g_sid=retorno.data; objmapa.inicializa();} | |
1266 | + var cp=new cpaint(); cp.set_async(true); cp.set_response_type("JSON"); var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa"; cp.call(p,"",mashup);} | |
1260 | 1267 | function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor(); objposicaomouse=new posicaomouse(); imgBranco=new Image(); imgBranco.src=g_locaplic+"/imagens/branco.gif"; var icache=new Array("foldermapa.gif","extent.gif","tic.png","maisvermelho.png","maisverde.png","maisamarelo.png","temas.png","x.gif","sobe.gif","desce.gif","quadro.png","quadro1.png","excluir.png"); for(i=0;icache.lenght;i++){ var temp=new Image(); temp.src=g_locaplic+"/imagens/"+icache[i];} |
1261 | 1268 | var temp=new Image(); temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/plus.gif"; temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/minus.gif"; var diminuix=(navm)? g_diminuixM : g_diminuixN; var diminuiy=(navm)? g_diminuiyM : g_diminuiyN; if(e==undefined){ var menos=0; if($i("contemFerramentas")){menos=menos+parseInt($i("contemFerramentas").style.width);} |
1262 | 1269 | if($i("encolheFerramentas")){menos=menos+parseInt($i("encolheFerramentas").style.width);} |
... | ... | @@ -1264,10 +1271,16 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
1264 | 1271 | var novow=screen.availWidth-diminuix; var novoh=screen.availHeight-diminuiy; if(novow >=1024){ novow=1000;} |
1265 | 1272 | if(novoh >=700){ novoh=700;} |
1266 | 1273 | if(document.body.style.width < 400){ var novow=screen.availWidth-diminuix; var novoh=screen.availHeight-diminuiy; window.resizeTo(screen.availWidth,screen.availHeight); window.moveTo(0,0);} |
1267 | - document.body.style.width=novow; document.body.style.height=novoh; this.w=parseInt(document.body.style.width)-menos-diminuix; this.h=parseInt(document.body.style.height)-diminuiy; if(document.getElementById("corpoMapa")){ if(document.getElementById("corpoMapa").style.width){ this.w=parseInt(document.getElementById("corpoMapa").style.width); this.h=parseInt(document.getElementById("corpoMapa").style.height);}}} | |
1274 | + document.body.style.width=novow; document.body.style.height=novoh; this.w=parseInt(document.body.style.width)-menos-diminuix; this.h=parseInt(document.body.style.height)-diminuiy; if(document.getElementById("corpoMapa")){ if(document.getElementById("corpoMapa").style.width){ this.w=parseInt(document.getElementById("corpoMapa").style.width); this.h=parseInt(document.getElementById("corpoMapa").style.width);} | |
1275 | + if(document.getElementById("corpoMapa").style.height){this.h=parseInt(document.getElementById("corpoMapa").style.height);}}} | |
1268 | 1276 | else{ this.w=document.body.offsetWidth-parseInt($i("contemFerramentas").style.width)-diminuix; this.h=document.body.offsetHeight-diminuiy;} |
1269 | 1277 | if($i("openlayers")){ $i("openlayers").style.width=this.w; $i("openlayers").style.height=this.h;} |
1270 | - this.navegacaoDir="nao"; this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.tempoRedesenho=""; this.contaTempoRedesenho=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
1278 | + this.navegacaoDir="nao"; this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.tempoRedesenho=""; this.contaTempoRedesenho=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!$i("i3geo")){document.body.id="i3geo";} | |
1279 | + $i("i3geo").onmouseover=function(){ this.onmousemove=function(exy1){ if(navn){ objposicaomouse.x=exy1.clientX; objposicaomouse.y=exy1.clientY;} | |
1280 | + if(navm){ objposicaomouse.x=window.event.clientX; objposicaomouse.y=window.event.clientY;}}} | |
1281 | + if(g_sid==""){ var mashup=function(retorno){ g_sid=retorno.data; objmapa.inicializa();} | |
1282 | + var cp=new cpaint(); cp.set_async("true"); cp.set_response_type("JSON"); var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa"+g_mashuppar; cp.call(p,"",mashup); return;} | |
1283 | + if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
1271 | 1284 | if(!window.testamenususpenso){alert("menususpenso.js com problemas");} |
1272 | 1285 | if(!window.testaferramentas){alert("ferramentas.js com problemas");} |
1273 | 1286 | if(!window.testaajax){alert("redesenho.js com problemas");} |
... | ... | @@ -1430,7 +1443,6 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
1430 | 1443 | if($i(objmapa.guiaMenu+"obj")){ $i(objmapa.guiaMenu+"obj").style.overflow="auto"; $i(objmapa.guiaMenu+"obj").style.height=objmapa.h-13; $i(objmapa.guiaMenu+"obj").style.width="100%";} |
1431 | 1444 | if($i(objmapa.guiaLegenda+"obj")){ $i(objmapa.guiaLegenda+"obj").style.overflow="auto"; $i(objmapa.guiaLegenda+"obj").style.height=objmapa.h-13; $i(objmapa.guiaLegenda+"obj").style.width="100%";}} |
1432 | 1445 | this.verificaClickMapa=function(){ if(this.funcoesClickMapa.length > 0){ for(f=0;f<this.funcoesClickMapa.length;f++){ eval(this.funcoesClickMapa[f]);}}}} |
1433 | - | |
1434 | 1446 | |
1435 | 1447 | YAHOO.example.onWindowLoadMenu=function(p_oEvent){ if($i("menus")){ if(oMenuData.ajudas){ var ins='<div class="bd" style=z-index:2000 >'; ins+='<ul class="first-of-type" style="text-align:center;">'; ins+='<li class="yuimenubaritem">Ajuda?</li>'; ins+='<li class="yuimenubaritem">Análise</li>'; if(!$i("listaPropriedades")){ins+='<li class="yuimenubaritem">Propriedades</li>';} |
1436 | 1448 | ins+='<li class="yuimenubaritem">Janelas</li>'; ins+='<li class="yuimenubaritem">Arquivo</li>'; ins+='</ul>'; ins+='<a href=http://mapas.mma.gov.br target=blank ><p style=text-align:left;><img id=banneri3geo src=\''+g_locaplic+'/imagens/banneri3geo.png\'/></a>'; ins+='</div>'; $i("menus").innerHTML=ins;}} | ... | ... |
classesjs/iniciamma.js
... | ... | @@ -52,7 +52,24 @@ Variable: g_sid |
52 | 52 | Id da seção atual no servidor. |
53 | 53 | |
54 | 54 | */ |
55 | -g_sid = window.location.href.split("?")[1]; | |
55 | +if (window.location.href.split("?")[1]) | |
56 | +{g_sid = window.location.href.split("?")[1];} | |
57 | +else | |
58 | +{g_sid = "";} | |
59 | +/* | |
60 | +Variable: imagemxi | |
61 | + | |
62 | +Inicialização da variável de cálculo de posicionamento. | |
63 | + | |
64 | +*/ | |
65 | +imagemxi = 0; | |
66 | +/* | |
67 | +Variable: imagemyi | |
68 | + | |
69 | +Inicialização da variável de cálculo de posicionamento. | |
70 | + | |
71 | +*/ | |
72 | +imagemyi = 0; | |
56 | 73 | /* |
57 | 74 | Variable: atuaLeg |
58 | 75 | |
... | ... | @@ -61,6 +78,16 @@ Variável interna que define se a legenda docável deve ser atualizada. |
61 | 78 | */ |
62 | 79 | atuaLeg="nao"; |
63 | 80 | /* |
81 | +Variable: g_mashuppar | |
82 | + | |
83 | +Parâmetros de inicialização que podem ser utilizados na interface mashup. | |
84 | + | |
85 | +Os parâmetros são os mesmos que podem ser utilizados quando o i3geo é inicializado pelo ms_criamapa.php. | |
86 | + | |
87 | +Exemplo: g_mashuppar = "&pontos=-54 -12&temasa=biomas&layers=biomas" | |
88 | +*/ | |
89 | +g_mashuppar = ""; | |
90 | +/* | |
64 | 91 | Variable: g_operacao |
65 | 92 | |
66 | 93 | Nome da última operação que foi executada. |
... | ... | @@ -471,6 +498,21 @@ else |
471 | 498 | } |
472 | 499 | //inclui uma mensagem no rodapé da janela quando a tela do navegador tem seu tamanho modificado pelo usuário |
473 | 500 | window.onresize = function(){window.status = "Após alterar o tamanho da janela, clique no botão de refresh do navegador";} |
501 | + | |
502 | +function cria() | |
503 | +{ | |
504 | +var mashup = function (retorno) | |
505 | +{ | |
506 | + g_sid = retorno.data; | |
507 | + objmapa.inicializa(); | |
508 | +} | |
509 | + var cp = new cpaint(); | |
510 | + cp.set_async(true); | |
511 | + cp.set_response_type("JSON"); | |
512 | + var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa"; | |
513 | + cp.call(p,"",mashup); | |
514 | +} | |
515 | + | |
474 | 516 | /* |
475 | 517 | Class: Mapa |
476 | 518 | |
... | ... | @@ -562,8 +604,10 @@ function Mapa(e,m) |
562 | 604 | if (document.getElementById("corpoMapa").style.width) |
563 | 605 | { |
564 | 606 | this.w = parseInt(document.getElementById("corpoMapa").style.width); |
565 | - this.h = parseInt(document.getElementById("corpoMapa").style.height); | |
607 | + this.h = parseInt(document.getElementById("corpoMapa").style.width); | |
566 | 608 | } |
609 | + if (document.getElementById("corpoMapa").style.height) | |
610 | + {this.h = parseInt(document.getElementById("corpoMapa").style.height);} | |
567 | 611 | } |
568 | 612 | } |
569 | 613 | else |
... | ... | @@ -722,6 +766,43 @@ function Mapa(e,m) |
722 | 766 | */ |
723 | 767 | this.inicializa= function() |
724 | 768 | { |
769 | + if (!$i("i3geo")) | |
770 | + {document.body.id = "i3geo";} | |
771 | + $i("i3geo").onmouseover = function() | |
772 | + { | |
773 | + this.onmousemove=function(exy1) | |
774 | + { | |
775 | + //if ($i("img")){calcposf();} | |
776 | + if (navn) | |
777 | + { | |
778 | + objposicaomouse.x = exy1.clientX; | |
779 | + objposicaomouse.y = exy1.clientY; | |
780 | + } | |
781 | + if (navm) | |
782 | + { | |
783 | + objposicaomouse.x = window.event.clientX; | |
784 | + objposicaomouse.y = window.event.clientY; | |
785 | + } | |
786 | + } | |
787 | + } | |
788 | + // | |
789 | + //se g_sid="", o html foi aberto diretamente | |
790 | + //então, é necessário criar o mapa | |
791 | + // | |
792 | + if (g_sid=="") | |
793 | + { | |
794 | + var mashup = function (retorno) | |
795 | + { | |
796 | + g_sid = retorno.data; | |
797 | + objmapa.inicializa(); | |
798 | + } | |
799 | + var cp = new cpaint(); | |
800 | + cp.set_async("true"); | |
801 | + cp.set_response_type("JSON"); | |
802 | + var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa"+g_mashuppar; | |
803 | + cp.call(p,"",mashup); | |
804 | + return; | |
805 | + } | |
725 | 806 | //testa se os javascripts foram carregados |
726 | 807 | if (!window.testafuncoes) |
727 | 808 | {alert("funcoes.js com problemas");} |
... | ... | @@ -731,6 +812,7 @@ function Mapa(e,m) |
731 | 812 | {alert("ferramentas.js com problemas");} |
732 | 813 | if (!window.testaajax) |
733 | 814 | {alert("redesenho.js com problemas");} |
815 | + // | |
734 | 816 | //objeto que guarda os parametros de posicionamento do cursor |
735 | 817 | objaguarde.abre("montaMapa","Aguarde...iniciando o mapa"); |
736 | 818 | var cp = new cpaint(); |
... | ... | @@ -1980,4 +2062,4 @@ function Mapa(e,m) |
1980 | 2062 | } |
1981 | 2063 | } |
1982 | 2064 | } |
1983 | -} | |
2065 | +} | |
1984 | 2066 | \ No newline at end of file | ... | ... |
classesjs/iniciamma_compacto.js
1 | -g_autoRedesenha=0;g_sid=window.location.href.split("?")[1];atuaLeg="nao";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
1 | +g_autoRedesenha=0;if(window.location.href.split("?")[1]){g_sid=window.location.href.split("?")[1];} | |
2 | +else{g_sid="";} | |
3 | +imagemxi=0;imagemyi=0;atuaLeg="nao";g_mashuppar="";g_operacao="";g_nomepin="";g_arvoreClick="";g_arvoreClicks="";g_movedoca=0;g_movedocac=0;g_movedocar=0;g_tipoacao="zoomli";g_realca="nao";g_destaca="";g_lenteaberta="nao";g_hlpt="";g_panM="nao";quadrosfilme=new Array();g_quadrooriginal="";wd=0;navm=false;navn=false;g_r="nao";g_embedLegenda="nao";oMenuData="";g_3dmap="";g_opcoesTemas="sim";g_mostraRosa="sim";g_visual="default";g_janelaMen="sim";g_downloadbase="sim";g_conectargeorss="sim";g_uploadlocal="sim";g_conectarwms="sim";g_docaguias="nao";g_barraFerramentas1="sim";g_barraFerramentas2="sim";g_fatordezoom=0;g_diminuixM=20;g_diminuixN=25;g_diminuiyM=106;g_diminuiyN=103;g_mapaRefDisplay="block";g_funcaoTip="verificaTipDefault()";g_tempotip=4500;g_tipotip="completo";g_tipoimagem="nenhum";g_sistemas="";destacaTamanho=75;g_mensagempadrao="O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blanck >aqui</a>";g_entorno="nao";g_guiaativa="guia1";var app=navigator.appName.substring(0,1);if(app=='N')navn=true;else navm=true;if(navm){ g_postpx=""; g_tipotop="pixelTop"; g_tipoleft="pixelLeft";} | |
2 | 4 | else{ g_postpx="px"; g_tipotop="top"; g_tipoleft="left";}window.onresize=function(){window.status="Após alterar o tamanho da janela, clique no botão de refresh do navegador";} |
5 | +function cria(){var mashup=function(retorno){ g_sid=retorno.data; objmapa.inicializa();} | |
6 | + var cp=new cpaint(); cp.set_async(true); cp.set_response_type("JSON"); var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa"; cp.call(p,"",mashup);} | |
3 | 7 | function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor(); objposicaomouse=new posicaomouse(); imgBranco=new Image(); imgBranco.src=g_locaplic+"/imagens/branco.gif"; var icache=new Array("foldermapa.gif","extent.gif","tic.png","maisvermelho.png","maisverde.png","maisamarelo.png","temas.png","x.gif","sobe.gif","desce.gif","quadro.png","quadro1.png","excluir.png"); for(i=0;icache.lenght;i++){ var temp=new Image(); temp.src=g_locaplic+"/imagens/"+icache[i];} |
4 | 8 | var temp=new Image(); temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/plus.gif"; temp.src=g_locaplic+"/classesjs/jsobjects/jsUI-Treeview/minus.gif"; var diminuix=(navm)? g_diminuixM : g_diminuixN; var diminuiy=(navm)? g_diminuiyM : g_diminuiyN; if(e==undefined){ var menos=0; if($i("contemFerramentas")){menos=menos+parseInt($i("contemFerramentas").style.width);} |
5 | 9 | if($i("encolheFerramentas")){menos=menos+parseInt($i("encolheFerramentas").style.width);} |
... | ... | @@ -7,10 +11,16 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
7 | 11 | var novow=screen.availWidth-diminuix; var novoh=screen.availHeight-diminuiy; if(novow >=1024){ novow=1000;} |
8 | 12 | if(novoh >=700){ novoh=700;} |
9 | 13 | if(document.body.style.width < 400){ var novow=screen.availWidth-diminuix; var novoh=screen.availHeight-diminuiy; window.resizeTo(screen.availWidth,screen.availHeight); window.moveTo(0,0);} |
10 | - document.body.style.width=novow; document.body.style.height=novoh; this.w=parseInt(document.body.style.width)-menos-diminuix; this.h=parseInt(document.body.style.height)-diminuiy; if(document.getElementById("corpoMapa")){ if(document.getElementById("corpoMapa").style.width){ this.w=parseInt(document.getElementById("corpoMapa").style.width); this.h=parseInt(document.getElementById("corpoMapa").style.height);}}} | |
14 | + document.body.style.width=novow; document.body.style.height=novoh; this.w=parseInt(document.body.style.width)-menos-diminuix; this.h=parseInt(document.body.style.height)-diminuiy; if(document.getElementById("corpoMapa")){ if(document.getElementById("corpoMapa").style.width){ this.w=parseInt(document.getElementById("corpoMapa").style.width); this.h=parseInt(document.getElementById("corpoMapa").style.width);} | |
15 | + if(document.getElementById("corpoMapa").style.height){this.h=parseInt(document.getElementById("corpoMapa").style.height);}}} | |
11 | 16 | else{ this.w=document.body.offsetWidth-parseInt($i("contemFerramentas").style.width)-diminuix; this.h=document.body.offsetHeight-diminuiy;} |
12 | 17 | if($i("openlayers")){ $i("openlayers").style.width=this.w; $i("openlayers").style.height=this.h;} |
13 | - this.navegacaoDir="nao"; this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.tempoRedesenho=""; this.contaTempoRedesenho=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
18 | + this.navegacaoDir="nao"; this.listavisual=""; this.visualatual="default"; this.funcoesClickMapa=new Array(); this.objtips=new Array(); this.tempo=""; this.tempoRedesenho=""; this.contaTempoRedesenho=""; this.temaAtivo=""; this.pinmarca="marca"; this.pintamanho="5"; this.scale=50000; this.temas=""; this.legenda=""; this.finaliza=""; this.guiaTemas="guia1"; this.guiaMenu="guia2"; this.guiaLegenda="guia4"; this.guiaListaMapas="guia5"; this.inicializa=function(){ if(!$i("i3geo")){document.body.id="i3geo";} | |
19 | + $i("i3geo").onmouseover=function(){ this.onmousemove=function(exy1){ if(navn){ objposicaomouse.x=exy1.clientX; objposicaomouse.y=exy1.clientY;} | |
20 | + if(navm){ objposicaomouse.x=window.event.clientX; objposicaomouse.y=window.event.clientY;}}} | |
21 | + if(g_sid==""){ var mashup=function(retorno){ g_sid=retorno.data; objmapa.inicializa();} | |
22 | + var cp=new cpaint(); cp.set_async("true"); cp.set_response_type("JSON"); var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa"+g_mashuppar; cp.call(p,"",mashup); return;} | |
23 | + if(!window.testafuncoes){alert("funcoes.js com problemas");} | |
14 | 24 | if(!window.testamenususpenso){alert("menususpenso.js com problemas");} |
15 | 25 | if(!window.testaferramentas){alert("ferramentas.js com problemas");} |
16 | 26 | if(!window.testaajax){alert("redesenho.js com problemas");} |
... | ... | @@ -173,4 +183,3 @@ function Mapa(e,m){ objaguarde=new aguarde(); objposicaocursor=new posicaocursor |
173 | 183 | if($i(objmapa.guiaMenu+"obj")){ $i(objmapa.guiaMenu+"obj").style.overflow="auto"; $i(objmapa.guiaMenu+"obj").style.height=objmapa.h-13; $i(objmapa.guiaMenu+"obj").style.width="100%";} |
174 | 184 | if($i(objmapa.guiaLegenda+"obj")){ $i(objmapa.guiaLegenda+"obj").style.overflow="auto"; $i(objmapa.guiaLegenda+"obj").style.height=objmapa.h-13; $i(objmapa.guiaLegenda+"obj").style.width="100%";}} |
175 | 185 | this.verificaClickMapa=function(){ if(this.funcoesClickMapa.length > 0){ for(f=0;f<this.funcoesClickMapa.length;f++){ eval(this.funcoesClickMapa[f]);}}}} |
176 | - | ... | ... |
classesphp/mapa_controle.php
... | ... | @@ -79,7 +79,7 @@ Include: |
79 | 79 | <pega_variaveis.php>, <carrega_ext.php>, <cpaint2.inc.php>, <classe_vermultilayer.php>, <classe_estatistica.php>, <funcoes_gerais.php> |
80 | 80 | |
81 | 81 | */ |
82 | -error_reporting(E_ALL); | |
82 | +error_reporting(0); | |
83 | 83 | set_time_limit(240); |
84 | 84 | // |
85 | 85 | //pega as variaveis passadas com get ou post |
... | ... | @@ -88,17 +88,20 @@ include_once("pega_variaveis.php"); |
88 | 88 | // |
89 | 89 | //inicializa a sessão |
90 | 90 | // |
91 | -session_name("i3GeoPHP"); | |
92 | -if (isset($g_sid)) | |
93 | -{session_id($g_sid);} | |
94 | -session_start(); | |
95 | -foreach(array_keys($_SESSION) as $k) | |
91 | +if ($funcao != "criaMapa") | |
96 | 92 | { |
97 | - eval("\$".$k."='".$_SESSION[$k]."';"); | |
93 | + session_name("i3GeoPHP"); | |
94 | + if (isset($g_sid)) | |
95 | + {session_id($g_sid);} | |
96 | + session_start(); | |
97 | + foreach(array_keys($_SESSION) as $k) | |
98 | + { | |
99 | + eval("\$".$k."='".$_SESSION[$k]."';"); | |
100 | + } | |
101 | + // | |
102 | + //verifica se deve ativar o debug | |
103 | + // | |
98 | 104 | } |
99 | -// | |
100 | -//verifica se deve ativar o debug | |
101 | -// | |
102 | 105 | if (isset($debug) && $debug == "sim") |
103 | 106 | {error_reporting(E_ALL);} |
104 | 107 | // |
... | ... | @@ -106,14 +109,24 @@ if (isset($debug) && $debug == "sim") |
106 | 109 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
107 | 110 | // |
108 | 111 | include_once ("carrega_ext.php"); |
109 | - | |
110 | 112 | require_once("../classesjs/cpaint/cpaint2.inc.php"); |
111 | 113 | // |
112 | 114 | //cria objeto cpaint para uso com ajax |
113 | 115 | // |
114 | 116 | $cp = new cpaint(); |
117 | +if ($funcao == "criaMapa") | |
118 | +{ | |
119 | + session_destroy(); | |
120 | + include("../ms_configura.php"); | |
121 | + chdir($locaplic); | |
122 | + $interface = "mashup"; | |
123 | + include("ms_criamapa.php"); | |
124 | + $cp->set_data(session_id()); | |
125 | + $cp->return_data(); | |
126 | +} | |
115 | 127 | if (!isset($map_file)) |
116 | 128 | { |
129 | + //nesse caso é necessário criar o diretório temporário e iniciar o mapa | |
117 | 130 | $cp->set_data("linkquebrado"); |
118 | 131 | $cp->return_data(); |
119 | 132 | exit; | ... | ... |
exemplos/atlas/mapa.htm
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | <script type="text/javascript" src="i3geo.js"></script> |
11 | 11 | |
12 | 12 | </head> |
13 | -<body id=corpo onmouseover="javascript:this.onmousemove=processevent1"> | |
13 | +<body id=i3geo onmouseover="javascript:this.onmousemove=processevent1"> | |
14 | 14 | <center> |
15 | 15 | <table id='mst' width=100% cellspacing='0'> |
16 | 16 | <!-- Inclui o menu suspenso. Se vc não quiser o menu, é só comentar --> | ... | ... |
... | ... | @@ -0,0 +1,171 @@ |
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 | +<html> | |
3 | +<head> | |
4 | +<meta http-equiv="Category" content="I3Geo Mapa interativo MMA"> | |
5 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
6 | +<title>MMA - Mapa interativo</title> | |
7 | + | |
8 | +<!-- Leitura dos programas javaScript e estilos individualmente. Pode-se ler os | |
9 | +arquivos não compactados, bastando substituir por i3geonaocompacto --> | |
10 | +<script type="text/javascript" src="../classesjs/i3geo.js"></script> | |
11 | + | |
12 | +<!-- formatação alternativa das janelas internas, para usar é só descomentar | |
13 | +<link rel="stylesheet" type="text/css" href="../css/panel-aqua.css" /> | |
14 | +--> | |
15 | +</head> | |
16 | +<body style="background-color:rgb(200,200,200)"> | |
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 | +<div style=position:absolute;left:10px;top:50px;width:200px; > | |
19 | +<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=corpo<br><br> | |
20 | +<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> | |
21 | +<p style=text-align:left;font-size:12pt >Nem todos os elementos precisam estar no mapa.<br><br> | |
22 | +<p style=text-align:left;font-size:12pt >Você pode esconder ou mudar as ferramentas de lugar.<br><br> | |
23 | +</div> | |
24 | +<div id=i3geo style=position:absolute;left:200px;top:50px > | |
25 | +<center> | |
26 | +<table id='mst' style=display:none width=100% cellspacing='0'> | |
27 | +<!-- Inclui o menu suspenso. Se vc não quiser o menu, é só comentar --> | |
28 | +<tr style="border:0px"><td colspan=2 style="background-image:url('../imagens/visual/default/cabeca.png');height:10px"></td></tr> | |
29 | +<tr> | |
30 | +<td colspan=2 class=verdeescuro style="text-align:right;height:0px;"> | |
31 | + <div id="menus" class="yuimenubar" style=height:22px; > | |
32 | + </div> | |
33 | +</td> | |
34 | +</tr> | |
35 | +<tr> | |
36 | + | |
37 | + <td class=tdbranca id=contemFerramentas style="vertical-align:top;width:268px;text-align:left;"> | |
38 | + <table width=100% cellspacing=0 cellpadding=0 > | |
39 | + <tr> | |
40 | + <td title="libera guias" class=tdclaro id=encolheFerramentas style="border-bottom:3px solid rgb(200,200,200);vertical-align:top;width:5px;text-align:left;"></td> | |
41 | + <td style="border-bottom:3px solid rgb(200,200,200)"> | |
42 | + <!-- Guias principais, não mude o ID, apenas o nome se for desejado --> | |
43 | + <div class=verdeescuro style="top:0px;cursor:pointer;"> | |
44 | + <div id=guia1 class=guia value="Mostra os temas atualmente inseridos no mapa e que podem estar visíveis ou não." > Temas </div> | |
45 | + <div id=guia2 class=guia value="Mostra a lista de temas disponíveis no servidor de dados, possibilitando que novos temas sejam adicionados ao mapa."> Adiciona </div> | |
46 | + <div id=guia4 class=guia value="Mostra a legnda do mapa atual." > Legenda </div> | |
47 | + <div id=guia5 class=guia value="Lista mapas já preparados, com temáticas específicas,que podem ser abertos no I3Geo"> Mapas </div> | |
48 | + </div> | |
49 | + </td> | |
50 | + </tr> | |
51 | + </table> | |
52 | + <!-- Esta div acrescenta a lista de propriedades do mapa | |
53 | + <div id=listaPropriedades ></div> | |
54 | + --> | |
55 | + <!-- Esta div acrescenta a opção de busca rápida | |
56 | + <div id=buscaRapida ></div> | |
57 | + --> | |
58 | + <div id='guia1obj' ><div id=buscaRapida ></div><div id=listaPropriedades ></div><div id=listaTemas ></div></div> | |
59 | + <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /></div> | |
60 | + <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> | |
61 | + <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> | |
62 | + </td> | |
63 | + <td style="vertical-align:top;border-width:0px;"> | |
64 | + <table width="100%" style="vertical-align:top;border-width:0px"> | |
65 | + <!-- Corpo do mapa. Pode ser reposicionado, mas não mude os IDs. Se vc quiser que o mapa tenha um tamanho específico, inclua o estilo, exemplo, style=width:300px;height:300px --> | |
66 | + <tr><td class=verdeclaro id=contemImg > | |
67 | + <div id=corpoMapa style="background-image:url('../imagens/i3geo1bw.jpg');width:300px"></div> | |
68 | + </td></tr> | |
69 | + </table> | |
70 | + </td> | |
71 | + </tr> | |
72 | +<!-- Mostra as coordenadas conforme o mouse é movimentado | |
73 | + <div class=pcenter10 id='longlat'>Longitude e latitude</div> | |
74 | +--> | |
75 | +<!-- Escala gráfica. Pode ser excluída. | |
76 | + <div id="escalaGrafica" style="text-align:left"></div> | |
77 | +--> | |
78 | +<!--- vc pode optar por colocar mensagens de ajuda em algum lugar | |
79 | +<tr><td colspan=2 ><div id=ajuda class=verdeescuro style="text-align:left;" >I3Geo</div></td></tr> | |
80 | +--> | |
81 | +<tr> | |
82 | + <td class=tdbranca > | |
83 | + <div id=escala ></div> | |
84 | + <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div> | |
85 | + </td> | |
86 | + <td class=tdbranca > | |
87 | + <table width=100% ><tr> | |
88 | + <td class=tdbranca ></td> | |
89 | + <td class=tdbranca ><div id=localizarxy >Aguarde...</div></td> | |
90 | + <td class=tdbranca ></td> | |
91 | + </tr></table> | |
92 | + </td> | |
93 | +</tr> | |
94 | +<tr style="border:0px"><td colspan=3 style="background-image:url('../imagens/visual/default/rodape.png');height:10px"></td></tr> | |
95 | +</table> | |
96 | +<a style=text-align:center;color:white href="mailto:edmar.moretti@mma.gov.br">Críticas e sugestões</a> | |
97 | +</center> | |
98 | +<!-- barra de botoes que serão incluídos na janela móvel de navegação --> | |
99 | +<div id=barraDeBotoes1 style='display:none'> | |
100 | + <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> | |
101 | + <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> | |
102 | + <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> | |
103 | + <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> | |
104 | + <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> | |
105 | + <table style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'></td></tr></table> | |
106 | +</div> | |
107 | +<div id=barraDeBotoes2 style='display:none'> | |
108 | + <table title="referencia" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="referencia" alt="" src="../imagens/branco.gif" id='referencia'/></td></tr></table> | |
109 | + <table title="insere xy" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="insere xy" alt="" src="../imagens/branco.gif" id='inserexy'/></td></tr></table> | |
110 | + <table title="insere grafico" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="insere grafico" alt="" src="../imagens/branco.gif" id='inseregrafico'/></td></tr></table> | |
111 | + <table title="selecao" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="selecao" alt="" src="../imagens/branco.gif" id='selecao'/></td></tr></table> | |
112 | + <table title="texto" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="texto" alt="" src="../imagens/branco.gif" id='textofid'/></td></tr></table> | |
113 | + <table title="confluencias" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="confluencias" alt="" src="../imagens/branco.gif" id='confluence'/></td></tr></table> | |
114 | + <table title="google" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="google" alt="" src="../imagens/branco.gif" id='google'/></td></tr></table> | |
115 | + <table id=botao3d title="3d - experimental" style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'><img title="3d" alt="" src="../imagens/branco.gif" id='v3d'/></td></tr></table> | |
116 | + <table style="width:100%"><caption style="text-align:center"> </caption><tr><td style='background-color:rgb(250,250,250);'></td></tr></table> | |
117 | +</div> | |
118 | +</div> | |
119 | +<!-- Variáveis globais e inicialização do mapa--> | |
120 | +<script type="text/javascript"> | |
121 | +/* | |
122 | +Title: Mashup | |
123 | + | |
124 | +Exemplo de abertura do I3Geo sem passar pelo ms_criamapa.php | |
125 | + | |
126 | +O usuário pode digitar diretamente o html no navegador. | |
127 | + | |
128 | +File: mashup.htm | |
129 | + | |
130 | +Exemplo: | |
131 | + | |
132 | +http://<host>/i3geo/exemplos/mashup.htm | |
133 | + | |
134 | +*/ | |
135 | +/* | |
136 | + Variable: g_locaplic | |
137 | + | |
138 | + Indica a localização correta do i3geo. | |
139 | + | |
140 | + É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
141 | +*/ | |
142 | +g_locaplic = "http://"+window.location.host+"/i3geo"; | |
143 | +/* | |
144 | + Variable: g_localimg | |
145 | + | |
146 | + Indica a localização correta das imagens. | |
147 | + | |
148 | + É utilizada para identificar o local correto onde estão as imagens que são utilizados. | |
149 | +*/ | |
150 | +g_localimg = "http://"+window.location.host+"/i3geo/imagens"; | |
151 | +g_mapaRefDisplay = "none" | |
152 | +/* | |
153 | +Variable: g_mashuppar | |
154 | + | |
155 | +Parâmetros de inicialização que podem ser utilizados na interface mashup. | |
156 | + | |
157 | +Os parâmetros são os mesmos que podem ser utilizados quando o i3geo é inicializado pelo ms_criamapa.php. | |
158 | + | |
159 | +Exemplo: g_mashuppar = "&pontos=-54 -12&temasa=biomas&layers=biomas" | |
160 | +*/ | |
161 | +g_mashuppar = "&mapext=-53 -26 -42 -18"; | |
162 | + | |
163 | +objmapa = new Mapa(); | |
164 | +/* | |
165 | + Inicializa o mapa | |
166 | +*/ | |
167 | +objmapa.inicializa(); | |
168 | +</script> | |
169 | + | |
170 | +</body> | |
171 | +</html> | |
0 | 172 | \ No newline at end of file | ... | ... |
ms_configura.php
... | ... | @@ -76,7 +76,7 @@ if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) |
76 | 76 | //caminho completo do diretório temporário utilizado pelo mapserver |
77 | 77 | $dir_tmp = "c:/ms4w/tmp/ms_tmp"; |
78 | 78 | //caminho completo onde fica o I3Geo |
79 | - $locaplic = getcwd(); //"c:/ms4w/apache/htdocs/i3geo"; | |
79 | + $locaplic = "c:/ms4w/apache/htdocs/i3geo"; | |
80 | 80 | //caminho completo do diretório onde ficam os arquivos .map correspondentes aos temas disponíveis |
81 | 81 | $temasdir = $locaplic."/temas"; //"c:/ms4w/apache/htdocs/i3geo/temas"; |
82 | 82 | //caminho completo onde ficam os arquivos .map específicos do I3Geo | ... | ... |
ms_criamapa.php
... | ... | @@ -471,21 +471,24 @@ $mapa->save($tmpfname); |
471 | 471 | // gera a url para abrir o mapa |
472 | 472 | // interface = arquivo html que será aberto |
473 | 473 | // |
474 | -if (count(explode(".php",$interface)) > 1) | |
474 | +if ($interface != "mashup") | |
475 | 475 | { |
476 | - if (file_exists($caminho."aplicmap/".$interface)) | |
477 | - {include_once($caminho."aplicmap/".$interface);} | |
478 | - else | |
479 | - {include_once($interface);} | |
480 | - exit; | |
481 | -} | |
482 | -else | |
483 | -{ | |
484 | - if (file_exists($caminho."aplicmap/".$interface)) | |
485 | - {$urln = $caminho."aplicmap/".$interface."?".session_id();} | |
486 | - else | |
487 | - {$urln = $interface."?".session_id();} | |
488 | - //header("Location:".$urln); | |
489 | - echo "<meta http-equiv='refresh' content='0;url=$urln'>"; | |
476 | + if (count(explode(".php",$interface)) > 1) | |
477 | + { | |
478 | + if (file_exists($caminho."aplicmap/".$interface)) | |
479 | + {include_once($caminho."aplicmap/".$interface);} | |
480 | + else | |
481 | + {include_once($interface);} | |
482 | + exit; | |
483 | + } | |
484 | + else | |
485 | + { | |
486 | + if (file_exists($caminho."aplicmap/".$interface)) | |
487 | + {$urln = $caminho."aplicmap/".$interface."?".session_id();} | |
488 | + else | |
489 | + {$urln = $interface."?".session_id();} | |
490 | + //header("Location:".$urln); | |
491 | + echo "<meta http-equiv='refresh' content='0;url=$urln'>"; | |
492 | + } | |
490 | 493 | } |
491 | 494 | ?> |
492 | 495 | \ No newline at end of file | ... | ... |