Commit 2583e555b0e5f362c289629d65498c3f52018574
1 parent
7e33c70b
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
124 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,14 @@ |
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 | +<html> | |
3 | +<head> | |
4 | +<script type="text/javascript" src="../../classesjs/i3geo.js"></script> | |
5 | +</head> | |
6 | +<body name="ancora" id="i3geo" class=yui-skin-sam > | |
7 | +<script type="text/javascript"> | |
8 | +i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
9 | +var g_localimg = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo/imagens"; | |
10 | +i3GEO.parametros.mapfile = "x" | |
11 | +i3GEO.mapa.dialogo.convertews() | |
12 | +</script> | |
13 | +</body> | |
14 | +</html> | |
0 | 15 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,110 @@ |
1 | +<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?> | |
2 | +/*jslint plusplus:false,white:false,undef: false, rhino: true, onevar: true, evil: true */ | |
3 | +/* | |
4 | +About: Licença | |
5 | + | |
6 | +I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
7 | + | |
8 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
9 | +Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
10 | + | |
11 | +Este programa é software livre; você pode redistribuí-lo | |
12 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
13 | +GNU conforme publicada pela Free Software Foundation; | |
14 | +tanto a versão 2 da Licença. | |
15 | +Este programa é distribuído na expectativa de que seja útil, | |
16 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
17 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
18 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
19 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
20 | +GNU junto com este programa; se não, escreva para a | |
21 | +Free Software Foundation, Inc., no endereço | |
22 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
23 | +*/ | |
24 | +if(typeof(i3GEOF) === 'undefined'){ | |
25 | + i3GEOF = []; | |
26 | +} | |
27 | +/* | |
28 | +Class: i3GEOF.converteMapaWS | |
29 | + | |
30 | +Converte um mapa em WMS | |
31 | +*/ | |
32 | +i3GEOF.converteMapaWS = { | |
33 | + /* | |
34 | + Variavel: aguarde | |
35 | + | |
36 | + Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
37 | + */ | |
38 | + aguarde: "", | |
39 | + /* | |
40 | + Function: html | |
41 | + | |
42 | + Gera o código html para apresentação das opções da ferramenta | |
43 | + | |
44 | + Parametros: | |
45 | + | |
46 | + divid {String} - id do div que receberá o conteudo HTML da ferramenta | |
47 | + | |
48 | + */ | |
49 | + html:function(divid,endereco){ | |
50 | + try{ | |
51 | + var ins = '<p class="paragrafo" >Você pode utilizar o endereço em softwares de geoprocessamento instalados em seu computador, como por exemplo, o <a href="http://www.openjump.org" target=blank >OpenJump</a> ou <a href="http://www.gvsig.gva.es/" target=blank > gvSig</a>' + | |
52 | + '<p class="paragrafo" >O "web service" criado, utiliza o padrão WMS, conforme definido pelo OGC. A disponibilidade do endereço é temporária, permanecendo ativa apenas no dia em que foi criado.' + | |
53 | + '<p class="paragrafo" ><b>WMS: </b></p>' + | |
54 | + '<p class="paragrafo" > <textarea cols="65" rows="3" style=cursor:pointer onclick="javascript:this.select()">' + | |
55 | + endereco + '</textarea></p>' + | |
56 | + '<p class="paragrafo" >Para testar, utilize: ' + | |
57 | + '<a href="' + endereco + '&request=getcapabilities&version=1.1.0&service=wms" target=blank >' + | |
58 | + endereco + '&request=getcapabilities&version=1.1.0&service=wms'; | |
59 | + $i(divid).innerHTML += ins; | |
60 | + i3GEOF.converteMapaWS.aguarde.visibility = "hidden"; | |
61 | + }catch(e){alert(e);i3GEOF.converteMapaWS.aguarde.visibility = "hidden";} | |
62 | + }, | |
63 | + /* | |
64 | + Function: criaJanelaFlutuante | |
65 | + | |
66 | + Cria a janela flutuante para controle da ferramenta. | |
67 | + */ | |
68 | + criaJanelaFlutuante: function(){ | |
69 | + var janela,divid,temp,titulo,p,cp; | |
70 | + cabecalho = function(){}; | |
71 | + minimiza = function(){ | |
72 | + var temp = $i("i3GEOF.converteMapaWS_corpo"); | |
73 | + if(temp){ | |
74 | + if(temp.style.display === "block") | |
75 | + {temp.style.display = "none";} | |
76 | + else | |
77 | + {temp.style.display = "block";} | |
78 | + } | |
79 | + }; | |
80 | + titulo = "WMS <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=2&idajuda=12' > </a>"; | |
81 | + janela = i3GEO.janela.cria( | |
82 | + "440px", | |
83 | + "280px", | |
84 | + "", | |
85 | + "", | |
86 | + "", | |
87 | + titulo, | |
88 | + "i3GEOF.converteMapaWS", | |
89 | + false, | |
90 | + "hd", | |
91 | + cabecalho, | |
92 | + minimiza | |
93 | + ); | |
94 | + divid = janela[2].id; | |
95 | + i3GEOF.converteMapaWS.aguarde = $i("i3GEOF.converteMapaWS_imagemCabecalho").style; | |
96 | + i3GEOF.converteMapaWS.aguarde.visibility = "visible"; | |
97 | + temp = function(retorno){ | |
98 | + var endereco = "Ocorreu um erro ao criar o WMS"; | |
99 | + if (retorno.data != undefined){ | |
100 | + endereco = window.location.protocol+"//"+window.location.host+retorno.data+"&"+retorno.data+"&"; | |
101 | + } | |
102 | + i3GEOF.converteMapaWS.html(divid,endereco); | |
103 | + }; | |
104 | + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=convertews&h="+window.location.host; | |
105 | + cp = new cpaint(); | |
106 | + cp.set_response_type("JSON"); | |
107 | + cp.call(p,"converteWS",temp); | |
108 | + } | |
109 | +}; | |
110 | +<?php if(extension_loaded('zlib')){ob_end_flush();}?> | |
0 | 111 | \ No newline at end of file | ... | ... |