Commit a3a7360056b87f35910d71f9cf1588c928cd4241
1 parent
ed6ab524
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
0 additions
and
293 deletions
Show diff stats
ferramentas/identifica/index.htm
... | ... | @@ -1,41 +0,0 @@ |
1 | -<html> | |
2 | -<head> | |
3 | -<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
4 | -<link rel="stylesheet" type="text/css" href="../../css/i3geo_ferramentas.css"> | |
5 | -<link rel="stylesheet" type="text/css" href="../../pacotes/yui231/build/tabview/assets/skins/sam/tabview.css"> | |
6 | -<style>.yuibutton button{padding-left:2em;background:url(../../imagens/tic.png) 5% 50% no-repeat;}</style> | |
7 | -</head> | |
8 | -<body class="yui-skin-sam" > | |
9 | - <div class=verdeescuro style="top:0px;cursor:pointer;left:0px;"> | |
10 | - <div id=guia1 >Temas visíveis</div> | |
11 | - <div id=guia2 >Todos os temas</div> | |
12 | - <div id=guia3 >Propriedades</div> | |
13 | - </div> | |
14 | - | |
15 | - <span id=geral style="left:0px;top:0px;"> | |
16 | - | |
17 | - <div class=guiaobj id="guia1obj" style="left:1px"> | |
18 | - <div id="resultado" style="overflow:auto;height:200px;display:block;position:relative;top:-5px;left:0px;width:150px"></div> | |
19 | - <div id="ocorrencia" style="display:block;position:absolute;top:5px;left:160px"></div> | |
20 | - </div> | |
21 | - <div class=guiaobj id="guia2obj" style="left:1px"> | |
22 | - </div> | |
23 | - <div class=guiaobj id="guia3obj" style="left:1px;top:10px;display:none;font-size:12px;overflow:hidden" > | |
24 | - Resolução de busca - número de pixels, no entorno do ponto clicado no mapa, que serão utilizados na busca de dados:<br> <input type=text class=digitar value=5 id=resolucao size=2 /> | |
25 | - </div> | |
26 | - </span> | |
27 | - | |
28 | - <div id="aguarde"> | |
29 | - <img alt="" src="../../imagens/aguarde.gif" />Aguarde... | |
30 | - </div> | |
31 | - <div id=xy style="display:none;position:relative;top:10px;left:5px"> | |
32 | - </div> | |
33 | - | |
34 | -</div> | |
35 | -</body> | |
36 | -<script language="JavaScript" type="text/javascript" src="../../classesjs/redesenho_compacto.js"></script> | |
37 | -<script src="../i3geo_tudo_compacto.js" type="text/javascript"></script> | |
38 | -<script language="JavaScript" type="text/javascript" src="index.js"></script><script> | |
39 | -inicializaJanela() | |
40 | -</script> | |
41 | -</html> | |
42 | 0 | \ No newline at end of file |
ferramentas/identifica/index.js
... | ... | @@ -1,252 +0,0 @@ |
1 | -/* | |
2 | -About: Licença | |
3 | - | |
4 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
5 | - | |
6 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
7 | -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
8 | - | |
9 | -Este programa é software livre; você pode redistribuí-lo | |
10 | -e/ou modificá-lo sob os termos da Licença Pública Geral | |
11 | -GNU conforme publicada pela Free Software Foundation; | |
12 | -tanto a versão 2 da Licença. | |
13 | -Este programa é distribuído na expectativa de que seja útil, | |
14 | -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
15 | -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
16 | -Consulte a Licença Pública Geral do GNU para mais detalhes. | |
17 | -Você deve ter recebido uma cópia da Licença Pública Geral do | |
18 | -GNU junto com este programa; se não, escreva para a | |
19 | -Free Software Foundation, Inc., no endereço | |
20 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
21 | -*/ | |
22 | -//inicializa | |
23 | -function inicializaJanela() | |
24 | -{ | |
25 | - aguarde("block") | |
26 | - ativaGuias("") | |
27 | - mostraGuia("guia1") | |
28 | - g_locaplic = window.parent.g_locaplic | |
29 | - xpt = unescape(((((window.location.href).split("x="))[1]).split("&"))[0] ); | |
30 | - ypt = unescape(((((window.location.href).split("y="))[1]).split("&"))[0] ); | |
31 | - escala = unescape(((((window.location.href).split("x="))[1]).split("&"))[0] ); | |
32 | - //eventos das guias | |
33 | - $i("guia1").onclick = function(){listaTemasLigados();mostraGuia("guia1")} | |
34 | - $i("guia2").onclick = function(){listaTodos()} | |
35 | - $i("guia3").onclick = function(){mostraGuia("guia3")} | |
36 | - $i("xy").innerHTML = "x: " + xpt + " y: " + ypt | |
37 | - listaTemasLigados() | |
38 | -} | |
39 | -//le o arquivo opcional de sistemas | |
40 | -function pegavalSistemas(xmlDoc) | |
41 | -{ | |
42 | - aguarde("none"); | |
43 | - if (xmlDoc != undefined) | |
44 | - { | |
45 | - var sis = xmlDoc.getElementsByTagName("FUNCAO") | |
46 | - for (ig=0;ig<sis.length;ig++) | |
47 | - { | |
48 | - var sistema = sis[ig].getElementsByTagName("NOMESIS")[0].firstChild.nodeValue | |
49 | - var exec = sis[ig].getElementsByTagName("ABRIR")[0].firstChild.nodeValue | |
50 | - var t = "blank" | |
51 | - if (sis[ig].getElementsByTagName("TARGET")[0]) | |
52 | - {t = sis[ig].getElementsByTagName("TARGET")[0].firstChild.nodeValue} | |
53 | - sistemasAdicionais.push(sistema+","+exec+","+t) | |
54 | - } | |
55 | - if (sistemasAdicionais.length > 0) | |
56 | - { | |
57 | - var linhas = "" | |
58 | - for (l=0;l<sistemasAdicionais.length;l++) | |
59 | - { | |
60 | - var ltema = sistemasAdicionais[l].split(",") | |
61 | - if (ltema.length > 1) | |
62 | - linhas += "<span style='text-align:left;font-size:10px;cursor:pointer' onclick='identificasistema("+ltema[1]+",\""+ltema[2]+"\")'><input style=cursor:default type=radio name=tema />"+ltema[0]+"<br></span>" | |
63 | - } | |
64 | - $i("resultado").innerHTML += linhas | |
65 | - } | |
66 | - } | |
67 | - aguarde("none"); | |
68 | -} | |
69 | -//lista os temas ligados | |
70 | -function listaTemasLigados() | |
71 | -{ | |
72 | - aguarde("none"); | |
73 | - var lista = (window.parent.objmapa.temas).split(";") | |
74 | - var b = window.parent.convdmsf(xpt,ypt); | |
75 | - var x = b[0].split(" ") | |
76 | - var y = b[1].split(" ") | |
77 | - var w = "W" | |
78 | - var s = "S" | |
79 | - if (x[0]*1 > 0){w = "L"} | |
80 | - if (y[0]*1 > 0){s = "N"} | |
81 | - if (x[0]*1 < 0){x[0] = x[0]*-1} | |
82 | - if (y[0]*1 < 0){y[0] = y[0]*-1} | |
83 | - var param = y[0]+"_"+y[1]+"_"+y[2]+"_"+s+"_"+x[0]+"_"+x[1]+"_"+x[2]+"_"+w | |
84 | - var url = "http://tools.wikimedia.de/~magnus/geo/geohack.php?params="+param//15_48_00_S_47_51_50_W | |
85 | - var linhas = "<a href='"+url+"' target=blank >Buscadores web</a><br>" | |
86 | - linhas += "Clique no tema para ver os dados<table class=lista2 >" | |
87 | - var linhas1 = ""; | |
88 | - for (l=0;l<lista.length;l++) | |
89 | - { | |
90 | - var ltema = lista[l].split("*") | |
91 | - if(ltema[1] == 2) | |
92 | - { | |
93 | - linhas1 += "<tr><td><input onclick='identifica(\""+ltema[0]+"\")' style=cursor:pointer type=radio name=tema /></td><td>"+ltema[2]+"</td></tr>" | |
94 | - } | |
95 | - } | |
96 | - $i("resultado").innerHTML = linhas+"<table class=lista ><tr><td style=text-align:left ><input onclick='identifica(\"ligados\")' style=cursor:pointer type=radio name=tema /></td><td>Todos</td></tr>"+linhas1+"</table>" | |
97 | - //verifica se existem sistemas para identificar | |
98 | - g_locidentifica = window.parent.g_locidentifica | |
99 | - if (g_locidentifica != "") | |
100 | - { | |
101 | - sistemasAdicionais = new Array() | |
102 | - ajaxexecASXml(g_locidentifica,"pegavalSistemas") | |
103 | - } | |
104 | - if (window.parent.objmapa.temaAtivo == "") | |
105 | - { | |
106 | - var temp = "" | |
107 | - for (l=0;l<lista.length;l++) | |
108 | - { | |
109 | - var ltema = lista[l].split("*") | |
110 | - if(ltema[1] == 2) | |
111 | - {var temp = ltema[0];break;} | |
112 | - } | |
113 | - window.parent.objmapa.temaAtivo = temp | |
114 | - identifica(temp) | |
115 | - } | |
116 | - else | |
117 | - {identifica(window.parent.objmapa.temaAtivo)} | |
118 | -} | |
119 | -//lista os temas ligados | |
120 | -function listaTodos() | |
121 | -{ | |
122 | - var lista = (window.parent.objmapa.temas).split(";") | |
123 | - var linhas = "Clique no tema para ver os dados<table class=lista2 >" | |
124 | - for (l=0;l<lista.length;l++) | |
125 | - { | |
126 | - var ltema = lista[l].split("*") | |
127 | - if (ltema[2] != 2) | |
128 | - linhas += "<tr><td><input onclick='identifica(\""+ltema[0]+"\")' style=cursor:pointer type=radio name=tema /></td><td>"+ltema[2]+"</td></tr>" | |
129 | - } | |
130 | - $i("resultado").innerHTML = "<table>"+linhas+"</table>" | |
131 | - mostraGuia("guia1"); | |
132 | -} | |
133 | -//identifica o sistema clicado | |
134 | -function identificasistema(exec,t) | |
135 | -{ | |
136 | - var resolucao = $i("resolucao").value; | |
137 | - if ((t == "blank") || (t == "new") || (t == "BLANK") || (t == "NEW") || (t == "")) | |
138 | - {window.open(exec)} | |
139 | - else | |
140 | - {window.location.href = exec} | |
141 | -} | |
142 | -//identifica o tema clicado | |
143 | -function identifica(tema) | |
144 | -{ | |
145 | - var resolucao = $i("resolucao").value; | |
146 | - window.parent.objmapa.temaAtivo = tema; | |
147 | - var temp = $i("xy").innerHTML | |
148 | - var tempy = temp.split("y: ") | |
149 | - ypt = tempy[1] | |
150 | - var tempx = tempy[0] | |
151 | - tempx = tempx.split("x: ") | |
152 | - xpt = tempx[1] | |
153 | - $i("ocorrencia").innerHTML="<img src='../../imagens/aguarde.gif' />" | |
154 | - //var resolucao = "0.01" | |
155 | - if (tema == "ligados"){var opcao = "ligados"} | |
156 | - else | |
157 | - {var opcao = "tema"} | |
158 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=identifica&xy="+xpt+" ,"+ypt+"&opcao="+opcao+"&resolucao="+resolucao+"&tema="+tema | |
159 | - var cp = new cpaint(); | |
160 | - //cp.set_debug(2) | |
161 | - cp.set_response_type("JSON"); | |
162 | - cp.call(p,"identifica",mostraf); | |
163 | -} | |
164 | -//mostra uma ocorrencia em um div a parte | |
165 | -function mostraf(retorno) | |
166 | -{ | |
167 | - var res = "" | |
168 | - if (retorno.data != undefined) | |
169 | - { | |
170 | - var retorno = retorno.data | |
171 | - var re = new RegExp("zzzzzzzzzz","g") | |
172 | - var retorno = retorno.replace(re,"<br>") | |
173 | - var re = new RegExp('" ',"g") | |
174 | - var retorno = retorno.replace(re,'"<br>') | |
175 | - var re = new RegExp("' ","g") | |
176 | - var retorno = retorno.replace(re,"'<br>") | |
177 | - var reg = /Erro./; | |
178 | - if (retorno.search(reg) != -1) | |
179 | - { | |
180 | - $i("ocorrencia").innerHTML="OOps! Ocorreu um erro\n"+retorno; | |
181 | - return; | |
182 | - } | |
183 | - $i("ocorrencia").innerHTML="" | |
184 | - var octemas = retorno.split("!") | |
185 | - for (octemasc=0;octemasc<octemas.length;octemasc++) | |
186 | - { | |
187 | - var titulo = octemas[octemasc].split("@") | |
188 | - var contat = 0 | |
189 | - if (!titulo[1]) | |
190 | - { | |
191 | - //aguarde("none") | |
192 | - //$i("ocorrencia").innerHTML = "<p style=color:red >Ocorreu um erro<br>" | |
193 | - break | |
194 | - } | |
195 | - var ocs = titulo[1].split("*") | |
196 | - res += "<div style='left:2px;text-align:left;background-color:white;width:100%' >"+titulo[0]+"</div>" | |
197 | - //verifica se é WS | |
198 | - var pares = ocs[1].split("##") | |
199 | - var valores = pares[0].split("#") | |
200 | - //dados vem de uma chamada WS | |
201 | - if (valores[1] == undefined) | |
202 | - { | |
203 | - res += "<div style=text-align:left >Resultado: <pre><i>" + valores[0] + "</i></pre></div>" | |
204 | - res += "<div>------</div>" | |
205 | - $i("ocorrencia").innerHTML=res | |
206 | - //return | |
207 | - } | |
208 | - var contao = 0 | |
209 | - for (oc=0;oc<ocs.length;oc++) | |
210 | - { | |
211 | - if (ocs[oc] != "") | |
212 | - { | |
213 | - var pares = ocs[oc].split("##") | |
214 | - if (contao == 1){var ver = true} | |
215 | - else {var ver = false} | |
216 | - var contav = 0 | |
217 | - var cor = "RGB(245,245,245)"; | |
218 | - for (par=0;par<pares.length;par++) | |
219 | - { | |
220 | - var valores = pares[par].split("#") | |
221 | - var vlink = valores[2] | |
222 | - if ((valores[2] != " ") && (valores[2] != undefined)) | |
223 | - {res = res + "<div style='width:100%;text-align:left;background-color:"+cor+"' > " + valores[0] + " <a href='" + vlink + "' > link</a></div>"} | |
224 | - else if ((valores[2] == " ") || (valores[2] != undefined)) | |
225 | - { | |
226 | - var testaIcone = (valores[0].split(".png")).length | |
227 | - if (testaIcone == 1) //nao é do tipo ícone | |
228 | - {res = res + "<div style='border-top:0px solid brown;font-size:9px;width:100%;text-align:left;background-color:"+cor+"' ><b> " + valores[0] + " </b>" + valores[1] + "</div>"} | |
229 | - else //corrige o caminho do ícone | |
230 | - { | |
231 | - var i = valores[0].replace("..","../..") | |
232 | - res = res + "<div style='width:100%;text-align:left;background-color:"+cor+"' >" + i + " <i>" + valores[1] + "</i></div>" | |
233 | - } | |
234 | - } | |
235 | - contav = contav + 1 | |
236 | - if (cor == "RGB(245,245,245)"){cor = "RGB(230,230,230)";} | |
237 | - else | |
238 | - {cor = "RGB(245,245,245)";} | |
239 | - } | |
240 | - //res += "<div style='border-top:1px solid gray;background-color:gray;width:100%;' ><br></div>" | |
241 | - } | |
242 | - contao = contao + 1 | |
243 | - } | |
244 | - } | |
245 | - $i("ocorrencia").innerHTML=res | |
246 | - } | |
247 | - else | |
248 | - { | |
249 | - aguarde("none") | |
250 | - $i("ocorrencia").innerHTML = "<p style=color:red >Ocorreu um erro<br>" | |
251 | - } | |
252 | -} | |
253 | 0 | \ No newline at end of file |