Commit 503ab7d16dcb3d589d1479da931840cb6125d374
1 parent
b02e3372
Exists in
master
and in
7 other branches
Movido para depreciados as ferramentas conectarwfs e downloadbase
Showing
4 changed files
with
243 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,84 @@ |
| 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 | +<title></title> | |
| 6 | +<style type="text/css" >button{background:url(../../imagens/tic.png) 98% 50% no-repeat;}</style> | |
| 7 | +<link rel="stylesheet" type="text/css" href="../../pacotes/yui270/build/button/assets/skins/sam/button.css"/> | |
| 8 | +<style type="text/css"> | |
| 9 | +body { | |
| 10 | + margin:0; | |
| 11 | + padding:0;border:0px; | |
| 12 | +} | |
| 13 | +</style> | |
| 14 | +</head> | |
| 15 | +<body name="ancora" class="yui-skin-sam"> | |
| 16 | +<div id=fundo > | |
| 17 | + <div id=guiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;"> | |
| 18 | + <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;"> | |
| 19 | + <li><a href="#ancora"><em><div id="guia1" style="text-align:center;font-size:10px;left:0px;" >Serviços</div></em></a></li> | |
| 20 | + <li><a href="#ancora"><em><div id="guia2" style="text-align:center;font-size:10px;left:0px;" >Metadados</div></em></a></li> | |
| 21 | + <li><a href="#ancora"><em><div id="guia3" style="text-align:center;font-size:10px;left:0px;" >Temas</div></em></a></li> | |
| 22 | + </ul> | |
| 23 | + </div> | |
| 24 | + <div id=geral > | |
| 25 | + <div class=guiaobj id="guia1obj" style="width:320px"> | |
| 26 | + <div style="text-align:left;color:navy;cursor:pointer;width:100%;position:relative;top:5px;left:0px"> | |
| 27 | + <p>Digite o endereço do serviço ou escolha da lista abaixo. Utilize as guias acima para ver o resultado do acesso.<br> | |
| 28 | + <input class=digitar id=servico value="" size=60 /> | |
| 29 | + <!-- | |
| 30 | + <p onclick="registraws('http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&')">Agência Nacional das Águas | |
| 31 | + --> | |
| 32 | + <div id=RSSwms style="text-align:left"></div> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | + <div class=guiaobj id="guia2obj" style="display:none;width:320px"> | |
| 36 | + <input class=executar type=buttom value="getCapabilities" size=20 onclick="getcapabilities()" /><br> | |
| 37 | + <div id=resultadoget style="display:block;position:relative;top:5px;left:0px"> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + <div class=guiaobj id="guia3obj" style="display:none;width:320px"> | |
| 41 | + <div style="display:block;position:relative;top:5px;left:0px;"> | |
| 42 | + Selecione a camada que será adicionada ao mapa.<br> | |
| 43 | + </div> | |
| 44 | + <div id=listatemas style="display:block;position:relative;top:10px;left:0px;"> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + <div id="aguarde"> | |
| 49 | + <img alt="" src="../../imagens/aguarde.gif" />Aguarde... | |
| 50 | + </div> | |
| 51 | +</div> | |
| 52 | + | |
| 53 | +<script language="JavaScript" type="text/javascript" src="../funcoes.js"></script> | |
| 54 | +<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
| 55 | +<script language="JavaScript" type="text/javascript" src="index.js"></script> | |
| 56 | + | |
| 57 | +<script type="text/javascript" > | |
| 58 | +g_RSSwms = new Array("http://mapas.mma.gov.br/i3geo/menutemas/servicoswfs.xml") | |
| 59 | +g_locaplic = window.parent.g_locaplic; | |
| 60 | +if (document.getElementById("RSSwms")) | |
| 61 | +{ | |
| 62 | + if (g_RSSwms.length > 0) | |
| 63 | + { | |
| 64 | + var p = g_locaplic+"/classesphp/wscliente.php?funcao=listaRSSws&rss="+g_RSSwms.join("|"); | |
| 65 | + var cp = new cpaint(); | |
| 66 | + //cp.set_debug(2) | |
| 67 | + cp.set_response_type("JSON"); | |
| 68 | + cp.call(p,"listaRSSws",mostraRetornowmsRSS); | |
| 69 | + } | |
| 70 | +} | |
| 71 | +function mostraRetornowmsRSS(retorno) | |
| 72 | +{ | |
| 73 | + var linhas = retorno.data.split("|") | |
| 74 | + var ins = "" | |
| 75 | + for (i=0;i<linhas.length; i++) | |
| 76 | + { | |
| 77 | + var caso = linhas[i].split("#") | |
| 78 | + ins += "\<p class=clique onclick=\"registraws('"+caso[2]+"')\" \> \<b\>"+caso[0]+"\<\/b\> "+caso[1]+" ("+caso[3]+")\< \/p\>" | |
| 79 | + } | |
| 80 | + document.getElementById("RSSwms").innerHTML = ins+"\<br\>\<br\>" | |
| 81 | +} | |
| 82 | +</script> | |
| 83 | +</body> | |
| 84 | +</html> | ... | ... |
| ... | ... | @@ -0,0 +1,93 @@ |
| 1 | +parametrosURL() | |
| 2 | +//variaveis globais | |
| 3 | +g_tipo = ""; //tipo de tema | |
| 4 | +g_tema = ""; //tema selecionado do ws | |
| 5 | +g_legenda = ""; //legenda do tema | |
| 6 | +g_nometema = ""; //nome do tema | |
| 7 | +aguarde("none"); | |
| 8 | +$i("guia1").onclick = function() | |
| 9 | +{ | |
| 10 | + $i("guia1obj").style.display="block"; | |
| 11 | + $i("resultadoget").innerHTML = ""; | |
| 12 | +} | |
| 13 | +$i("guia2").onclick = function(){clickGuia2();} | |
| 14 | +$i("guia3").onclick = function(){clickGuia3();} | |
| 15 | + | |
| 16 | +function getcapabilities() | |
| 17 | +{ | |
| 18 | + if ($i("servico").value == ""){alert("Serviço não definido");} | |
| 19 | + else | |
| 20 | + { | |
| 21 | + window.open($i("servico").value+"&service=wfs&request=getcapabilities&version=1.1.0") | |
| 22 | + } | |
| 23 | +} | |
| 24 | + | |
| 25 | +function clickGuia2() | |
| 26 | +{ | |
| 27 | + if ($i("servico").value == ""){alert("Serviço não definido");} | |
| 28 | + else | |
| 29 | + { | |
| 30 | + $i("guia2obj").style.display="block"; | |
| 31 | + aguarde("block") | |
| 32 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=getcapabilities3&servico="+$i("servico").value | |
| 33 | + var cp = new cpaint(); | |
| 34 | + //cp.set_debug(2) | |
| 35 | + cp.set_response_type("JSON"); | |
| 36 | + cp.call(p,"getcapabilities3",metadados); | |
| 37 | + } | |
| 38 | +} | |
| 39 | +function clickGuia3() | |
| 40 | +{ | |
| 41 | + $i("guia3obj").style.display="block"; | |
| 42 | + $i("guia1obj").style.display="none"; | |
| 43 | + $i("listatemas").innerHTML = ""; | |
| 44 | + aguarde("block") | |
| 45 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=temaswfs&servico="+$i("servico").value | |
| 46 | + var cp = new cpaint(); | |
| 47 | + //cp.set_debug(2) | |
| 48 | + cp.set_response_type("JSON"); | |
| 49 | + cp.call(p,"temaswfs",listatemas); | |
| 50 | +} | |
| 51 | +function registraws(nome) | |
| 52 | +{ | |
| 53 | + $i("servico").value = nome; | |
| 54 | + g_tipo = ""; //tipo de tema | |
| 55 | + g_tema = ""; //tema selecionado do ws | |
| 56 | + g_legenda = ""; //legenda do tema | |
| 57 | + g_nometema = ""; //nome do tema | |
| 58 | + clickGuia3() | |
| 59 | +} | |
| 60 | + | |
| 61 | +function metadados(retorno) | |
| 62 | +{ | |
| 63 | + if (retorno.data != undefined) | |
| 64 | + { | |
| 65 | + aguarde("none"); | |
| 66 | + $i("resultadoget").innerHTML = retorno.data; | |
| 67 | + } | |
| 68 | + else | |
| 69 | + { | |
| 70 | + aguarde("none") | |
| 71 | + $i("resultadoget").innerHTML = "<p style=color:red >Ocorreu um erro<br>" | |
| 72 | + } | |
| 73 | +} | |
| 74 | +function listatemas(retorno) | |
| 75 | +{ | |
| 76 | + aguarde("none"); | |
| 77 | + if ((retorno.data != "erro") && (retorno.data != undefined)) | |
| 78 | + { | |
| 79 | + $i("listatemas").innerHTML = retorno.data; | |
| 80 | + } | |
| 81 | + else | |
| 82 | + {$i("listatemas").innerHTML = "erro";} | |
| 83 | +} | |
| 84 | +function seltema(nome,titulo,prj,serv) | |
| 85 | +{ | |
| 86 | + var par = "&nome="+nome+"&titulo="+titulo+"&prj="+prj+"&wfs="+serv; | |
| 87 | + aguarde("block") | |
| 88 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=importawfs&servico="+$i("servico").value+par | |
| 89 | + var cp = new cpaint(); | |
| 90 | + cp.set_debug(2) | |
| 91 | + cp.set_response_type("JSON"); | |
| 92 | + cp.call(p,"importawfs",window.parent.i3GEO.atualiza); | |
| 93 | +} | ... | ... |
| ... | ... | @@ -0,0 +1,18 @@ |
| 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="../../pacotes/jsobjects/documentation.css"> | |
| 5 | +<link rel="stylesheet" type="text/css" href="../../css/geral.css"> | |
| 6 | +<style type="text/css"> | |
| 7 | +P{text-align:left;} | |
| 8 | +</style> | |
| 9 | +<title></title> | |
| 10 | +</head> | |
| 11 | +<body name="ancora" style='background-color:white'> | |
| 12 | +<div id=resultado > | |
| 13 | +Aguarde...buscando lista de temas | |
| 14 | +</div> | |
| 15 | +<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
| 16 | +<script language="JavaScript" type="text/javascript" src="index.js"></script> | |
| 17 | +</body> | |
| 18 | +</html> | |
| 0 | 19 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,48 @@ |
| 1 | +var p = window.parent.i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+window.parent.i3GEO.configura.sid+"&funcao=pegalistacompleta" | |
| 2 | +var cp = new cpaint(); | |
| 3 | +//cp.set_debug(2) | |
| 4 | +cp.set_response_type("JSON"); | |
| 5 | +cp.call(p,"pegaListaCompleta",processaTemas); | |
| 6 | +function processaTemas(retorno) | |
| 7 | +{ | |
| 8 | + if (retorno.data != undefined) | |
| 9 | + { | |
| 10 | + var retorno = retorno.data | |
| 11 | + ins = "" | |
| 12 | + var notWhitespace = /\S/; | |
| 13 | + var grupos = retorno.split("**") | |
| 14 | + for (ig=0;ig<grupos.length;ig++) | |
| 15 | + { | |
| 16 | + var temp = grupos[ig].split("||") | |
| 17 | + var nomeGrupo = temp[0] | |
| 18 | + var ngSgrupo = temp[1].split("##") | |
| 19 | + for (sg=0;sg<ngSgrupo.length;sg++) | |
| 20 | + { | |
| 21 | + var temp = ngSgrupo[sg].split("#") | |
| 22 | + var nomeSgrupo = temp[0] | |
| 23 | + var ngTema = temp[1].split("*") | |
| 24 | + for (st=0;st<ngTema.length;st++) | |
| 25 | + { | |
| 26 | + var temp = ngTema[st].split("|") | |
| 27 | + var nome = temp[1] | |
| 28 | + var lk = "" | |
| 29 | + if ( temp[2] != "") | |
| 30 | + {var lk = "<a href="+temp[2]+" target=blank> fonte</a>"} | |
| 31 | + var tid = temp[0] | |
| 32 | + var inp = ""; //"<input style='text-align:left' onclick='mudaboxnf()' class=inputsb style='cursor:pointer' type=\"checkbox\" value="+tid+" onmouseover=\"javascript:mostradicasf(this,'Clique para ligar ou desligar esse tema','ligadesliga')\" onmouseout=\"javascript:mostradicasf(this,'')\" />" | |
| 33 | + nomeTema = inp+nome+lk | |
| 34 | + if (temp[3] == "sim") | |
| 35 | + { | |
| 36 | + var inp = "<p><img src="+window.parent.i3GEO.configura.locaplic+"/imagens/down1.gif style='cursor:pointer;text-align:left' onclick='window.parent.download(\""+tid+"\")' /> " | |
| 37 | + ins += inp+nome+" <span style='color:gray'> ("+nomeGrupo+"->"+nomeSgrupo+")</span><br><br>" | |
| 38 | + } | |
| 39 | + } | |
| 40 | + } | |
| 41 | + } | |
| 42 | + document.getElementById("resultado").innerHTML = ins | |
| 43 | + } | |
| 44 | + else | |
| 45 | + { | |
| 46 | + document.getElementById("resultado").innerHTML = "<p style=color:red >Ocorreu um erro<br>" | |
| 47 | + } | |
| 48 | +} | ... | ... |