Commit 54176bf41b8c8feffa9bb688f5080d849940d8a2
1 parent
a118714b
Exists in
master
and in
7 other branches
Inclusão do editor de limites no sistema de metadados estatisticos
Showing
7 changed files
with
800 additions
and
9 deletions
Show diff stats
classesjs/classe_configura.js
@@ -127,7 +127,7 @@ i3GEO.configura = { | @@ -127,7 +127,7 @@ i3GEO.configura = { | ||
127 | { id:"omenudataAjudamenu1",text: $trad("u1"), url: "http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332", target:"_blank" }, | 127 | { id:"omenudataAjudamenu1",text: $trad("u1"), url: "http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332", target:"_blank" }, |
128 | { id:"omenudataAjudamenu2",text: $trad("u2"), url: "javascript:i3GEO.ajuda.abreDoc()" }, | 128 | { id:"omenudataAjudamenu2",text: $trad("u2"), url: "javascript:i3GEO.ajuda.abreDoc()" }, |
129 | /** | 129 | /** |
130 | - * TODO gerar arquivo PDF | 130 | + * TODO gerar arquivo PDF atualizado |
131 | */ | 131 | */ |
132 | { id:"omenudataAjudamenu3",text: $trad("u4a"), url: "javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')" }, | 132 | { id:"omenudataAjudamenu3",text: $trad("u4a"), url: "javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')" }, |
133 | { id:"omenudataAjudamenu4",text: $trad("u4"), url: "http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525", target:"_blank" }, | 133 | { id:"omenudataAjudamenu4",text: $trad("u4"), url: "http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525", target:"_blank" }, |
ferramentas/metaestat/dicionario.js
ferramentas/metaestat/dicionario1.js
@@ -24,7 +24,7 @@ it:"" | @@ -24,7 +24,7 @@ it:"" | ||
24 | }], | 24 | }], |
25 | "4":[ | 25 | "4":[ |
26 | { | 26 | { |
27 | -pt:"Editor interativo", | 27 | +pt:"Editor de limites", |
28 | en:"", | 28 | en:"", |
29 | es:"", | 29 | es:"", |
30 | it:"" | 30 | it:"" |
@@ -101,7 +101,7 @@ it:"" | @@ -101,7 +101,7 @@ it:"" | ||
101 | }], | 101 | }], |
102 | "15":[ | 102 | "15":[ |
103 | { | 103 | { |
104 | -pt:"", | 104 | +pt:"O editor sera aberto em uma nova janela do navegador", |
105 | en:"", | 105 | en:"", |
106 | es:"", | 106 | es:"", |
107 | it:"" | 107 | it:"" |
@@ -0,0 +1,584 @@ | @@ -0,0 +1,584 @@ | ||
1 | +/* | ||
2 | +Licenca: | ||
3 | + | ||
4 | +GPL2 | ||
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 | +Esse programa utiliza parcialmente os codigos da aplicacao calculadora de carbono desenvolvido pelo | ||
12 | +IPAM - Instituto de Pesquisa Ambiental da Amazonia | ||
13 | + | ||
14 | +Este programa e software livre; voce pode redistribui-lo | ||
15 | +e/ou modifica-lo sob os termos da Licenca Publica Geral | ||
16 | +GNU conforme publicada pela Free Software Foundation; | ||
17 | + | ||
18 | +Este programa e distribuido na expectativa de que seja util, | ||
19 | +porem, SEM NENHUMA GARANTIA; nem mesmo a garantia implicita | ||
20 | +de COMERCIABILIDADE OU ADEQUACAO A UMA FINALIDADE ESPECIFICA. | ||
21 | +Consulte a Licenca Publica Geral do GNU para mais detalhes. | ||
22 | +Voce deve ter recebido uma copia da Licenca Publica Geral do | ||
23 | +GNU junto com este programa; se nao, escreva para a | ||
24 | +Free Software Foundation, Inc., no endereco | ||
25 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
26 | +*/ | ||
27 | +editorlimites = { | ||
28 | + /** | ||
29 | + * Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela | ||
30 | + * | ||
31 | + */ | ||
32 | + aguarde: "", | ||
33 | + iddiv: "", | ||
34 | + drawingManager: "", | ||
35 | + selectedShape: null, | ||
36 | + shapes: [], | ||
37 | + /** | ||
38 | + * Inicia o editor | ||
39 | + * | ||
40 | + * @param {String} Id do DIV que receberá o conteúdo HTML do editor | ||
41 | + * @return | ||
42 | + */ | ||
43 | + inicia: function(iddiv){ | ||
44 | + var i,n,ics; | ||
45 | + editorlimites.iddiv = iddiv; | ||
46 | + $i(iddiv).innerHTML = editorlimites.html(); | ||
47 | + ics = $i(iddiv).getElementsByTagName("button"); | ||
48 | + n = ics.length; | ||
49 | + i3GEO.barraDeBotoes.ativaBotoes(); | ||
50 | + for(i=0;i<n;i++){ | ||
51 | + ics[i].style.backgroundColor = "white"; | ||
52 | + ics[i].className = "iconeGuiaMovel"; | ||
53 | + ics[i].onmouseout = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOut";}; | ||
54 | + ics[i].onmouseover = function(){this.className = "iconeGuiaMovel iconeGuiaMovelMouseOver";}; | ||
55 | + ics[i].style.backgroundImage = "none"; | ||
56 | + ics[i].style.height = "32px"; | ||
57 | + ics[i].style.width = "32px"; | ||
58 | + ics[i].style.border = "1px solid gray"; | ||
59 | + ics[i].style.margin = "0px"; | ||
60 | + } | ||
61 | + editorlimites.drawingManager = new google.maps.drawing.DrawingManager({ | ||
62 | + drawingMode: google.maps.drawing.OverlayType.POLYGON, | ||
63 | + drawingControl: false, | ||
64 | + drawingControlOptions: { | ||
65 | + position: google.maps.ControlPosition.TOP_CENTER, | ||
66 | + drawingModes: [google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYLINE] | ||
67 | + }, | ||
68 | + markerOptions: { | ||
69 | + icon: new google.maps.MarkerImage('http://www.example.com/icon.png') | ||
70 | + }, | ||
71 | + polygonOptions: { | ||
72 | + fillColor: '#ffff00', | ||
73 | + fillOpacity: .5, | ||
74 | + strokeWeight: 2, | ||
75 | + clickable: true, | ||
76 | + zIndex: 1, | ||
77 | + editable: true | ||
78 | + } | ||
79 | + }); | ||
80 | + editorlimites.drawingManager.setMap(i3GeoMap); | ||
81 | + editorlimites.drawingManager.setDrawingMode(null); | ||
82 | + google.maps.event.addListener(editorlimites.drawingManager, 'overlaycomplete', function(e) { | ||
83 | + if (e.type != google.maps.drawing.OverlayType.MARKER) { | ||
84 | + editorlimites.drawingManager.setDrawingMode(null); | ||
85 | + editorlimites.mudaicone(); | ||
86 | + var newShape = e.overlay; | ||
87 | + newShape.type = e.type; | ||
88 | + google.maps.event.addListener(newShape, 'click', function() { | ||
89 | + editorlimites.setSelection(newShape); | ||
90 | + }); | ||
91 | + editorlimites.setSelection(newShape); | ||
92 | + editorlimites.shapes.push(newShape); | ||
93 | + } | ||
94 | + }); | ||
95 | + google.maps.event.addListener( | ||
96 | + editorlimites.drawingManager, | ||
97 | + 'drawingmode_changed', | ||
98 | + editorlimites.clearSelection | ||
99 | + ); | ||
100 | + google.maps.event.addListener( | ||
101 | + i3GeoMap, | ||
102 | + 'click', | ||
103 | + editorlimites.clearSelection | ||
104 | + ); | ||
105 | + }, | ||
106 | + /* | ||
107 | + Function: html | ||
108 | + | ||
109 | + Gera o código html para apresentação das opções da ferramenta | ||
110 | + | ||
111 | + Retorno: | ||
112 | + | ||
113 | + String com o código html | ||
114 | + */ | ||
115 | + html:function(){ | ||
116 | + var ins = '' + | ||
117 | + ' <button title="Desenhar um polígono" onclick="editorlimites.digitalizaPol(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/polygon-create.png" /></button>' + | ||
118 | + ' <button title="Capturar polígono de um tema" onclick="editorlimites.ativaCaptura()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/layer-import.png" /></button>' + | ||
119 | + ' <button title="Selecionar" onclick="editorlimites.seleciona(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/select.png" /></button>' + | ||
120 | + ' <button title="Apagar selecionado" onclick="editorlimites.deleteSelectedShape()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/selected-delete.png" /></button>' + | ||
121 | + //' <button title="Converter em shapefile, adiciona ao mapa e download" onclick="editorlimites.criatema()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/vector-save.png" /></button>' + | ||
122 | + //' <button title="Upload de shapefile" onclick="editorlimites.upload.criaJanelaFlutuante()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/open.png" /></button>' + | ||
123 | + //' <button title="Relatório CMAS" onmousedown="editorlimites.mudaicone()" onclick="editorlimites.relatorioCmas()" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/table.png" /></button>' + | ||
124 | + //' <button onmousedown="editorlimites.mudaicone()" id="pan" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/pan.png" /></button>' + | ||
125 | + //' <button onmousedown="editorlimites.mudaicone()" id="zoomli" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/zoom-region.png" /></button>' + | ||
126 | + //' <button onmousedown="editorlimites.mudaicone()" id="zoomtot" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/zoom-extent.png" /></button>' + | ||
127 | + //' <button onmousedown="editorlimites.mudaicone()" id="identifica" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/identify.png" /></button>' + | ||
128 | + //' <button onmousedown="editorlimites.mudaicone()" id="mede" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/length-measure.png" /></button>' + | ||
129 | + //' <button onmousedown="editorlimites.mudaicone()" id="area" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/area-measure.png" /></button>' + | ||
130 | + //' <button title="Imprimir" onmousedown="editorlimites.mudaicone()" onclick="editorlimites.imprimir()" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/print.png" /></button>' + | ||
131 | + ' <button title="Ajuda" onmousedown="editorlimites.mudaicone()" onclick="editorlimites.Ajuda()" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/help-contents.png" /></button>'; | ||
132 | + return ins; | ||
133 | + }, | ||
134 | + /* | ||
135 | + Function: ativaFoco | ||
136 | + | ||
137 | + Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | ||
138 | + */ | ||
139 | + ativaFoco: function(){ | ||
140 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"crosshair",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | ||
141 | + i3GEO.barraDeBotoes.ativaIcone("pan"); | ||
142 | + editorlimites.mudaicone(); | ||
143 | + i3GEO.Interface.googlemaps.recalcPar(); | ||
144 | + }, | ||
145 | + setSelection: function(shape){ | ||
146 | + //editorlimites.clearSelection(); | ||
147 | + //editorlimites.selectedShape = shape; | ||
148 | + shape.setEditable(!shape.editable); | ||
149 | + }, | ||
150 | + clearSelection: function(){ | ||
151 | + var i, | ||
152 | + n = editorlimites.shapes.length; | ||
153 | + for(i=0;i<n;i++){ | ||
154 | + if(editorlimites.shapes[i] != ""){ | ||
155 | + editorlimites.shapes[i].setEditable(false); | ||
156 | + } | ||
157 | + } | ||
158 | + /* | ||
159 | + if (editorlimites.selectedShape) { | ||
160 | + editorlimites.selectedShape.setEditable(false); | ||
161 | + editorlimites.selectedShape = null; | ||
162 | + } | ||
163 | + */ | ||
164 | + }, | ||
165 | + deleteSelectedShape: function() { | ||
166 | + var i, | ||
167 | + n = editorlimites.shapes.length; | ||
168 | + if(n > 0){ | ||
169 | + var x = window.confirm("Exclui os elementos selecionados?"); | ||
170 | + if(x){ | ||
171 | + for(i=0;i<n;i++){ | ||
172 | + if(editorlimites.shapes[i] != "" && editorlimites.shapes[i].editable === true){ | ||
173 | + editorlimites.shapes[i].setMap(null); | ||
174 | + editorlimites.shapes[i] = ""; | ||
175 | + } | ||
176 | + } | ||
177 | + } | ||
178 | + } | ||
179 | + else{ | ||
180 | + alert("Selecione pelo menos uma figura"); | ||
181 | + } | ||
182 | + /* | ||
183 | + if (editorlimites.selectedShape) { | ||
184 | + editorlimites.selectedShape.setMap(null); | ||
185 | + } | ||
186 | + */ | ||
187 | + }, | ||
188 | + getCoordenadas: function(){ | ||
189 | + var coordenadas = [], | ||
190 | + lista = [], | ||
191 | + n = editorlimites.shapes.length, | ||
192 | + tipo = "", | ||
193 | + ps,nps,j,p,i; | ||
194 | + | ||
195 | + for(i=0;i<n;i++){ | ||
196 | + coordenadas = []; | ||
197 | + if(editorlimites.shapes[i] != "" && editorlimites.shapes[i].editable === true){ | ||
198 | + if(tipo == ""){ | ||
199 | + tipo = editorlimites.shapes[i].type; | ||
200 | + } | ||
201 | + ps = editorlimites.shapes[i].getPath(); | ||
202 | + nps = ps.getLength(); | ||
203 | + for(j=0;j<nps;j++){ | ||
204 | + p = ps.getAt(j); | ||
205 | + coordenadas.push([p.lng()+" "+p.lat()]); | ||
206 | + } | ||
207 | + lista.push(coordenadas); | ||
208 | + } | ||
209 | + } | ||
210 | + return {"tipo":tipo,"coordenadas":lista}; | ||
211 | + }, | ||
212 | + toWKT: function(obj){ | ||
213 | + var wkt = "", | ||
214 | + coordenadas = obj.coordenadas, | ||
215 | + n = coordenadas.length, | ||
216 | + lista = [], | ||
217 | + i,c; | ||
218 | + if(obj.tipo == "polygon" || obj.tipo == "" || obj.tipo == undefined ){ | ||
219 | + if(n == 1 && coordenadas[0] != ""){ | ||
220 | + coordenadas.push(coordenadas[0][0]); | ||
221 | + wkt = "POLYGON(("+coordenadas.toString()+"))"; | ||
222 | + } | ||
223 | + else{ | ||
224 | + for(i=0;i<n;i++){ | ||
225 | + c = coordenadas[i]; | ||
226 | + c.push(c[0][0]); | ||
227 | + lista.push("(("+c.toString()+"))"); | ||
228 | + } | ||
229 | + if(lista.length > 0) | ||
230 | + {wkt = "MULTIPOLYGON("+lista.toString()+")";} | ||
231 | + } | ||
232 | + } | ||
233 | + if(obj.tipo == "point"){ | ||
234 | + | ||
235 | + } | ||
236 | + if(obj.tipo == "polyline"){ | ||
237 | + | ||
238 | + } | ||
239 | + return wkt; | ||
240 | + }, | ||
241 | + ativaCaptura: function(){ | ||
242 | + var cabecalho,minimiza,janela,temp; | ||
243 | + editorlimites.mudaicone(); | ||
244 | + if($i("capturaPoligono_corpo")) { | ||
245 | + if(i3GEO.eventos.MOUSECLIQUE.toString().search("editorlimites.capturaPoligonoTema()") < 0) | ||
246 | + {i3GEO.eventos.MOUSECLIQUE.push("editorlimites.capturaPoligonoTema()");} | ||
247 | + return; | ||
248 | + } | ||
249 | + cabecalho = function(){ | ||
250 | + if(i3GEO.eventos.MOUSECLIQUE.toString().search("editorlimites.capturaPoligonoTema()") < 0) | ||
251 | + {i3GEO.eventos.MOUSECLIQUE.push("editorlimites.capturaPoligonoTema()");} | ||
252 | + }; | ||
253 | + minimiza = function(){ | ||
254 | + i3GEO.janela.minimiza("capturaPoligono"); | ||
255 | + }; | ||
256 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | ||
257 | + janela = i3GEO.janela.cria( | ||
258 | + "250px", | ||
259 | + "100px", | ||
260 | + "", | ||
261 | + "", | ||
262 | + "", | ||
263 | + "Captura polígono", | ||
264 | + "capturaPoligono", | ||
265 | + false, | ||
266 | + "hd", | ||
267 | + cabecalho, | ||
268 | + minimiza | ||
269 | + ); | ||
270 | + $i("capturaPoligono_corpo").style.backgroundColor = "white"; | ||
271 | + temp = function(){ | ||
272 | + i3GEO.eventos.MOUSECLIQUE.remove("editorlimites.capturaPoligonoTema()"); | ||
273 | + }; | ||
274 | + YAHOO.util.Event.addListener(janela[0].close, "click", temp); | ||
275 | + i3GEO.util.comboTemas( | ||
276 | + "editorlimitesComboTemasPol", | ||
277 | + function(retorno){ | ||
278 | + $i("capturaPoligono_corpo").innerHTML = "<p class='paragrafo'>Escolha o tema e clique no mapa para obter o polígono que poderá ser utilizado para gerar o relatório:<br><br>"+retorno.dados; | ||
279 | + if(i3GEO.eventos.MOUSECLIQUE.toString().search("editorlimites.capturaPoligonoTema()") < 0) | ||
280 | + {i3GEO.eventos.MOUSECLIQUE.push("editorlimites.capturaPoligonoTema()");} | ||
281 | + $i("editorlimitesComboTemasPol").style.width = "200px"; | ||
282 | + }, | ||
283 | + "capturaPoligono_corpo", | ||
284 | + "", | ||
285 | + false, | ||
286 | + "poligonos" | ||
287 | + ); | ||
288 | + }, | ||
289 | + capturaPoligonoTema: function(){ | ||
290 | + var temp,tema,p,par, | ||
291 | + aguarde = $i("capturaPoligono_imagemCabecalho"); | ||
292 | + if(!$i("editorlimitesComboTemasPol")){ | ||
293 | + i3GEO.eventos.MOUSECLIQUE.remove("editorlimites.capturaPoligonoTema()"); | ||
294 | + } | ||
295 | + else{ | ||
296 | + temp = function(retorno){ | ||
297 | + var re,n,i,j, | ||
298 | + wkt = retorno.data[0].resultado[0][0].wkt, | ||
299 | + pontos = [], | ||
300 | + aguarde = $i("capturaPoligono_imagemCabecalho"); | ||
301 | + if(aguarde){ | ||
302 | + aguarde.style.visibility = "hidden"; | ||
303 | + } | ||
304 | + re = new RegExp("POLYGON \\(\\(", "g"); | ||
305 | + wkt = wkt.replace(re,''); | ||
306 | + re = new RegExp("\\)\\)", "g"); | ||
307 | + wkt = wkt.replace(re,''); | ||
308 | + re = new RegExp(", ", "g"); | ||
309 | + wkt = wkt.replace(re,','); | ||
310 | + wkt = wkt.split(","); | ||
311 | + n = wkt.length; | ||
312 | + for(i=0;i<n;i++){ | ||
313 | + j = wkt[i].split(" "); | ||
314 | + pontos.push([j[0],j[1]]); | ||
315 | + } | ||
316 | + editorlimites.upload.adicionaPoligonos([pontos]); | ||
317 | + }; | ||
318 | + tema = $i("editorlimitesComboTemasPol").value; | ||
319 | + if(tema != ""){ | ||
320 | + if(aguarde && aguarde.style.visibility == "hidden"){ | ||
321 | + aguarde.style.visibility = "visible"; | ||
322 | + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php"; | ||
323 | + par = "funcao=identifica2&opcao=tema&xy="+objposicaocursor.ddx+","+objposicaocursor.ddy+"&resolucao=1&g_sid="+i3GEO.configura.sid+"&ext=&listaDeTemas=&wkt=sim&tema="+tema; | ||
324 | + cpJSON.call(p,"identifica",temp,par); | ||
325 | + } | ||
326 | + } | ||
327 | + } | ||
328 | + }, | ||
329 | + /* | ||
330 | + Function: mudaicone | ||
331 | + | ||
332 | + Altera as bordas dos ícones | ||
333 | + */ | ||
334 | + mudaicone: function(){ | ||
335 | + var c = $i(editorlimites.iddiv), | ||
336 | + ci = c.getElementsByTagName("img"), | ||
337 | + n = ci.length, | ||
338 | + i; | ||
339 | + for(i=0;i<n;i++){ | ||
340 | + ci[i].parentNode.style.backgroundColor = "#F5F5F5"; | ||
341 | + } | ||
342 | + i3GEO.eventos.MOUSECLIQUE = []; | ||
343 | + }, | ||
344 | + digitalizaPol: function(botao){ | ||
345 | + editorlimites.mudaicone(); | ||
346 | + botao.style.backgroundColor = "#cedff2"; | ||
347 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | ||
348 | + editorlimites.drawingManager.setOptions({ | ||
349 | + drawingMode: google.maps.drawing.OverlayType.POLYGON | ||
350 | + }); | ||
351 | + }, | ||
352 | + seleciona: function(botao){ | ||
353 | + editorlimites.mudaicone(); | ||
354 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | ||
355 | + botao.style.backgroundColor = "#cedff2"; | ||
356 | + editorlimites.drawingManager.setOptions({ | ||
357 | + drawingMode: null | ||
358 | + }); | ||
359 | + }, | ||
360 | + criatema: function(botao){ | ||
361 | + var c = editorlimites.getCoordenadas(), | ||
362 | + temp,wkt; | ||
363 | + editorlimites.mudaicone(); | ||
364 | + if(c.coordenadas.length > 0){ | ||
365 | + temp = function(retorno){ | ||
366 | + if(i3GEO.janela){ | ||
367 | + i3GEO.janela.fechaAguarde("i3GEO.editorPoli"); | ||
368 | + } | ||
369 | + i3GEO.atualiza(); | ||
370 | + i3GEO.tema.dialogo.download(retorno.data); | ||
371 | + }; | ||
372 | + wkt = editorlimites.toWKT(c); | ||
373 | + if(wkt == ""){ | ||
374 | + alert("Selecione um polígono"); | ||
375 | + return; | ||
376 | + } | ||
377 | + i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos"); | ||
378 | + i3GEO.php.funcoesGeometriasWkt(temp,wkt,"converteSHP"); | ||
379 | + } | ||
380 | + else{ | ||
381 | + alert("Selecione pelo menos uma figura"); | ||
382 | + return false; | ||
383 | + } | ||
384 | + }, | ||
385 | + relatorioCmas: function(){ | ||
386 | + var wkt,cabecalho,minimiza,ins, | ||
387 | + c = editorlimites.getCoordenadas(); | ||
388 | + editorlimites.mudaicone(); | ||
389 | + if(c.coordenadas.length > 0){ | ||
390 | + if($i("parano_corpo")) | ||
391 | + {return;} | ||
392 | + cabecalho = function(){ | ||
393 | + }; | ||
394 | + minimiza = function(){ | ||
395 | + i3GEO.janela.minimiza("parano"); | ||
396 | + }; | ||
397 | + i3GEO.janela.cria( | ||
398 | + "210px", | ||
399 | + "100px", | ||
400 | + "", | ||
401 | + "", | ||
402 | + "", | ||
403 | + "Relatório", | ||
404 | + "parano", | ||
405 | + false, | ||
406 | + "hd", | ||
407 | + cabecalho, | ||
408 | + minimiza | ||
409 | + ); | ||
410 | + $i("parano_corpo").style.backgroundColor = "white"; | ||
411 | + ins = "<p class='paragrafo'>Selecione o ano:<br><br><select id='anoRel'><option value='2003'>2003</option><option value='2005'>2005</option><option value='2007'>2007</option><option value='2008'>2008</option><option value='2009'>2009</option></select>"; | ||
412 | + ins += "<br><br><input id=botaorelatorio type='button' value='Criar relatório' />"; | ||
413 | + $i("parano_corpo").innerHTML = ins; | ||
414 | + new YAHOO.widget.Button( | ||
415 | + "botaorelatorio", | ||
416 | + {onclick:{fn: function(){ | ||
417 | + alert("O relatório será aberto em uma nova aba do navegador"); | ||
418 | + wkt = editorlimites.toWKT(editorlimites.getCoordenadas()); | ||
419 | + if(wkt == ""){ | ||
420 | + alert("Selecione um polígono"); | ||
421 | + return; | ||
422 | + } | ||
423 | + $i("relatorioCMAS_wkt").value = wkt; | ||
424 | + $i("relatorioCMAS_ano").value = $i("anoRel").value; | ||
425 | + $i("relatorioCMAS_g_sid").value = i3GEO.configura.sid; | ||
426 | + $i("relatorioCMAS_formato").value = "html"; | ||
427 | + $i("relatorioCMAS").action = i3GEO.configura.locaplic+"/ipam/relatoriocmas.php"; | ||
428 | + $i("relatorioCMAS").submit(); | ||
429 | + }}} | ||
430 | + ); | ||
431 | + } | ||
432 | + else{ | ||
433 | + alert("Selecione pelo menos uma figura"); | ||
434 | + return false; | ||
435 | + } | ||
436 | + }, | ||
437 | + upload: { | ||
438 | + aguarde: "", | ||
439 | + adicionaPoligonos: function(listaDePontos){ | ||
440 | + var n = listaDePontos.length, | ||
441 | + i = 0, | ||
442 | + nn, | ||
443 | + temp, | ||
444 | + j, | ||
445 | + pol, | ||
446 | + pontos = []; | ||
447 | + for(i=0;i<n;i++){ | ||
448 | + pontos = []; | ||
449 | + nn = listaDePontos[i].length; | ||
450 | + for(j=0;j<nn;j++){ | ||
451 | + temp = listaDePontos[i][j]; | ||
452 | + pontos.push(new google.maps.LatLng(temp[1],temp[0])); | ||
453 | + } | ||
454 | + pontos.push(pontos[0]); | ||
455 | + pol = new google.maps.Polygon({ | ||
456 | + path: pontos, | ||
457 | + map: i3GeoMap, | ||
458 | + fillColor: '#ffff00', | ||
459 | + fillOpacity: .5, | ||
460 | + strokeWeight: 2, | ||
461 | + clickable: true, | ||
462 | + zIndex: 1, | ||
463 | + editable: true | ||
464 | + }); | ||
465 | + google.maps.event.addListener(pol, 'click', function() { | ||
466 | + editorlimites.setSelection(pol); | ||
467 | + }); | ||
468 | + editorlimites.shapes.push(pol); | ||
469 | + } | ||
470 | + }, | ||
471 | + inicia: function(iddiv){ | ||
472 | + try{ | ||
473 | + $i(iddiv).innerHTML += editorlimites.upload.html(); | ||
474 | + new YAHOO.widget.Button( | ||
475 | + "i3GEOuploadbotao1", | ||
476 | + {onclick:{fn: editorlimites.upload.submete}} | ||
477 | + ); | ||
478 | + i3GEO.util.radioEpsg( | ||
479 | + function(retorno) | ||
480 | + {$i("i3GEOuploadListaepsg").innerHTML = retorno.dados;}, | ||
481 | + "i3GEOuploadListaepsg", | ||
482 | + "upload" | ||
483 | + ); | ||
484 | + } | ||
485 | + catch(erro){alert(erro);} | ||
486 | + }, | ||
487 | + html:function(){ | ||
488 | + var ins = '<form id=i3GEOuploadf target="i3GEOuploadiframe" action="'+i3GEO.configura.locaplic+'/ipam/editor/upload.php" method="post" ENCTYPE="multipart/form-data">' + | ||
489 | + '<p class="paragrafo" >shp: <br><input class=digitar type="file" size=42 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + | ||
490 | + '<p class="paragrafo" >shx: <br><input class=digitar type="file" size=42 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + | ||
491 | + '<p class="paragrafo" >dbf: <br><input class=digitar type="file" size=42 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>'; | ||
492 | + if(i3GEO.parametros.editor === "sim") | ||
493 | + {ins += '<p class="paragrafo" >pasta no servidor onde os dados<br>serão armazenados (opcional):<br><input class=digitar type="text" size=45 name="dirDestino" style="top:0px;left:0px;cursor:pointer;"></p>';} | ||
494 | + ins += '<p class="paragrafo" >Tipo de geometria: ' + | ||
495 | + ' <select id=tipo name=tipo >' + | ||
496 | + ' <option value="">não conhecido</option>' + | ||
497 | + ' <option value="1">pontual</option>' + | ||
498 | + ' <option value="5">poligonal</option>' + | ||
499 | + ' <option value="3">linear</option>' + | ||
500 | + ' </select>' + | ||
501 | + '</p>' + | ||
502 | + '<p class=paragrafo >Projeção:</p>' + | ||
503 | + '<div id=i3GEOuploadListaepsg width="98%" style="text-align:left;border:1px solid gray;left:0px;overflow:auto;height:60px"></div>' + | ||
504 | + '<br><p class="paragrafo" ><input id=i3GEOuploadbotao1 type="button" value="Enviar" size=12 name="submit">' + | ||
505 | + '<input type=hidden name=g_sid value="'+i3GEO.configura.sid+'" >' + | ||
506 | + '<input type="hidden" name="MAX_FILE_SIZE" value="1000000">' + | ||
507 | + '</form>' + | ||
508 | + "<p class='paragrafo' style=color:red >Não utilize '_' no nome do arquivo. Apenas letras e números são aceitos!!!</p>" + | ||
509 | + '<iframe name=i3GEOuploadiframe style="text-align:left;border:1px solid gray;" width="98%" height="60px"></iframe>'; | ||
510 | + return ins; | ||
511 | + }, | ||
512 | + criaJanelaFlutuante: function(){ | ||
513 | + var janela,divid,titulo,cabecalho,minimiza; | ||
514 | + cabecalho = function(){}; | ||
515 | + minimiza = function(){ | ||
516 | + i3GEO.janela.minimiza("i3GEOF.upload"); | ||
517 | + }; | ||
518 | + titulo = "Upload de shapefile <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=4&idajuda=27' > </a>"; | ||
519 | + janela = i3GEO.janela.cria( | ||
520 | + "355px", | ||
521 | + "470px", | ||
522 | + "", | ||
523 | + "", | ||
524 | + "", | ||
525 | + titulo, | ||
526 | + "editorlimites.upload", | ||
527 | + false, | ||
528 | + "hd", | ||
529 | + cabecalho, | ||
530 | + minimiza | ||
531 | + ); | ||
532 | + divid = janela[2].id; | ||
533 | + $i("editorlimites.upload_corpo").style.backgroundColor = "white"; | ||
534 | + editorlimites.upload.aguarde = $i("editorlimites.upload_imagemCabecalho").style; | ||
535 | + editorlimites.upload.inicia(divid); | ||
536 | + }, | ||
537 | + submete: function(){ | ||
538 | + if(editorlimites.upload.aguarde.visibility==="visible") | ||
539 | + {return;} | ||
540 | + editorlimites.upload.aguarde.visibility="visible"; | ||
541 | + $i("i3GEOuploadf").submit(); | ||
542 | + } | ||
543 | + }, | ||
544 | + imprimir: function(){ | ||
545 | + var wkt,cabecalho,minimiza,ins; | ||
546 | + if($i("parimprimir_corpo")) | ||
547 | + {return;} | ||
548 | + cabecalho = function(){ | ||
549 | + }; | ||
550 | + minimiza = function(){ | ||
551 | + i3GEO.janela.minimiza("parimprimir"); | ||
552 | + }; | ||
553 | + i3GEO.janela.cria( | ||
554 | + "210px", | ||
555 | + "100px", | ||
556 | + "", | ||
557 | + "", | ||
558 | + "", | ||
559 | + "Imprimir", | ||
560 | + "parimprimir", | ||
561 | + false, | ||
562 | + "hd", | ||
563 | + cabecalho, | ||
564 | + minimiza | ||
565 | + ); | ||
566 | + $i("parimprimir_corpo").style.backgroundColor = "white"; | ||
567 | + ins = "<p class='paragrafo'>Título:<br><br><input style='width:180px;cursor:text' id='tituloMapa' />"; | ||
568 | + ins += "<br><br><input id=botaoimprimirmapa type='button' value='Imprimir' />"; | ||
569 | + $i("parimprimir_corpo").innerHTML = ins; | ||
570 | + new YAHOO.widget.Button( | ||
571 | + "botaoimprimirmapa", | ||
572 | + {onclick:{fn: function(){ | ||
573 | + wkt = editorlimites.toWKT(editorlimites.getCoordenadas()); | ||
574 | + $i("mapaCMAS_wkt").value = wkt; | ||
575 | + $i("mapaCMAS_titulo").value = $i("tituloMapa").value; | ||
576 | + $i("mapaCMAS_g_sid").value = i3GEO.configura.sid; | ||
577 | + $i("mapaCMAS_formato").value = "pdf"; | ||
578 | + $i("mapaCMAS_mapexten").value = i3GEO.parametros.mapexten; | ||
579 | + $i("mapaCMAS").action = i3GEO.configura.locaplic+"/ipam/a4lpaisagempdf.php"; | ||
580 | + $i("mapaCMAS").submit(); | ||
581 | + }}} | ||
582 | + ); | ||
583 | + } | ||
584 | +}; | ||
0 | \ No newline at end of file | 585 | \ No newline at end of file |
@@ -0,0 +1,187 @@ | @@ -0,0 +1,187 @@ | ||
1 | +<?php | ||
2 | +/* | ||
3 | + Title: Editor de limites geograficos do sistema de metadados estatisticos | ||
4 | + | ||
5 | + Arquivo: | ||
6 | + | ||
7 | + i3geo/ferramentas/metaestat/editorlimites.php | ||
8 | + | ||
9 | + Licenca: | ||
10 | + | ||
11 | + GPL2 | ||
12 | + | ||
13 | + i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | ||
14 | + | ||
15 | + Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | ||
16 | + Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com.br | ||
17 | + | ||
18 | + Este programa é software livre; você pode redistribuí-lo | ||
19 | + e/ou modificá-lo sob os termos da Licença Pública Geral | ||
20 | + GNU conforme publicada pela Free Software Foundation; | ||
21 | + | ||
22 | + Este programa é distribuído na expectativa de que seja útil, | ||
23 | + porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | ||
24 | + de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | ||
25 | + Consulte a Licença Pública Geral do GNU para mais detalhes. | ||
26 | + Você deve ter recebido uma cópia da Licença Pública Geral do | ||
27 | + GNU junto com este programa; se não, escreva para a | ||
28 | + Free Software Foundation, Inc., no endereço | ||
29 | + 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
30 | + */ | ||
31 | + | ||
32 | +//TODO incluir verificacao de login | ||
33 | + | ||
34 | +include_once(__DIR__."/../../ms_configura.php"); | ||
35 | +?> | ||
36 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
37 | +<html> | ||
38 | +<head> | ||
39 | +<meta http-equiv="Category" content="i3Geo Mapa interativo geoprocessamento sig mobile"> | ||
40 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | ||
41 | +<title>i3GEO - Editor de limites</title> | ||
42 | + | ||
43 | +</head> | ||
44 | +<body id="i3geo" style="background-color:white"> | ||
45 | +<!-- inclui o nome do usuario logado --> | ||
46 | +<div id="i3GEONomeLogin" style="position:absolute;left:10px;top:12px;font-size:11px;z-index:50000"></div> | ||
47 | +<table id='mst' summary="" style='display:none;' width=100% cellspacing='0'> | ||
48 | + <tr style="border:0px"> | ||
49 | + <td id="barraSuperior" style="background-image:url('../../imagens/visual/default/cabeca.png');height:10px"></td> | ||
50 | + </tr> | ||
51 | + <tr> | ||
52 | + <td id="contemMenu" style="text-align:right;border-width:0pt 0pt 1px;border-color:rgb(240,240,240)"> | ||
53 | + <!--menu suspenso--> | ||
54 | + <div id="menus" ></div> | ||
55 | + </td> | ||
56 | + </tr> | ||
57 | + <tr> | ||
58 | + <td style="vertical-align:top;border-width:0px;"> | ||
59 | + <table width="100%" style="vertical-align:top;border-width:0px"> | ||
60 | + <tr> | ||
61 | + <td class=verdeclaro id=contemImg > | ||
62 | + <div id=googlemapsdiv style="position:relative;background-image:url('../../imagens/i3geo1bw.jpg');"></div> | ||
63 | + </td> | ||
64 | + </tr> | ||
65 | + </table> | ||
66 | + </td> | ||
67 | + </tr> | ||
68 | + <tr> | ||
69 | + <td> | ||
70 | + <table width=100% > | ||
71 | + <tr> | ||
72 | + <td class=tdbranca > | ||
73 | + <!-- | ||
74 | + Nesse div são incluídos os ícones que permitem ao usuário modificar o visual de cores dos ícones | ||
75 | + <div id=visual ></div> | ||
76 | + --> | ||
77 | + <!-- botão de compartilhamento em redes sociais --> | ||
78 | + <div id=i3GEOcompartilhar style="width:170px;margin:auto;text-align:left;border-top:1px solid rgb(250,250,250);padding-top:1px" ></div> | ||
79 | + <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | ||
80 | + <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div> | ||
81 | + </td> | ||
82 | + <td class=tdbranca > | ||
83 | + <!-- aqui será incluída a escala numérica --> | ||
84 | + <div id=escala style="margin:auto;text-align:right;" ></div> | ||
85 | + </td> | ||
86 | + <td class=tdbranca > | ||
87 | + <!-- aqui será incluído o gadget que mostra a coordenada geográfica da posição do mouse --> | ||
88 | + <div id=localizarxy style="margin:auto;text-align:left;font-size:10px;display:inline-table"></div> | ||
89 | + </td> | ||
90 | + <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> | ||
91 | + <td class=tdbranca > | ||
92 | + <div id=seletorIdiomas ></div> | ||
93 | + </td> | ||
94 | + </tr> | ||
95 | + </table> | ||
96 | + </td> | ||
97 | + </tr> | ||
98 | + <tr style="border:0px"> | ||
99 | + <td id="barraInferior" style="background-image:url('../../imagens/visual/default/rodape.png');height:10px"></td> | ||
100 | + </tr> | ||
101 | +</table> | ||
102 | +<table id="i3GEOlogoMarca" style='margin: 0px auto;box-shadow:0 1px 13px gray;border-radius:5px;'> | ||
103 | + <tr> | ||
104 | + <td><div id=versaoi3geo ></div><h2 style="font-size:10px;font-family: Verdana, Arial, Helvetica, sans-serif;">i3Geo - Software livre para criação de mapas interativos e geoprocessamento</h2><h3 style="font-size:10px;font-family: Verdana, Arial, Helvetica, sans-serif;">Baseado no Mapserver, é licenciado sob GPL e integra o Portal do Software Público Brasileiro</h3></td> | ||
105 | + </tr> | ||
106 | + <tr> | ||
107 | + <td style="padding:10px;"><img style="width:560px;height:81px" alt="" src='../../imagens/logo_inicio.png' ></td> | ||
108 | + </tr> | ||
109 | + <tr> | ||
110 | + <td> | ||
111 | + <!-- | ||
112 | + <script id="ohloh" type="text/javascript" src="http://www.ohloh.net/p/150688/widgets/project_users.js?style=red"></script> | ||
113 | + --> | ||
114 | + </td> | ||
115 | + </tr> | ||
116 | +</table> | ||
117 | + | ||
118 | +<div id="i3GEOguiaMovel" style="position:absolute;display:block;border:0px solid white;text-align:left;z-index:1000;background-color:none"> | ||
119 | + <img id='i3GEOguiaMovelPuxador' onclick='i3GEO.guias.guiaMovel.abreFecha()' style='z-index:2;border:solid 0px white;left:0px;position:absolute;top:0px' width='0px' src='../../imagens/openbars.png' > | ||
120 | + <div id="i3GEOguiaMovelMolde" style="position:absolute;display:none;border:0px solid white;text-align:left;z-index:1000;background-color:gray"> | ||
121 | + <div id='i3GEOguiaMovelIcones' style='overflow:none;left:0px;display:none;position:absolute;top:0px;text-align:center;height:0px;width:0px;border:solid 0px white;background-color:white' ></div> | ||
122 | + <div id='i3GEOguiaMovelConteudo' style='overflow:auto;display:none;position:absolute;border-color:gray;border-width:0px 0 0px 0px;left:0px;height:0px;background-color:white'> | ||
123 | + <div id='guia1obj' style='display:none;' > | ||
124 | + <!-- Esta div acrescenta a opção de busca rápida, caso vc queira colocá-la em um lugar específico --> | ||
125 | + <div style='left:5px;top:10px;' id=buscaRapida ></div> | ||
126 | + <!-- Esta div acrescenta a lista de propriedades do mapa --> | ||
127 | + <div id=listaPropriedades style='top:15px;' ></div> | ||
128 | + <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' específicas da interface Openlayers. Veja também a opção i3GEO.Interface.openlayers.GADGETS.LayerSwitcher --> | ||
129 | + <div id=listaLayersBase style='top:15px;'></div> | ||
130 | + <!-- Esta div acrescenta a lista de de camadas disponíveis no mapa atual --> | ||
131 | + <div id=listaTemas style='top:15px;'></div> | ||
132 | + </div> | ||
133 | + <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../../imagens/branco.gif" width=248 /></div> | ||
134 | + <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> | ||
135 | + <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> | ||
136 | + </div> | ||
137 | + </div> | ||
138 | +</div> | ||
139 | +<script src="editorlimites.js"></script> | ||
140 | +<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing "></script> | ||
141 | +<script type="text/javascript" src="../../classesjs/i3geo.js"></script> | ||
142 | +<script type="text/javascript"> | ||
143 | +i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | ||
144 | +i3GEO.Interface.ATUAL = "googlemaps"; | ||
145 | +i3GEO.Interface.IDCORPO = "contemImg"; | ||
146 | +i3GEO.configura.diminuixN = 20; | ||
147 | + | ||
148 | +i3GEO.cria(); | ||
149 | +i3GEO.configura.mapaRefDisplay = "none"; | ||
150 | +i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; | ||
151 | +i3GEO.barraDeBotoes.OFFSET = -10; | ||
152 | +i3GEO.barraDeBotoes.INCLUIBOTAO.barraedicao = false; | ||
153 | +i3GEO.configura.oMenuData["submenus"]["janelas"] = []; | ||
154 | +i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin = true; | ||
155 | +i3GEO.idioma.IDSELETOR = "seletorIdiomas"; | ||
156 | +i3GEO.Interface.ATIVAMENUCONTEXTO = true; | ||
157 | +i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; | ||
158 | +i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO = true; | ||
159 | +i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentario = false; | ||
160 | +i3GEO.mapa.AUTORESIZE = true; | ||
161 | +i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; | ||
162 | +i3GEO.guias.TIPO = "movel"; | ||
163 | +i3GEO.guias.guiaMovel.config.topGuiaMovel = 0; | ||
164 | +i3GEO.ajuda.ATIVAJANELA = false; | ||
165 | +i3GEO.finaliza = function(){ | ||
166 | + if($i("i3GEOlogoMarca")){ | ||
167 | + $i("i3GEOlogoMarca").style.display = "none"; | ||
168 | + } | ||
169 | +} | ||
170 | +i3GEO.finalizaAPI = function(){ | ||
171 | + var cabecalho, minimiza; | ||
172 | + cabecalho = function() { | ||
173 | + }; | ||
174 | + minimiza = function() { | ||
175 | + i3GEO.janela.minimiza("janelaEditorLimites"); | ||
176 | + }; | ||
177 | + janela = i3GEO.janela.cria("230px", "80px", "", "", "", | ||
178 | + "Editor", "janelaEditorLimites", false, "hd", | ||
179 | + cabecalho, minimiza); | ||
180 | + $i("janelaEditorLimites_corpo").style.backgroundColor = "white" | ||
181 | + editorlimites.inicia("janelaEditorLimites_corpo"); | ||
182 | + //janela[0].moveTo(100,450); | ||
183 | +} | ||
184 | +i3GEO.inicia(); | ||
185 | +</script> | ||
186 | +</body> | ||
187 | +</html> | ||
0 | \ No newline at end of file | 188 | \ No newline at end of file |
ferramentas/metaestat/index.js
1 | /* | 1 | /* |
2 | - T i*tle: Cartogramas estatísticos | 2 | + Title: Cartogramas estatísticos |
3 | 3 | ||
4 | Arquivo: | 4 | Arquivo: |
5 | 5 | ||
@@ -31,7 +31,7 @@ if(typeof(i3GEOF) === 'undefined'){ | @@ -31,7 +31,7 @@ if(typeof(i3GEOF) === 'undefined'){ | ||
31 | var i3GEOF = {}; | 31 | var i3GEOF = {}; |
32 | } | 32 | } |
33 | /* | 33 | /* |
34 | - C l*asse: i3GEOF.metaestat | 34 | + Classe: i3GEOF.metaestat |
35 | 35 | ||
36 | Gerencia os componentes do módulo de geração de cartogramas estatísticos | 36 | Gerencia os componentes do módulo de geração de cartogramas estatísticos |
37 | */ | 37 | */ |
@@ -651,10 +651,24 @@ i3GEOF.metaestat = { | @@ -651,10 +651,24 @@ i3GEOF.metaestat = { | ||
651 | "i3GEOFmetaestatEditorBotaot01", | 651 | "i3GEOFmetaestatEditorBotaot01", |
652 | {onclick:{fn: function(){window.open(i3GEO.configura.locaplic+"/admin/html/estat_variavel.html");}}} | 652 | {onclick:{fn: function(){window.open(i3GEO.configura.locaplic+"/admin/html/estat_variavel.html");}}} |
653 | ); | 653 | ); |
654 | - //TODO editor grafico | ||
655 | new YAHOO.widget.Button( | 654 | new YAHOO.widget.Button( |
656 | "i3GEOFmetaestatEditorBotaot02", | 655 | "i3GEOFmetaestatEditorBotaot02", |
657 | - {onclick:{fn: function(){alert("Oi");}}} | 656 | + {onclick:{fn: function(){ |
657 | + /* | ||
658 | + var v = $i("i3geoCartoComboVariavel"), | ||
659 | + m = $i("i3geoCartoComboMedidasVariavel"); | ||
660 | + if(!v || v.value === ""){ | ||
661 | + alert($trad(4,i3GEOF.metaestat.dicionario)); | ||
662 | + return; | ||
663 | + } | ||
664 | + if(!m || m.value === ""){ | ||
665 | + alert($trad(14,i3GEOF.metaestat.dicionario)); | ||
666 | + return; | ||
667 | + } | ||
668 | + */ | ||
669 | + alert($trad(15,i3GEOF.metaestat.dicionario1)); | ||
670 | + window.open(i3GEO.configura.locaplic+"/ferramentas/metaestat/editorlimites.php"); | ||
671 | + }}} | ||
658 | ); | 672 | ); |
659 | new YAHOO.widget.Button( | 673 | new YAHOO.widget.Button( |
660 | "i3GEOFmetaestatEditorBotaot03", | 674 | "i3GEOFmetaestatEditorBotaot03", |
@@ -768,7 +782,6 @@ i3GEOF.metaestat = { | @@ -768,7 +782,6 @@ i3GEOF.metaestat = { | ||
768 | * Edicao da classificacao | 782 | * Edicao da classificacao |
769 | */ | 783 | */ |
770 | t3: function(remove,textoSelecionado){ | 784 | t3: function(remove,textoSelecionado){ |
771 | - //TODO incluir opcao de upload de dados | ||
772 | if(remove == true){ | 785 | if(remove == true){ |
773 | //remove o conteudo anteriormente construido | 786 | //remove o conteudo anteriormente construido |
774 | i3GEOF.metaestat.editor.removeEl("i3GEOF.metaestat.editor.t3"); | 787 | i3GEOF.metaestat.editor.removeEl("i3GEOF.metaestat.editor.t3"); |
interface/carto_ol.htm
@@ -114,7 +114,7 @@ i3GEO.Interface.openlayers.GADGETS = { | @@ -114,7 +114,7 @@ i3GEO.Interface.openlayers.GADGETS = { | ||
114 | OverviewMap:false | 114 | OverviewMap:false |
115 | }; | 115 | }; |
116 | i3GEO.Interface.openlayers.TILES = true; | 116 | i3GEO.Interface.openlayers.TILES = true; |
117 | -i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}' | 117 | +i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}'; |
118 | i3GEO.cria(); | 118 | i3GEO.cria(); |
119 | i3GEO.configura.mapaRefDisplay = "none"; | 119 | i3GEO.configura.mapaRefDisplay = "none"; |
120 | i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; | 120 | i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; |