Commit ca32beaf00735a792fd01f3011971928a2913fbc
1 parent
20a18b42
Exists in
master
and in
7 other branches
--no commit message
Showing
15 changed files
with
353 additions
and
121 deletions
Show diff stats
aplicmap/geral.htm
@@ -232,7 +232,6 @@ vc pode optar por colocar mensagens de ajuda em algum lugar | @@ -232,7 +232,6 @@ vc pode optar por colocar mensagens de ajuda em algum lugar | ||
232 | </div> | 232 | </div> |
233 | <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> | 233 | <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> |
234 | </div> | 234 | </div> |
235 | - | ||
236 | <!-- Variáveis globais e inicialização do mapa--> | 235 | <!-- Variáveis globais e inicialização do mapa--> |
237 | <script type="text/javascript"> | 236 | <script type="text/javascript"> |
238 | /* | 237 | /* |
@@ -0,0 +1,91 @@ | @@ -0,0 +1,91 @@ | ||
1 | +<?php | ||
2 | +include_once("../ms_configura.php"); | ||
3 | +?> | ||
4 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
5 | +<html> | ||
6 | +<head> | ||
7 | +<meta http-equiv="Category" content="I3Geo Mapa interativo MMA"> | ||
8 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | ||
9 | + <style type="text/css"> | ||
10 | + .olControlEditingToolbar { | ||
11 | + float:left; | ||
12 | + right: 0px; | ||
13 | + height:30px; | ||
14 | + width: 150px; | ||
15 | + } | ||
16 | +</style> | ||
17 | +<title>MMA - Mapa interativo</title> | ||
18 | +<!-- Leitura dos programas javaScript e estilos. Pode-se ler os arquivos não compactados, bastando excluir a palavra _compacto --> | ||
19 | +<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2.x&key=<?php echo $googleApiKey; ?>"></script> | ||
20 | +<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | ||
21 | + | ||
22 | +</head> | ||
23 | +<body id=i3geo > | ||
24 | +<center> | ||
25 | +<table id='mst' width=100% cellspacing='0'> | ||
26 | +<tr style="border:0px"><td colspan=2 style="background-image:url('../imagens/visual/default/cabeca.png');height:10px"></td></tr> | ||
27 | +<tr> | ||
28 | + <td class=tdbranca id=contemFerramentas style="border:0px;vertical-align:top;width:268px;text-align:left;"> | ||
29 | + <table width=100% cellspacing=0 cellpadding=0 > | ||
30 | + <tr><td style="background-color:white;border-bottom:0px solid rgb(230,230,230);height:45px"> | ||
31 | + <!-- Guias principais, não mude o ID, apenas o nome se for desejado --> | ||
32 | + <div style="top:0px;cursor:pointer;"> | ||
33 | + <div id=guia1 class=guia value="Mostra os temas atualmente inseridos no mapa e que podem estar visíveis ou não." > Temas </div> | ||
34 | + <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> | ||
35 | + <div id=guia4 class=guia value="Mostra a legnda do mapa atual." > Legenda </div> | ||
36 | + <div id=guia5 class=guia value="Lista mapas já preparados, com temáticas específicas,que podem ser abertos no I3Geo"> Mapas </div> | ||
37 | + </div> | ||
38 | + </td></tr> | ||
39 | + </table> | ||
40 | + <div id='guia1obj' ><div id=listaTemas ></div></div> | ||
41 | + <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /></div> | ||
42 | + <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> | ||
43 | + <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> | ||
44 | + </td> | ||
45 | + <td class=verdeclaro style="background-color:white;vertical-align:top;border-width:0px;"> | ||
46 | + <table width="100%" style="vertical-align:top;"> | ||
47 | + <!-- Corpo do mapa. Pode ser reposicionado, mas não mude os IDs --> | ||
48 | + <tr><td></td></tr> | ||
49 | + <tr><td class=verdeclaro id=contemImg > | ||
50 | + </td></tr> | ||
51 | + </table> | ||
52 | + </td> | ||
53 | + </tr> | ||
54 | +<tr style="border:0px"><td colspan=2 style="background-image:url('../imagens/visual/default/rodape.png');height:10px"></td></tr> | ||
55 | +</table> | ||
56 | +<a style=text-align:center;color:white href="mailto:edmar.moretti@mma.gov.br">Críticas e sugestões</a> | ||
57 | +</center> | ||
58 | +<div id="panel" class="olControlEditingToolbar" style="position:absolute;top:12px;left:265px;"></div> | ||
59 | +<div id=botoesadic ></div> | ||
60 | +<!-- Variáveis globais e inicialização do mapa--> | ||
61 | +<script type="text/javascript"> | ||
62 | +/* | ||
63 | +Title: OpenLayers (experimental) | ||
64 | + | ||
65 | +Abre o i3geo com a navegação controlada pelo OpenLayers. | ||
66 | + | ||
67 | +File: i3geo/aplicmap/googlemaps.htm | ||
68 | + | ||
69 | +Exemplo: | ||
70 | + | ||
71 | +http://<host>/i3geo/ms_criamapa.php?interface=googlemaps.phtml | ||
72 | + | ||
73 | +*/ | ||
74 | +g_locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | ||
75 | +g_localimg = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo/imagens"; | ||
76 | +g_barraFerramentas1 = "nao" | ||
77 | +g_barraFerramentas2 = "nao" | ||
78 | +g_mapaRefDisplay = "none" | ||
79 | +g_janelaMen = "nao"; | ||
80 | +g_mostraRosa = "nao" | ||
81 | +g_opcoesTemas = "sim"; | ||
82 | +g_3dmap = "3dmap.map"; | ||
83 | +i3GEO.interface.ATUAL = "googlemaps"; | ||
84 | +i3GEO.interface.IDCORPO = "contemImg"; | ||
85 | + | ||
86 | +i3GEO.cria(); | ||
87 | +i3GEO.inicia(); | ||
88 | +</script> | ||
89 | + | ||
90 | +</body> | ||
91 | +</html> | ||
0 | \ No newline at end of file | 92 | \ No newline at end of file |
aplicmap/openlayers.htm
@@ -89,8 +89,8 @@ g_opcoesTemas = "sim"; | @@ -89,8 +89,8 @@ g_opcoesTemas = "sim"; | ||
89 | g_3dmap = "3dmap.map"; | 89 | g_3dmap = "3dmap.map"; |
90 | i3GEO.interface.ATUAL = "openlayers"; | 90 | i3GEO.interface.ATUAL = "openlayers"; |
91 | i3GEO.interface.IDCORPO = "contemImg"; | 91 | i3GEO.interface.IDCORPO = "contemImg"; |
92 | -objmapa = new Mapa(); | ||
93 | -objmapa.inicializa(); | 92 | +i3GEO.cria(); |
93 | +i3GEO.inicia(); | ||
94 | </script> | 94 | </script> |
95 | 95 | ||
96 | </body> | 96 | </body> |
classesjs/classe_gadgets.js
@@ -37,7 +37,7 @@ i3GEO.gadgets = { | @@ -37,7 +37,7 @@ i3GEO.gadgets = { | ||
37 | /* | 37 | /* |
38 | Variable: PARAMETROS | 38 | Variable: PARAMETROS |
39 | 39 | ||
40 | - Parametros de inicialização dos gadgets | 40 | + Parametros de inicialização dos gadgets. |
41 | 41 | ||
42 | Type: | 42 | Type: |
43 | {JSON} | 43 | {JSON} |
@@ -58,7 +58,9 @@ i3GEO.gadgets = { | @@ -58,7 +58,9 @@ i3GEO.gadgets = { | ||
58 | "mostraQuadros": | 58 | "mostraQuadros": |
59 | {idhtml:"lugarquadros"}, | 59 | {idhtml:"lugarquadros"}, |
60 | "mostraHistoricoZoom": | 60 | "mostraHistoricoZoom": |
61 | - {idhtml:"historicozoom"} | 61 | + {idhtml:"historicozoom"}, |
62 | + "mostraMenuSuspenso": | ||
63 | + {idhtml:"menus"} | ||
62 | }, | 64 | }, |
63 | /* | 65 | /* |
64 | Function: mostraCoordenadasUTM | 66 | Function: mostraCoordenadasUTM |
@@ -669,5 +671,65 @@ i3GEO.gadgets = { | @@ -669,5 +671,65 @@ i3GEO.gadgets = { | ||
669 | wi.document.write("<br>Fim</body></html>"); | 671 | wi.document.write("<br>Fim</body></html>"); |
670 | } | 672 | } |
671 | } | 673 | } |
674 | + }, | ||
675 | + /* | ||
676 | + Function: mostraMenuSuspenso | ||
677 | + | ||
678 | + Mostra o menu suspenso com opções extras de análise, ajuda, etc | ||
679 | + | ||
680 | + O objeto YAHOO.widget.MenuBar resultante pode ser obtido na variável i3GEOoMenuBar | ||
681 | + | ||
682 | + O conteúdo do menu é baseado na variável oMenuData | ||
683 | + | ||
684 | + Parameters: | ||
685 | + | ||
686 | + id {String} - id do elemento HTML que receberá o resultado. Esse id por default é obtido de | ||
687 | + i3GEO.gadgets.PARAMETROS | ||
688 | + */ | ||
689 | + mostraMenuSuspenso: function(id){ | ||
690 | + if(arguments.length == 0) | ||
691 | + {var id = i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml;} | ||
692 | + else | ||
693 | + {i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml = id;} | ||
694 | + var objid = $i(id); | ||
695 | + if(objid){ | ||
696 | + objid.className="yuimenubar"; | ||
697 | + if(oMenuData.ajudas){ | ||
698 | + var ins = ""; | ||
699 | + ins += '<div class="bd" style="align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'; | ||
700 | + ins += '<ul class="first-of-type" style="border:0px solid white;top:10px;">'; | ||
701 | + var sobe = ""; | ||
702 | + if(navn){var sobe = "line-height:0px;";} | ||
703 | + ins += '<li class="yuimenubaritem" style="padding-bottom:5px" ><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuajuda" > '+$trad("s1")+'</a></li>'; | ||
704 | + ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuanalise" > '+$trad("s2")+'</a></li>'; | ||
705 | + ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menujanelas" > '+$trad("s3")+'</a></li>'; | ||
706 | + ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuarquivos" > '+$trad("s4")+'</a></li>'; | ||
707 | + ins += '</ul>'; | ||
708 | + ins += '</div>'; | ||
709 | + objid.innerHTML=ins; | ||
710 | + } | ||
711 | + var onMenuBarBeforeRender = function (p_sType, p_sArgs){ | ||
712 | + if(i3GEO.parametros.w >= 500) | ||
713 | + {var conta = 0;} | ||
714 | + else | ||
715 | + {var conta = 0;} | ||
716 | + for(var nomeMenu in oMenuData){ | ||
717 | + i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata: oMenuData[nomeMenu]}); | ||
718 | + var conta=conta+1; | ||
719 | + } | ||
720 | + } | ||
721 | + i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{autosubmenudisplay: true, showdelay: 150, hidedelay: 250, lazyload: false}); | ||
722 | + i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender); | ||
723 | + i3GEOoMenuBar.render(); | ||
724 | + // | ||
725 | + //corrige problemas de estilo | ||
726 | + // | ||
727 | + var temp = objid.style; | ||
728 | + temp.backgroundPosition = "0px -5px"; | ||
729 | + temp.border = "0px solid white"; | ||
730 | + if($i("contemMenu")){ | ||
731 | + $i("contemMenu").className="yui-navset"; | ||
732 | + } | ||
733 | + } | ||
672 | } | 734 | } |
673 | }; | 735 | }; |
674 | \ No newline at end of file | 736 | \ No newline at end of file |
classesjs/classe_idioma.js
@@ -51,6 +51,43 @@ alert($trad("d22")) | @@ -51,6 +51,43 @@ alert($trad("d22")) | ||
51 | */ | 51 | */ |
52 | i3GEO.idioma = { | 52 | i3GEO.idioma = { |
53 | /* | 53 | /* |
54 | + Property: MOSTRASELETOR | ||
55 | + | ||
56 | + Define se o i3Geo irá incluir no mapa as bandeiras de seleção de idiomas | ||
57 | + | ||
58 | + Type: | ||
59 | + {Boolean} | ||
60 | + | ||
61 | + Default: | ||
62 | + true | ||
63 | + */ | ||
64 | + MOSTRASELETOR: true, | ||
65 | + /* | ||
66 | + Property: IDSELETOR | ||
67 | + | ||
68 | + Define o id do elemento HTML que receberá o seletor. Se não for definido, o seletor será | ||
69 | + posicionado automaticamente pelo i3Geo | ||
70 | + | ||
71 | + Type: | ||
72 | + {String} | ||
73 | + | ||
74 | + Default: | ||
75 | + "" | ||
76 | + */ | ||
77 | + IDSELETOR: "", | ||
78 | + /* | ||
79 | + Property: SELETORES | ||
80 | + | ||
81 | + Lista os seletores (bandeiras) que serão incluídas no seletor | ||
82 | + | ||
83 | + Type: | ||
84 | + {Array} | ||
85 | + | ||
86 | + Default: | ||
87 | + "pt","en","es","it" | ||
88 | + */ | ||
89 | + SELETORES: new Array("pt","en","es","it"), | ||
90 | + /* | ||
54 | Property: DICIONARIO | 91 | Property: DICIONARIO |
55 | 92 | ||
56 | Define o objeto com o dicionário utilizado | 93 | Define o objeto com o dicionário utilizado |
@@ -202,6 +239,45 @@ i3GEO.idioma = { | @@ -202,6 +239,45 @@ i3GEO.idioma = { | ||
202 | for (k in i3GEO.idioma.DICIONARIO){ | 239 | for (k in i3GEO.idioma.DICIONARIO){ |
203 | return (i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0])); | 240 | return (i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0])); |
204 | } | 241 | } |
242 | + }, | ||
243 | + /* | ||
244 | + Function: mostraSeletor | ||
245 | + | ||
246 | + Inclui as bandeiras no mapa permitindo a seleção do idioma | ||
247 | + | ||
248 | + As imagens das bandeiras devem estar definidas no CSS do i3geo, recebendo como identificadores | ||
249 | + os ids uk,brasil,italiano,espanhol | ||
250 | + */ | ||
251 | + mostraSeletor: function(){ | ||
252 | + if(!i3GEO.idioma.MOSTRASELETOR){return;} | ||
253 | + // | ||
254 | + //monta o elemento HTML com as bandeiras | ||
255 | + // | ||
256 | + var ins = ""; | ||
257 | + var n = i3GEO.idioma.SELETORES.length; | ||
258 | + for(i=0;i<n;i++){ | ||
259 | + ins += '<img style="padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+i3GEO.util.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+i3GEO.idioma.SELETORES[i]+'\')" '; | ||
260 | + if(i3GEO.idioma.SELETORES[i] == "en") | ||
261 | + ins += 'alt="Ingles" id="uk" />'; | ||
262 | + if(i3GEO.idioma.SELETORES[i] == "pt") | ||
263 | + ins += 'alt="Portugues" id="brasil" />'; | ||
264 | + if(i3GEO.idioma.SELETORES[i] == "es") | ||
265 | + ins += 'alt="Espanhol" id="espanhol" />'; | ||
266 | + if(i3GEO.idioma.SELETORES[i] == "it") | ||
267 | + ins += 'alt="Italiano" id="italiano" />'; | ||
268 | + } | ||
269 | + if(i3GEO.idioma.IDSELETOR != "" && $i(i3GEO.idioma.IDSELETOR)) | ||
270 | + {$i(i3GEO.idioma.IDSELETOR).innerHTML = ins;} | ||
271 | + else{ | ||
272 | + var pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO)) | ||
273 | + var novoel = document.createElement("div"); | ||
274 | + novoel.innerHTML = ins; | ||
275 | + novoel.style.position = "absolute"; | ||
276 | + novoel.style.top = pos[1] - 17 +"px"; | ||
277 | + novoel.style.left = pos[0]+"px"; | ||
278 | + novoel.style.zIndex = 5000; | ||
279 | + document.body.appendChild(novoel); | ||
280 | + } | ||
205 | } | 281 | } |
206 | }; | 282 | }; |
207 | /* | 283 | /* |
classesjs/classe_interface.js
@@ -57,6 +57,13 @@ i3GEO.interface = { | @@ -57,6 +57,13 @@ i3GEO.interface = { | ||
57 | */ | 57 | */ |
58 | IDCORPO: "corpoMapa", | 58 | IDCORPO: "corpoMapa", |
59 | /* | 59 | /* |
60 | + Variable: IDMAPA | ||
61 | + | ||
62 | + ID do elemento HTML criado para conter o mapa | ||
63 | + Esse elemento normalmente é criado dentro de IDCORPO dependendo da interface | ||
64 | + */ | ||
65 | + IDMAPA: "", | ||
66 | + /* | ||
60 | Function: redesenha | 67 | Function: redesenha |
61 | 68 | ||
62 | Aplica o método redesenha da interface atual | 69 | Aplica o método redesenha da interface atual |
@@ -137,7 +144,8 @@ i3GEO.interface = { | @@ -137,7 +144,8 @@ i3GEO.interface = { | ||
137 | ins += "<tr><td class=verdeclaro ><input style='display:none;position:relative' type=image src='' id='imgL' /></td><td class=verdeclaro ><input style='position:relative;top:0px;left:0px'' type=image src='' id='img' /></td><td class=verdeclaro ><input style='display:none;position:relative' type=image src='' id='imgO' /></td></tr>"; | 144 | ins += "<tr><td class=verdeclaro ><input style='display:none;position:relative' type=image src='' id='imgL' /></td><td class=verdeclaro ><input style='position:relative;top:0px;left:0px'' type=image src='' id='img' /></td><td class=verdeclaro ><input style='display:none;position:relative' type=image src='' id='imgO' /></td></tr>"; |
138 | ins += "<tr><td class=verdeclaro ></td><td class=verdeclaro ><input style='display:none;position:relative' type=image src='' id='imgS' /></td><td class=verdeclaro ></td></tr>"; | 145 | ins += "<tr><td class=verdeclaro ></td><td class=verdeclaro ><input style='display:none;position:relative' type=image src='' id='imgS' /></td><td class=verdeclaro ></td></tr>"; |
139 | ins += "</table>"; | 146 | ins += "</table>"; |
140 | - $i(i3GEO.interface.IDCORPO).innerHTML = ins; | 147 | + $i(i3GEO.interface.IDCORPO).innerHTML = ins; |
148 | + i3GEO.interface.IDMAPA = "img"; | ||
141 | }, | 149 | }, |
142 | inicia:function(){ | 150 | inicia:function(){ |
143 | if ($i("contemImg")) | 151 | if ($i("contemImg")) |
@@ -157,7 +165,9 @@ i3GEO.interface = { | @@ -157,7 +165,9 @@ i3GEO.interface = { | ||
157 | i3GEO.gadgets.mostraCoordenadasGEO(); | 165 | i3GEO.gadgets.mostraCoordenadasGEO(); |
158 | i3GEO.gadgets.mostraEscalaNumerica(); | 166 | i3GEO.gadgets.mostraEscalaNumerica(); |
159 | i3GEO.gadgets.mostraEscalaGrafica(); | 167 | i3GEO.gadgets.mostraEscalaGrafica(); |
168 | + i3GEO.gadgets.mostraMenuSuspenso(); | ||
160 | i3GEO.gadgets.visual.inicia(); | 169 | i3GEO.gadgets.visual.inicia(); |
170 | + i3GEO.idioma.mostraSeletor(); | ||
161 | i3GEO.ajuda.ativaLetreiro(i3GEO.parametros.mensagens); | 171 | i3GEO.ajuda.ativaLetreiro(i3GEO.parametros.mensagens); |
162 | // | 172 | // |
163 | //inicia as barras de ferramentas | 173 | //inicia as barras de ferramentas |
@@ -220,6 +230,7 @@ i3GEO.interface = { | @@ -220,6 +230,7 @@ i3GEO.interface = { | ||
220 | var f = $i("flamingo"); | 230 | var f = $i("flamingo"); |
221 | f.style.width = w; | 231 | f.style.width = w; |
222 | f.style.height = h; | 232 | f.style.height = h; |
233 | + i3GEO.interface.IDMAPA = "flamingo"; | ||
223 | } | 234 | } |
224 | }, | 235 | }, |
225 | inicia: function(){ | 236 | inicia: function(){ |
@@ -247,6 +258,8 @@ i3GEO.interface = { | @@ -247,6 +258,8 @@ i3GEO.interface = { | ||
247 | Function: openlayers | 258 | Function: openlayers |
248 | 259 | ||
249 | Interface baseada no software openlayers | 260 | Interface baseada no software openlayers |
261 | + | ||
262 | + O objeto openlayers criado nessa função pode ser acessado na variável i3geoOL | ||
250 | */ | 263 | */ |
251 | openlayers:{ | 264 | openlayers:{ |
252 | redesenha: function(){ | 265 | redesenha: function(){ |
@@ -280,6 +293,7 @@ i3GEO.interface = { | @@ -280,6 +293,7 @@ i3GEO.interface = { | ||
280 | f.style.width = w; | 293 | f.style.width = w; |
281 | f.style.height = h; | 294 | f.style.height = h; |
282 | } | 295 | } |
296 | + i3GEO.interface.IDMAPA = "openlayers"; | ||
283 | }, | 297 | }, |
284 | inicia: function(){ | 298 | inicia: function(){ |
285 | var montaMapa = function(){ | 299 | var montaMapa = function(){ |
@@ -363,6 +377,75 @@ i3GEO.interface = { | @@ -363,6 +377,75 @@ i3GEO.interface = { | ||
363 | }; | 377 | }; |
364 | i3GEO.php.openlayers(montaMapa); | 378 | i3GEO.php.openlayers(montaMapa); |
365 | } | 379 | } |
380 | + }, | ||
381 | + /* | ||
382 | + Function: googlemaps | ||
383 | + | ||
384 | + Interface baseada no software googlemaps | ||
385 | + */ | ||
386 | + googlemaps:{ | ||
387 | + redesenha: function(){ | ||
388 | + if(map != ""){ | ||
389 | + map.removeOverlay(wmsmap); | ||
390 | + posfixo = posfixo + "&"; | ||
391 | + wmsmap = new GGroundOverlay(i3GEO.interface.googlemaps.criaWMS()+posfixo, map.getBounds()); | ||
392 | + map.addOverlay(wmsmap); | ||
393 | + } | ||
394 | + }, | ||
395 | + cria: function(w,h){ | ||
396 | + posfixo = "&"; | ||
397 | + var i = $i(i3GEO.interface.IDCORPO); | ||
398 | + if(i){ | ||
399 | + var f = $i("googlemaps"); | ||
400 | + if(!f){ | ||
401 | + var ins = '<div id=googlemaps style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>'; | ||
402 | + i.innerHTML = ins; | ||
403 | + } | ||
404 | + var f = $i("googlemaps"); | ||
405 | + f.style.width = w; | ||
406 | + f.style.height = h; | ||
407 | + } | ||
408 | + map = ""; | ||
409 | + i3GEO.interface.IDMAPA = "googlemaps"; | ||
410 | + }, | ||
411 | + inicia: function(){ | ||
412 | + var pol = i3GEO.parametros.mapexten; | ||
413 | + var ret = pol.split(" "); | ||
414 | + var pt1 = (( (ret[0] * -1) - (ret[2] * -1) ) / 2) + ret[0] *1; | ||
415 | + var pt2 = (((ret[1] - ret[3]) / 2)* -1) + ret[1] *1; | ||
416 | + map = new GMap2($i("googlemaps")); | ||
417 | + map.setMapType(G_SATELLITE_MAP); | ||
418 | + map.addControl(new GLargeMapControl()); | ||
419 | + map.addControl(new GMapTypeControl()); | ||
420 | + map.addControl(new GScaleControl()); | ||
421 | + map.setCenter(new GLatLng(pt2,pt1), 8); | ||
422 | + wmsmap = new GGroundOverlay(i3GEO.interface.googlemaps.criaWMS(), map.getBounds()); | ||
423 | + map.addOverlay(wmsmap); | ||
424 | + GEvent.addListener(map, "zoomend", function() { | ||
425 | + map.removeOverlay(wmsmap); | ||
426 | + wmsmap = new GGroundOverlay(i3GEO.interface.googlemaps.criaWMS(), map.getBounds()); | ||
427 | + map.addOverlay(wmsmap); | ||
428 | + }); | ||
429 | + GEvent.addListener(map, "dragend", function() { | ||
430 | + map.removeOverlay(wmsmap); | ||
431 | + wmsmap = new GGroundOverlay(i3GEO.interface.googlemaps.criaWMS(), map.getBounds()); | ||
432 | + map.addOverlay(wmsmap); | ||
433 | + }); | ||
434 | + }, | ||
435 | + bbox: function(){ | ||
436 | + var bd = map.getBounds(); | ||
437 | + var so = bd.getSouthWest(); | ||
438 | + var ne = bd.getNorthEast(); | ||
439 | + var bbox = so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat(); | ||
440 | + return (bbox); | ||
441 | + }, | ||
442 | + criaWMS: function(){ | ||
443 | + var cgi = i3GEO.configura.locaplic+"/classesphp/parse_cgi.php?g_sid="+i3GEO.configura.sid; | ||
444 | + var parametros = "&map_size="+parseInt($i("googlemaps").style.width); | ||
445 | + parametros += ","+parseInt($i("googlemaps").style.height); | ||
446 | + parametros += "&mapext="+i3GEO.interface.googlemaps.bbox(); | ||
447 | + parametros += "&map_imagecolor=-1 -1 -1&map_transparent=on"; | ||
448 | + return(cgi+parametros); | ||
449 | + } | ||
366 | } | 450 | } |
367 | - | ||
368 | } | 451 | } |
369 | \ No newline at end of file | 452 | \ No newline at end of file |
classesjs/classe_php.js
@@ -734,5 +734,17 @@ i3GEO.php = { | @@ -734,5 +734,17 @@ i3GEO.php = { | ||
734 | inicia: function(funcao,embedLegenda,w,h){ | 734 | inicia: function(funcao,embedLegenda,w,h){ |
735 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid; | 735 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid; |
736 | cpJSON.call(p,"iniciaMapa",funcao); | 736 | cpJSON.call(p,"iniciaMapa",funcao); |
737 | + }, | ||
738 | + /* | ||
739 | + Function: chaveGoogle | ||
740 | + | ||
741 | + PHP: | ||
742 | + classesphp/mapa_controle.php | ||
743 | + | ||
744 | + <chavegoogle> | ||
745 | + */ | ||
746 | + chaveGoogle: function(funcao){ | ||
747 | + var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=chavegoogle&g_sid="+i3GEO.configura.sid; | ||
748 | + cpJSON.call(p,"chavegoogle",funcao); | ||
737 | } | 749 | } |
738 | }; | 750 | }; |
739 | \ No newline at end of file | 751 | \ No newline at end of file |
classesjs/compactajs.php
@@ -65,7 +65,6 @@ packer("classe_ajuda.js","compactados/classe_ajuda_compacto.js","Normal"); | @@ -65,7 +65,6 @@ packer("classe_ajuda.js","compactados/classe_ajuda_compacto.js","Normal"); | ||
65 | packer("configura.js","compactados/configura_compacto.js","Normal"); | 65 | packer("configura.js","compactados/configura_compacto.js","Normal"); |
66 | packer("classe_configura.js","compactados/classe_configura_compacto.js","Normal"); | 66 | packer("classe_configura.js","compactados/classe_configura_compacto.js","Normal"); |
67 | packer("classe_navega.js","compactados/classe_navega_compacto.js","Normal"); | 67 | packer("classe_navega.js","compactados/classe_navega_compacto.js","Normal"); |
68 | -packer("menususpenso.js","compactados/menususpenso_compacto.js","Normal"); | ||
69 | packer("classe_gadgets.js","compactados/classe_gadgets_compacto.js","Normal"); | 68 | packer("classe_gadgets.js","compactados/classe_gadgets_compacto.js","Normal"); |
70 | packer("classe_eventos.js","compactados/classe_eventos_compacto.js","Normal"); | 69 | packer("classe_eventos.js","compactados/classe_eventos_compacto.js","Normal"); |
71 | packer("classe_barradebotoes.js","compactados/classe_barradebotoes_compacto.js","Normal"); | 70 | packer("classe_barradebotoes.js","compactados/classe_barradebotoes_compacto.js","Normal"); |
@@ -125,7 +124,6 @@ $jsfiles = array( | @@ -125,7 +124,6 @@ $jsfiles = array( | ||
125 | "classe_arvoredetemas.js", | 124 | "classe_arvoredetemas.js", |
126 | "configura.js", | 125 | "configura.js", |
127 | "classe_barradebotoes.js", | 126 | "classe_barradebotoes.js", |
128 | -"menususpenso.js", | ||
129 | "classe_gadgets.js" | 127 | "classe_gadgets.js" |
130 | ); | 128 | ); |
131 | 129 |
classesjs/configura.js
@@ -786,11 +786,5 @@ g_listaFuncoesBotoes = { | @@ -786,11 +786,5 @@ g_listaFuncoesBotoes = { | ||
786 | $i("img").style.cursor="pointer"; | 786 | $i("img").style.cursor="pointer"; |
787 | } | 787 | } |
788 | } | 788 | } |
789 | - }, | ||
790 | - { | ||
791 | - //monta o menu suspenso | ||
792 | - iddiv:"menus", | ||
793 | - tipo:"", | ||
794 | - constroiconteudo:'montaMenuSuspenso("menus")' | ||
795 | } | 789 | } |
796 | ]}; | 790 | ]}; |
classesjs/depreciados.js
@@ -1455,4 +1455,11 @@ function ajaxredesenha(retorno) | @@ -1455,4 +1455,11 @@ function ajaxredesenha(retorno) | ||
1455 | Function: ajaxIniciaParametros (depreciado) | 1455 | Function: ajaxIniciaParametros (depreciado) |
1456 | */ | 1456 | */ |
1457 | function ajaxIniciaParametros(retorno) | 1457 | function ajaxIniciaParametros(retorno) |
1458 | -{i3GEO.atualiza(retorno);} | ||
1459 | \ No newline at end of file | 1458 | \ No newline at end of file |
1459 | +{i3GEO.atualiza(retorno);} | ||
1460 | +/* | ||
1461 | +Function montaMenuSuspenso (depreciado) | ||
1462 | +*/ | ||
1463 | +function montaMenuSuspenso(iddiv){ | ||
1464 | + i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml = iddiv; | ||
1465 | + i3GEO.gadgets.mostraMenuSuspenso(); | ||
1466 | +} | ||
1460 | \ No newline at end of file | 1467 | \ No newline at end of file |
classesjs/i3geonaocompacto.js
@@ -55,7 +55,6 @@ var jsfiles = new Array( | @@ -55,7 +55,6 @@ var jsfiles = new Array( | ||
55 | "classe_arvoredetemas.js", | 55 | "classe_arvoredetemas.js", |
56 | "configura.js", | 56 | "configura.js", |
57 | "classe_barradebotoes.js", | 57 | "classe_barradebotoes.js", |
58 | -"menususpenso.js", | ||
59 | "../pacotes/richdraw/richdraw_tudo_compacto.js", | 58 | "../pacotes/richdraw/richdraw_tudo_compacto.js", |
60 | "classe_gadgets.js" | 59 | "classe_gadgets.js" |
61 | ); | 60 | ); |
classesjs/menususpenso.js
@@ -1,103 +0,0 @@ | @@ -1,103 +0,0 @@ | ||
1 | -/** | ||
2 | -Title: menususpenso.js | ||
3 | - | ||
4 | -Monta o menu suspenso com as opções adicionais do i3geo. | ||
5 | - | ||
6 | -O menu suspenso é criado utilizando-se a biblioteca YUI. | ||
7 | - | ||
8 | -O conteúdo do menu é definido na variável oMenuData, veja configura.js | ||
9 | - | ||
10 | -File: i3geo/classesjs/menususpenso.js | ||
11 | - | ||
12 | - | ||
13 | -About: Licença | ||
14 | - | ||
15 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | ||
16 | - | ||
17 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | ||
18 | -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | ||
19 | - | ||
20 | -Este programa é software livre; você pode redistribuí-lo | ||
21 | -e/ou modificá-lo sob os termos da Licença Pública Geral | ||
22 | -GNU conforme publicada pela Free Software Foundation; | ||
23 | -tanto a versão 2 da Licença. | ||
24 | -Este programa é distribuído na expectativa de que seja útil, | ||
25 | -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | ||
26 | -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | ||
27 | -Consulte a Licença Pública Geral do GNU para mais detalhes. | ||
28 | -Você deve ter recebido uma cópia da Licença Pública Geral do | ||
29 | -GNU junto com este programa; se não, escreva para a | ||
30 | -Free Software Foundation, Inc., no endereço | ||
31 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
32 | - | ||
33 | -*/ | ||
34 | -/* | ||
35 | -Function: montaMenuSuspenso | ||
36 | - | ||
37 | -Monta o menu baseado na variável oMenuData | ||
38 | - | ||
39 | -Parameters: | ||
40 | - | ||
41 | -iddiv - id do DIV que receberá o menu | ||
42 | -*/ | ||
43 | -function montaMenuSuspenso(iddiv) | ||
44 | -{ | ||
45 | - if($i(iddiv)) | ||
46 | - { | ||
47 | - $i(iddiv).className="yuimenubar"; | ||
48 | - if(oMenuData.ajudas) | ||
49 | - { | ||
50 | - var ins = ""; | ||
51 | - ins += '<div class="bd" style="align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'; | ||
52 | - ins += '<ul class="first-of-type" style="border:0px solid white;top:10px;">'; | ||
53 | - var sobe = ""; | ||
54 | - if(navn){var sobe = "line-height:0px;";} | ||
55 | - if(i3GEO.parametros.w >= 500) | ||
56 | - { | ||
57 | - ins += '<li class="yuimenubaritem first-of-type" style="'+sobe+'float:left;border: 0px solid white;" >'; | ||
58 | - ins += ' <img style="border: 1px solid white;padding:0 0px;top:-7px;" src="'+i3GEO.util.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\'pt\')" id="brasil" alt="Portugues"/>'; | ||
59 | - ins += '</li><li class="yuimenubaritem" style="'+sobe+'float:left;border: 0px solid white;" > <img style="padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+i3GEO.util.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\'en\')" alt"Ingles" id="uk" />'; | ||
60 | - ins += '</li><li class="yuimenubaritem" style="'+sobe+'float:left;border: 0px solid white;" > <img style="padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+i3GEO.util.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\'es\')" id="espanhol" alt="Espanhol" />'; | ||
61 | - ins += '</li><li class="yuimenubaritem" style="'+sobe+'float:left;border: 0px solid white;" > <img style="padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+i3GEO.util.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\'it\')" id="italiano" alt="Italiano" />'; | ||
62 | - ins += '</li>'; | ||
63 | - } | ||
64 | - ins += '<li class="yuimenubaritem" style="padding-bottom:5px" ><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuajuda" > '+$trad("s1")+'</a></li>'; | ||
65 | - ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuanalise" > '+$trad("s2")+'</a></li>'; | ||
66 | - ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menujanelas" > '+$trad("s3")+'</a></li>'; | ||
67 | - ins += '<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuarquivos" > '+$trad("s4")+'</a></li>'; | ||
68 | - ins += '</ul>'; | ||
69 | - ins += '</div>'; | ||
70 | - $i("menus").innerHTML=ins; | ||
71 | - } | ||
72 | - function onMenuBarBeforeRender(p_sType, p_sArgs) | ||
73 | - { | ||
74 | - if(i3GEO.parametros.w >= 500) | ||
75 | - {var conta = 4;} | ||
76 | - else | ||
77 | - {var conta = 0;} | ||
78 | - for(var nomeMenu in oMenuData) | ||
79 | - { | ||
80 | - var v="this.getItem("+conta+").cfg.setProperty('submenu',{id:'"+nomeMenu+"',itemdata: oMenuData['"+nomeMenu+"']})"; | ||
81 | - eval(v); | ||
82 | - var conta=conta+1; | ||
83 | - } | ||
84 | - } | ||
85 | - var oMenuBar=new YAHOO.widget.MenuBar(iddiv,{autosubmenudisplay: true, showdelay: 150, hidedelay: 250, lazyload: false}); | ||
86 | - oMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender); | ||
87 | - oMenuBar.render(); | ||
88 | - // | ||
89 | - //corrige problemas de estilo | ||
90 | - // | ||
91 | - var temp = $i("menus").style; | ||
92 | - temp.backgroundPosition = "0px -5px"; | ||
93 | - temp.border = "0px solid white"; | ||
94 | - var temp = $i(iddiv).style; | ||
95 | - temp.backgroundPosition = "0px -5px"; | ||
96 | - temp.border = "0px solid white"; | ||
97 | - if($i("contemMenu")) | ||
98 | - { | ||
99 | - $i("contemMenu").className="yui-navset"; | ||
100 | - } | ||
101 | - } | ||
102 | -} | ||
103 | -function testamenususpenso(){} |
classesphp/mapa_controle.php
@@ -232,6 +232,17 @@ Include: | @@ -232,6 +232,17 @@ Include: | ||
232 | $cp->set_data($resultado); | 232 | $cp->set_data($resultado); |
233 | break; | 233 | break; |
234 | /* | 234 | /* |
235 | +Property: chavegoogle | ||
236 | + | ||
237 | +Retorna o valor da chave registrada para a API do Google maps | ||
238 | + | ||
239 | +Essa chave deve ser registrada em i3geo/ms_configura.php | ||
240 | +*/ | ||
241 | + case "chavegoogle": | ||
242 | + $cp->set_data($googleApiKey); | ||
243 | + break; | ||
244 | + | ||
245 | +/* | ||
235 | Property: funcoesGeometrias | 246 | Property: funcoesGeometrias |
236 | 247 | ||
237 | Processa geometrias, armazenadas no formato I3Geo, gerando uma nova geometria. | 248 | Processa geometrias, armazenadas no formato I3Geo, gerando uma nova geometria. |
menutemas/admin.db
No preview for this file type
ms_criamapa.php
@@ -141,6 +141,7 @@ $postgis_mapa_ = $postgis_mapa; | @@ -141,6 +141,7 @@ $postgis_mapa_ = $postgis_mapa; | ||
141 | $tituloInstituicao_ = $tituloInstituicao; | 141 | $tituloInstituicao_ = $tituloInstituicao; |
142 | $atlasxml_ = $atlasxml; | 142 | $atlasxml_ = $atlasxml; |
143 | $expoeMapfile_ = $expoeMapfile; | 143 | $expoeMapfile_ = $expoeMapfile; |
144 | +$googleApiKey_ = $googleApiKey; | ||
144 | // | 145 | // |
145 | //se houver string de conexão para substituição | 146 | //se houver string de conexão para substituição |
146 | //o modo cgi não irá funcionar | 147 | //o modo cgi não irá funcionar |
@@ -198,6 +199,7 @@ $_SESSION["utilizacgi"] = $utilizacgi_; | @@ -198,6 +199,7 @@ $_SESSION["utilizacgi"] = $utilizacgi_; | ||
198 | $_SESSION["tituloInstituicao"] = $tituloInstituicao_; | 199 | $_SESSION["tituloInstituicao"] = $tituloInstituicao_; |
199 | $_SESSION["atlasxml"] = $atlasxml; | 200 | $_SESSION["atlasxml"] = $atlasxml; |
200 | $_SESSION["expoeMapfile"] = $expoeMapfile; | 201 | $_SESSION["expoeMapfile"] = $expoeMapfile; |
202 | +$_SESSION["googleApiKey"] = $googleApiKey_; | ||
201 | //rotina de segurança, ver http://shiflett.org/articles/the-truth-about-sessions | 203 | //rotina de segurança, ver http://shiflett.org/articles/the-truth-about-sessions |
202 | $fingerprint = 'I3GEOSEC' . $_SERVER['HTTP_USER_AGENT']; | 204 | $fingerprint = 'I3GEOSEC' . $_SERVER['HTTP_USER_AGENT']; |
203 | $_SESSION['fingerprint'] = md5($fingerprint . session_id()); | 205 | $_SESSION['fingerprint'] = md5($fingerprint . session_id()); |
@@ -468,7 +470,6 @@ interface = arquivo html que será aberto | @@ -468,7 +470,6 @@ interface = arquivo html que será aberto | ||
468 | */ | 470 | */ |
469 | if ($interface != "mashup") | 471 | if ($interface != "mashup") |
470 | { | 472 | { |
471 | - echo "<br><br><span style='color:gray;font-size: 10px;font-family: Verdana, Arial, Helvetica, sans-serif;' >Tempo de processamento no servidor em segundos: ".((microtime(1) - $tempo))."<span>"; | ||
472 | if (count(explode(".php",$interface)) > 1) | 473 | if (count(explode(".php",$interface)) > 1) |
473 | { | 474 | { |
474 | if (file_exists($caminho."aplicmap/".$interface)) | 475 | if (file_exists($caminho."aplicmap/".$interface)) |
@@ -479,6 +480,8 @@ if ($interface != "mashup") | @@ -479,6 +480,8 @@ if ($interface != "mashup") | ||
479 | } | 480 | } |
480 | else | 481 | else |
481 | { | 482 | { |
483 | + echo "<br><br><span style='color:gray;font-size: 10px;font-family: Verdana, Arial, Helvetica, sans-serif;' >Tempo de processamento no servidor em segundos: ".((microtime(1) - $tempo))."<span>"; | ||
484 | + | ||
482 | if (file_exists($caminho."aplicmap/".$interface)) | 485 | if (file_exists($caminho."aplicmap/".$interface)) |
483 | {$urln = $caminho."aplicmap/".$interface."?".session_id();} | 486 | {$urln = $caminho."aplicmap/".$interface."?".session_id();} |
484 | else | 487 | else |