Commit d97b1a46c654771a58499efe9877c652a721fc2b
1 parent
af49d1be
Exists in
master
and in
7 other branches
--no commit message
Showing
8 changed files
with
162 additions
and
147 deletions
Show diff stats
admin/admin.db
No preview for this file type
ferramentas/gradecoord/index.js
... | ... | @@ -26,7 +26,6 @@ i3GEOF.gradeCoord = { |
26 | 26 | dicionario["asp"] = '"'; |
27 | 27 | return dicionario; |
28 | 28 | }, |
29 | - | |
30 | 29 | /* |
31 | 30 | Function: inicia |
32 | 31 | |
... | ... | @@ -100,12 +99,14 @@ i3GEOF.gradeCoord = { |
100 | 99 | <GRADECOORD> |
101 | 100 | */ |
102 | 101 | executa: function(){ |
103 | - if (($i("i3GEOgradeCoordintervalo").value == 0) || ($i("i3GEOgradeCoordintervalo").value == "")) | |
104 | - {i3GEO.janela.tempoMsg($trad('distLinhas',i3GEOF.gradeCoord.dicionario));} | |
102 | + if (($i("i3GEOgradeCoordintervalo").value == 0) || ($i("i3GEOgradeCoordintervalo").value == "")){ | |
103 | + i3GEO.janela.tempoMsg($trad('distLinhas',i3GEOF.gradeCoord.dicionario)); | |
104 | + } | |
105 | 105 | else |
106 | 106 | { |
107 | - if(i3GEOF.gradeCoord.aguarde.visibility === "visible") | |
108 | - {return;} | |
107 | + if(i3GEOF.gradeCoord.aguarde.visibility === "visible"){ | |
108 | + return; | |
109 | + } | |
109 | 110 | i3GEOF.gradeCoord.aguarde.visibility = "visible"; |
110 | 111 | var temp = function(){ |
111 | 112 | i3GEO.atualiza(); | ... | ... |
ferramentas/opcoes_fundo/index.js
1 | -if(typeof(i3GEOF) === 'undefined'){ | |
1 | +if (typeof (i3GEOF) === 'undefined') { | |
2 | 2 | var i3GEOF = {}; |
3 | 3 | } |
4 | 4 | /* |
5 | -Classe: i3GEOF.opcoesFundo | |
6 | -*/ | |
7 | -i3GEOF.opcoesFundo = { | |
8 | - /* | |
9 | - Variavel: aguarde | |
10 | - | |
11 | - Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
12 | - */ | |
13 | - aguarde: "", | |
14 | - /** | |
15 | - * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
16 | - */ | |
17 | - MUSTACHE : "", | |
18 | - /** | |
19 | - * Susbtitutos para o template | |
20 | - */ | |
21 | - mustacheHash : function() { | |
22 | - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.opcoesFundo.dicionario); | |
23 | - dicionario["locaplic"] = i3GEO.configura.locaplic; | |
24 | - dicionario["asp"] = '"'; | |
25 | - return dicionario; | |
26 | - }, | |
27 | - /* | |
28 | - Function: inicia | |
29 | - | |
30 | - Inicia a ferramenta. É chamado por criaJanelaFlutuante | |
31 | - | |
32 | - Parametro: | |
33 | - | |
34 | - iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | |
35 | - */ | |
36 | - inicia: function(iddiv){ | |
37 | - try{ | |
38 | - i3GEOF.opcoesFundo.aguarde.visibility = "visible"; | |
39 | - $i(iddiv).innerHTML += i3GEOF.opcoesFundo.html(); | |
40 | - var b = new YAHOO.widget.Button( | |
41 | - "i3GEOopcoesFundobotao1", | |
42 | - {onclick:{fn: i3GEOF.opcoesFundo.executa}} | |
43 | - ); | |
44 | - b.addClass("rodar150"); | |
45 | - i3GEO.util.aplicaAquarela("i3GEOF.opcoesFundo_corpo"); | |
46 | - var p = i3GEO.configura.locaplic+"/ferramentas/opcoes_fundo/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=pegacorfundo", | |
47 | - cp = new cpaint(), | |
48 | - retorno = function(retorno){ | |
5 | + * Classe: i3GEOF.opcoesFundo | |
6 | + */ | |
7 | +i3GEOF.opcoesFundo = | |
8 | + { | |
9 | + /* | |
10 | + * Variavel: aguarde | |
11 | + * | |
12 | + * Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
13 | + */ | |
14 | + aguarde : "", | |
15 | + /** | |
16 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
17 | + */ | |
18 | + MUSTACHE : "", | |
19 | + /** | |
20 | + * Susbtitutos para o template | |
21 | + */ | |
22 | + mustacheHash : function() { | |
23 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.opcoesFundo.dicionario); | |
24 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
25 | + dicionario["asp"] = '"'; | |
26 | + return dicionario; | |
27 | + }, | |
28 | + /* | |
29 | + * Function: inicia | |
30 | + * | |
31 | + * Inicia a ferramenta. É chamado por criaJanelaFlutuante | |
32 | + * | |
33 | + * Parametro: | |
34 | + * | |
35 | + * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | |
36 | + */ | |
37 | + inicia : function(iddiv) { | |
38 | + try { | |
39 | + i3GEOF.opcoesFundo.aguarde.visibility = "visible"; | |
40 | + $i(iddiv).innerHTML += i3GEOF.opcoesFundo.html(); | |
41 | + var b = new YAHOO.widget.Button("i3GEOopcoesFundobotao1", { | |
42 | + onclick : { | |
43 | + fn : i3GEOF.opcoesFundo.executa | |
44 | + } | |
45 | + }); | |
46 | + b.addClass("rodar150"); | |
47 | + i3GEO.util.aplicaAquarela("i3GEOF.opcoesFundo_corpo"); | |
48 | + var p = | |
49 | + i3GEO.configura.locaplic + "/ferramentas/opcoes_fundo/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=pegacorfundo", cp = | |
50 | + new cpaint(), retorno = function(retorno) { | |
49 | 51 | i3GEOF.opcoesFundo.aguarde.visibility = "hidden"; |
50 | - if(retorno.data.erro){i3GEO.janela.tempoMsg("Erro");return;} | |
52 | + if (retorno.data.erro) { | |
53 | + i3GEO.janela.tempoMsg("Erro"); | |
54 | + return; | |
55 | + } | |
51 | 56 | $i("i3GEOopcoesFundocor").value = retorno.data; |
52 | 57 | }; |
53 | - cp.set_response_type("JSON"); | |
54 | - cp.call(p,"corQM",retorno); | |
55 | - } | |
56 | - catch(erro){i3GEO.janela.tempoMsg(erro);} | |
57 | - if(i3GEO.Interface.ATUAL === "googlemaps" || i3GEO.Interface.ATUAL === "googleearth") | |
58 | - {i3GEO.janela.tempoMsg($trad('ajuda',i3GEOF.opcoesFundo.dicionario));} | |
59 | - }, | |
60 | - /* | |
61 | - Function: html | |
62 | - | |
63 | - Gera o código html para apresentação das opções da ferramenta | |
64 | - | |
65 | - Retorno: | |
66 | - | |
67 | - String com o código html | |
68 | - */ | |
69 | - html:function() { | |
70 | - var ins = Mustache.render(i3GEOF.opcoesFundo.MUSTACHE, i3GEOF.opcoesFundo.mustacheHash()); | |
71 | - return ins; | |
72 | - }, | |
73 | - /* | |
74 | - Function: iniciaJanelaFlutuante | |
75 | - | |
76 | - Cria a janela flutuante para controle da ferramenta. | |
77 | - */ | |
78 | - iniciaJanelaFlutuante: function(){ | |
79 | - var janela,divid,titulo,cabecalho,minimiza; | |
80 | - if ($i("i3GEOF.opcoesFundo")) { | |
81 | - return; | |
82 | - } | |
83 | - cabecalho = function(){}; | |
84 | - minimiza = function(){ | |
85 | - i3GEO.janela.minimiza("i3GEOF.opcoesFundo"); | |
86 | - }; | |
87 | - //cria a janela flutuante | |
88 | - titulo = "<div class='i3GeoTituloJanela'>" + $trad("p9")+"<a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=1&idajuda=6' ><b> </b></a></div>"; | |
89 | - janela = i3GEO.janela.cria( | |
90 | - "210px", | |
91 | - "80px", | |
92 | - "", | |
93 | - "", | |
94 | - "", | |
95 | - titulo, | |
96 | - "i3GEOF.opcoesFundo", | |
97 | - false, | |
98 | - "hd", | |
99 | - cabecalho, | |
100 | - "" | |
101 | - ); | |
102 | - divid = janela[2].id; | |
103 | - $i("i3GEOF.opcoesFundo_corpo").style.backgroundColor = "white"; | |
104 | - $i("i3GEOF.opcoesFundo_corpo").style.textAlign = "left"; | |
105 | - i3GEOF.opcoesFundo.aguarde = $i("i3GEOF.opcoesFundo_imagemCabecalho").style; | |
106 | - i3GEOF.opcoesFundo.inicia(divid); | |
107 | - }, | |
108 | - /* | |
109 | - Function: corj | |
110 | - | |
111 | - Abre a janela para o usuário selecionar uma cor interativamente | |
112 | - */ | |
113 | - corj: function(obj) | |
114 | - {i3GEO.util.abreCor("",obj);}, | |
115 | - /* | |
116 | - Function: executa | |
117 | - | |
118 | - Aplica a nova cor | |
119 | - | |
120 | - A cor do fundo na interface Openlayers é definida por meio de estilo, mas é necessário persistir a cor no mapfile existente no servidor. | |
121 | - */ | |
122 | - executa: function(){ | |
123 | - if(i3GEOF.opcoesFundo.aguarde.visibility === "visible") | |
124 | - {return;} | |
125 | - i3GEOF.opcoesFundo.aguarde.visibility = "visible"; | |
126 | - var temp = function(){ | |
58 | + cp.set_response_type("JSON"); | |
59 | + cp.call(p, "corQM", retorno); | |
60 | + } catch (erro) { | |
61 | + i3GEO.janela.tempoMsg(erro); | |
62 | + } | |
63 | + if (i3GEO.Interface.ATUAL === "googlemaps" || i3GEO.Interface.ATUAL === "googleearth") { | |
64 | + i3GEO.janela.tempoMsg($trad('ajuda', i3GEOF.opcoesFundo.dicionario)); | |
65 | + } | |
66 | + }, | |
67 | + /* | |
68 | + * Function: html | |
69 | + * | |
70 | + * Gera o código html para apresentação das opções da ferramenta | |
71 | + * | |
72 | + * Retorno: | |
73 | + * | |
74 | + * String com o código html | |
75 | + */ | |
76 | + html : function() { | |
77 | + var ins = Mustache.render(i3GEOF.opcoesFundo.MUSTACHE, i3GEOF.opcoesFundo.mustacheHash()); | |
78 | + return ins; | |
79 | + }, | |
80 | + /* | |
81 | + * Function: iniciaJanelaFlutuante | |
82 | + * | |
83 | + * Cria a janela flutuante para controle da ferramenta. | |
84 | + */ | |
85 | + iniciaJanelaFlutuante : function() { | |
86 | + var janela, divid, titulo, cabecalho, minimiza; | |
87 | + if ($i("i3GEOF.opcoesFundo")) { | |
88 | + return; | |
89 | + } | |
90 | + cabecalho = function() { | |
91 | + }; | |
92 | + minimiza = function() { | |
93 | + i3GEO.janela.minimiza("i3GEOF.opcoesFundo"); | |
94 | + }; | |
95 | + // cria a janela flutuante | |
96 | + titulo = | |
97 | + "<div class='i3GeoTituloJanela'>" + $trad("p9") | |
98 | + + "<a class=ajuda_usuario target=_blank href='" | |
99 | + + i3GEO.configura.locaplic | |
100 | + + "/ajuda_usuario.php?idcategoria=1&idajuda=6' ><b> </b></a></div>"; | |
101 | + janela = i3GEO.janela.cria("210px", "80px", "", "", "", titulo, "i3GEOF.opcoesFundo", false, "hd", cabecalho, ""); | |
102 | + divid = janela[2].id; | |
103 | + $i("i3GEOF.opcoesFundo_corpo").style.backgroundColor = "white"; | |
104 | + $i("i3GEOF.opcoesFundo_corpo").style.textAlign = "left"; | |
105 | + i3GEOF.opcoesFundo.aguarde = $i("i3GEOF.opcoesFundo_imagemCabecalho").style; | |
106 | + i3GEOF.opcoesFundo.inicia(divid); | |
107 | + }, | |
108 | + /* | |
109 | + * Function: corj | |
110 | + * | |
111 | + * Abre a janela para o usuário selecionar uma cor interativamente | |
112 | + */ | |
113 | + corj : function(obj) { | |
114 | + i3GEO.util.abreCor("", obj); | |
115 | + }, | |
116 | + /* | |
117 | + * Function: executa | |
118 | + * | |
119 | + * Aplica a nova cor | |
120 | + * | |
121 | + * A cor do fundo na interface Openlayers é definida por meio de estilo, mas é necessário persistir a cor no | |
122 | + * mapfile existente no servidor. | |
123 | + */ | |
124 | + executa : function() { | |
125 | + if (i3GEOF.opcoesFundo.aguarde.visibility === "visible") { | |
126 | + return; | |
127 | + } | |
128 | + i3GEOF.opcoesFundo.aguarde.visibility = "visible"; | |
129 | + var temp, cor, p, cp; | |
130 | + temp = function() { | |
127 | 131 | i3GEOF.opcoesFundo.aguarde.visibility = "hidden"; |
128 | - if(i3GEO.Interface.ATUAL === "openlayers"){ | |
129 | - //var layer = i3geoOL.getLayersByName("Nenhum")[0]; | |
130 | - //layer.mergeNewParams({"DESLIGACACHE":"sim"}); | |
131 | - //layer.mergeNewParams({r:Math.random()}); | |
132 | - if($i(i3geoOL.id+"_events")){ | |
133 | - $i(i3geoOL.id+"_events").style.backgroundColor = "rgb("+$i("i3GEOopcoesFundocor").value+")"; | |
132 | + if (i3GEO.Interface.ATUAL === "openlayers") { | |
133 | + if (i3geoOL.id && $i(i3geoOL.id + "_events")) { | |
134 | + $i(i3geoOL.id + "_events").style.backgroundColor = "rgb(" + $i("i3GEOopcoesFundocor").value + ")"; | |
134 | 135 | } |
135 | - if ($i(i3geoOL.id + "_OpenLayers_ViewPort")) { | |
136 | - $i(i3geoOL.id + "_OpenLayers_ViewPort").style.backgroundColor = "rgb("+$i("i3GEOopcoesFundocor").value+")"; | |
136 | + if (i3geoOL.id && $i(i3geoOL.id + "_OpenLayers_ViewPort")) { | |
137 | + $i(i3geoOL.id + "_OpenLayers_ViewPort").style.backgroundColor = "rgb(" + $i("i3GEOopcoesFundocor").value + ")"; | |
137 | 138 | } |
138 | - //para OL3 | |
139 | - if($i("openlayers")){ | |
139 | + // para OL3 | |
140 | + if ($i("openlayers")) { | |
140 | 141 | $i("openlayers").style.backgroundColor = "rgb(" + $i("i3GEOopcoesFundocor").value + ")"; |
142 | + i3GEO.parametros.cordefundo = $i("i3GEOopcoesFundocor").value; | |
141 | 143 | } |
142 | 144 | } |
143 | 145 | i3GEO.atualiza(); |
144 | - }, | |
145 | - cor = $i("i3GEOopcoesFundocor").value, | |
146 | - p = i3GEO.configura.locaplic+"/ferramentas/opcoes_fundo/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=corfundo&cor="+cor, | |
146 | + }; | |
147 | + cor = $i("i3GEOopcoesFundocor").value; | |
148 | + p = | |
149 | + i3GEO.configura.locaplic + "/ferramentas/opcoes_fundo/exec.php?g_sid=" | |
150 | + + i3GEO.configura.sid | |
151 | + + "&funcao=corfundo&cor=" | |
152 | + + cor; | |
147 | 153 | cp = new cpaint(); |
148 | - cp.set_response_type("JSON"); | |
149 | - cp.call(p,"corQM",temp); | |
150 | - } | |
151 | -}; | |
152 | 154 | \ No newline at end of file |
155 | + cp.set_response_type("JSON"); | |
156 | + cp.call(p, "corQM", temp); | |
157 | + } | |
158 | + }; | |
153 | 159 | \ No newline at end of file | ... | ... |
js/ini_i3geo.js
js/interface.js
... | ... | @@ -1373,13 +1373,12 @@ i3GEO.Interface = |
1373 | 1373 | // layers marcados com o metadata wmstile com valor |
1374 | 1374 | // 1 sao inseridos com Layer.TileCache |
1375 | 1375 | // i3GEO.Interface.openlayers.googleLike === false |
1376 | - // && | |
1377 | 1376 | // FIXME testar isso |
1378 | 1377 | if (i3GEO.Interface.openlayers.googleLike === false && camada.connectiontype === 7 |
1379 | 1378 | && camada.wmsurl !== "" |
1380 | 1379 | && camada.usasld.toLowerCase() != "sim") { |
1381 | 1380 | urllayer = camada.wmsurl; |
1382 | - if (camada.wmstile == 10) { | |
1381 | + if (camada.wmstile == 10){ | |
1383 | 1382 | // TODO testar isso |
1384 | 1383 | source = new ol.source.WMTS({ |
1385 | 1384 | url : urllayer, |
... | ... | @@ -1414,6 +1413,7 @@ i3GEO.Interface = |
1414 | 1413 | opcoes.visible = true; |
1415 | 1414 | } else { |
1416 | 1415 | // verifica se havera apenas um tile |
1416 | + // 10 e do tipo grid de coordenadas | |
1417 | 1417 | if (camada.tiles === "nao" || camada.escondido.toLowerCase() === "sim" |
1418 | 1418 | || camada.connectiontype === 10 |
1419 | 1419 | || (camada.type === 0 && camada.cache === "nao") |
... | ... | @@ -1447,7 +1447,8 @@ i3GEO.Interface = |
1447 | 1447 | 'LAYERS' : camada.name, |
1448 | 1448 | 'VERSION' : '1.1.0' |
1449 | 1449 | }, |
1450 | - projection : opcoes.projection | |
1450 | + projection : opcoes.projection, | |
1451 | + ratio : 1 | |
1451 | 1452 | }); |
1452 | 1453 | source.set("tipoServico", "ImageWMS"); |
1453 | 1454 | } else { | ... | ... |
js/mapa.js
... | ... | @@ -773,7 +773,7 @@ i3GEO.mapa = |
773 | 773 | + "<div class='i3GeoTituloJanela'>" |
774 | 774 | + $trad("p3") |
775 | 775 | + "</div>"; |
776 | - janela = i3GEO.janela.cria(largura + "px", altura + "px", "", "", "", titulo, "wlegenda", false, "hd", cabecalho, minimiza); | |
776 | + janela = i3GEO.janela.cria(largura + "px", altura + "px", "", "", "", titulo, "wlegenda", false, "hd", cabecalho, minimiza,"","","","","nao"); | |
777 | 777 | $i("wlegenda_corpo").style.backgroundColor = "white"; |
778 | 778 | i3GEO.mapa.legendaHTML.ID = "wlegenda_corpo"; |
779 | 779 | i3GEO.eventos.adicionaEventos("NAVEGAMAPA", [ | ... | ... |