Commit 561373b5151cbb0d04f6cbb8aa43ebcfdaef0650
1 parent
7ac81848
Exists in
master
and in
7 other branches
-
Showing
2 changed files
with
34 additions
and
28 deletions
Show diff stats
classesjs/classe_arvoredecamadas.js
| ... | ... | @@ -2073,9 +2073,6 @@ i3GEO.arvoreDeCamadas = { |
| 2073 | 2073 | * {objeto} |
| 2074 | 2074 | */ |
| 2075 | 2075 | pegaTema : function(valor, camadas, parametro) { |
| 2076 | - if (typeof (console) !== 'undefined') | |
| 2077 | - console.info("i3GEO.arvoreDeCamadas.pegaTema()"); | |
| 2078 | - | |
| 2079 | 2076 | var i; |
| 2080 | 2077 | if (!camadas || camadas == "") { |
| 2081 | 2078 | camadas = i3GEO.arvoreDeCamadas.CAMADAS; | ... | ... |
ferramentas/download/index.js
| ... | ... | @@ -90,36 +90,45 @@ i3GEOF.download = { |
| 90 | 90 | tema {String} - código do tema |
| 91 | 91 | */ |
| 92 | 92 | html:function(divid,tema){ |
| 93 | - var cp,p,ins,mostraDownload; | |
| 93 | + var cp,p,ins,mostraDownload,c; | |
| 94 | 94 | ins = '<p class="paragrafo" >'+$trad('download',i3GEOF.download.dicionario)+'</p>'; |
| 95 | 95 | ins += '<p class="paragrafo" ><div id=i3GEOdownloadResultado ></div>'; |
| 96 | 96 | $i(divid).innerHTML += ins; |
| 97 | - mostraDownload = function(retorno){ | |
| 98 | - var ins = "", | |
| 99 | - arqs,n,arq; | |
| 100 | - if (retorno.data != undefined){ | |
| 101 | - retorno = retorno.data; | |
| 102 | - arqs = retorno.arquivos.split(","); | |
| 103 | - n = arqs.length; | |
| 104 | - if(retorno == "erro") | |
| 105 | - {ins = "<p style=color:red >"+$trad('erroTema',i3GEOF.download.dicionario)+"<br>";} | |
| 106 | - else{ | |
| 107 | - for (arq=0;arq<n;arq++){ | |
| 108 | - ins += "<a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[arq]+"'>"+arqs[arq]+"</a><br>"; | |
| 97 | + c = i3GEO.arvoreDeCamadas.pegaTema(tema); | |
| 98 | + //wms | |
| 99 | + if(c.connectiontype === 7){ | |
| 100 | + i3GEOF.download.aguarde.visibility = "hidden"; | |
| 101 | + ins = c.wmsurl.replace("wms","wfs")+"&typeName="+c.wmsname+"&SERVICE=wfs&REQUEST=getFeature"; | |
| 102 | + $i("i3GEOdownloadResultado").innerHTML = "<a target='_blank' href='"+ins+"' >"+ins+"</a>"; | |
| 103 | + } | |
| 104 | + else{ | |
| 105 | + mostraDownload = function(retorno){ | |
| 106 | + var ins = "", | |
| 107 | + arqs,n,arq; | |
| 108 | + if (retorno.data != undefined){ | |
| 109 | + retorno = retorno.data; | |
| 110 | + arqs = retorno.arquivos.split(","); | |
| 111 | + n = arqs.length; | |
| 112 | + if(retorno == "erro") | |
| 113 | + {ins = "<p style=color:red >"+$trad('erroTema',i3GEOF.download.dicionario)+"<br>";} | |
| 114 | + else{ | |
| 115 | + for (arq=0;arq<n;arq++){ | |
| 116 | + ins += "<a href='"+window.location.protocol+"//"+window.location.host+"/"+arqs[arq]+"'>"+arqs[arq]+"</a><br>"; | |
| 117 | + } | |
| 109 | 118 | } |
| 119 | + if(retorno.nreg) | |
| 120 | + {ins += "<br><br>"+$trad('registros',i3GEOF.download.dicionario)+" ="+retorno.nreg;} | |
| 110 | 121 | } |
| 111 | - if(retorno.nreg) | |
| 112 | - {ins += "<br><br>"+$trad('registros',i3GEOF.download.dicionario)+" ="+retorno.nreg;} | |
| 113 | - } | |
| 114 | - else | |
| 115 | - {ins = "<p style=color:red >"+$trad("x66")+"<br>";} | |
| 116 | - $i("i3GEOdownloadResultado").innerHTML = ins; | |
| 117 | - i3GEOF.download.aguarde.visibility = "hidden"; | |
| 118 | - }; | |
| 119 | - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=download2&tema="+tema; | |
| 120 | - cp = new cpaint(); | |
| 121 | - cp.set_response_type("JSON"); | |
| 122 | - cp.call(p,"downloadTema",mostraDownload); | |
| 122 | + else | |
| 123 | + {ins = "<p style=color:red >"+$trad("x66")+"<br>";} | |
| 124 | + $i("i3GEOdownloadResultado").innerHTML = ins; | |
| 125 | + i3GEOF.download.aguarde.visibility = "hidden"; | |
| 126 | + }; | |
| 127 | + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=download2&tema="+tema; | |
| 128 | + cp = new cpaint(); | |
| 129 | + cp.set_response_type("JSON"); | |
| 130 | + cp.call(p,"downloadTema",mostraDownload); | |
| 131 | + } | |
| 123 | 132 | }, |
| 124 | 133 | /* |
| 125 | 134 | Function: iniciaJanelaFlutuante | ... | ... |