Commit 3489ff18025e3fb2b3a2f2866f1d0e2c49533a0d
1 parent
9e5d9dcc
Exists in
master
and in
7 other branches
$1
Showing
10 changed files
with
70 additions
and
41 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/classe_metaestat.php
@@ -2556,11 +2556,11 @@ class Metaestat{ | @@ -2556,11 +2556,11 @@ class Metaestat{ | ||
2556 | if($tipo != "" && $tipo != "excluir" && ($identificadornovo == "" || $nome == "")){ | 2556 | if($tipo != "" && $tipo != "excluir" && ($identificadornovo == "" || $nome == "")){ |
2557 | return array("erro"); | 2557 | return array("erro"); |
2558 | } | 2558 | } |
2559 | - if($colunas == ""){ | ||
2560 | - $colunas = "colunanomeregiao"; | ||
2561 | - } | ||
2562 | //pega a tabela, esquema e conexao para acessar os dados da regiao | 2559 | //pega a tabela, esquema e conexao para acessar os dados da regiao |
2563 | $regiao = $this->listaTipoRegiao($codigo_tipo_regiao); | 2560 | $regiao = $this->listaTipoRegiao($codigo_tipo_regiao); |
2561 | + if($colunas == ""){ | ||
2562 | + $colunas = $regiao["colunanomeregiao"]; | ||
2563 | + } | ||
2564 | $c = $this->listaConexao($regiao["codigo_estat_conexao"],true); | 2564 | $c = $this->listaConexao($regiao["codigo_estat_conexao"],true); |
2565 | $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]); | 2565 | $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]); |
2566 | //faz uma validacao para verificar se na tabela o identificador unico existe mais de uma vez | 2566 | //faz uma validacao para verificar se na tabela o identificador unico existe mais de uma vez |
classesjs/classe_interface.js
@@ -1639,6 +1639,7 @@ i3GEO.Interface = { | @@ -1639,6 +1639,7 @@ i3GEO.Interface = { | ||
1639 | }, | 1639 | }, |
1640 | cria: function(w,h){ | 1640 | cria: function(w,h){ |
1641 | var i,f,ins; | 1641 | var i,f,ins; |
1642 | + google.maps.visualRefresh = true; | ||
1642 | posfixo = "&nd=0"; | 1643 | posfixo = "&nd=0"; |
1643 | i = $i(i3GEO.Interface.IDCORPO); | 1644 | i = $i(i3GEO.Interface.IDCORPO); |
1644 | if(i){ | 1645 | if(i){ |
ferramentas/metaestat/dicionario.js
@@ -106,21 +106,21 @@ it:"" | @@ -106,21 +106,21 @@ it:"" | ||
106 | }], | 106 | }], |
107 | "15":[ | 107 | "15":[ |
108 | { | 108 | { |
109 | -pt:"Editar limite geográfico", | 109 | +pt:"Editar camada", |
110 | en:"", | 110 | en:"", |
111 | es:"", | 111 | es:"", |
112 | it:"" | 112 | it:"" |
113 | }], | 113 | }], |
114 | "16":[ | 114 | "16":[ |
115 | { | 115 | { |
116 | -pt:"Limite geográfico", | 116 | +pt:"Limite ou local geográfico", |
117 | en:"", | 117 | en:"", |
118 | es:"", | 118 | es:"", |
119 | it:"" | 119 | it:"" |
120 | }], | 120 | }], |
121 | "17":[ | 121 | "17":[ |
122 | { | 122 | { |
123 | -pt:"Escolha um tipo de limite geográfico (limites utilizados para representar os valores) e o tipo de classificação dos dados, depois escolha os valores para os parâmetros , se houver. Para adicionar a camada ao mapa, clique no botão de adição e feche a janela para continuar usando o mapa.", | 123 | +pt:"Escolha um tipo de limite ou local geográfico (limites utilizados para representar os valores) e o tipo de classificação dos dados, depois escolha os valores para os parâmetros , se houver. Para adicionar a camada ao mapa, clique no botão de adição e feche a janela para continuar usando o mapa.", |
124 | en:"", | 124 | en:"", |
125 | es:"", | 125 | es:"", |
126 | it:"" | 126 | it:"" |
ferramentas/metaestat/editorlimites.js
@@ -44,6 +44,14 @@ Classe: i3GEOF.editorlimites | @@ -44,6 +44,14 @@ Classe: i3GEOF.editorlimites | ||
44 | Funções de edição vetorial utilizadas pelo editor de regiões do sistema METAESTAT | 44 | Funções de edição vetorial utilizadas pelo editor de regiões do sistema METAESTAT |
45 | */ | 45 | */ |
46 | i3GEOF.editorlimites = { | 46 | i3GEOF.editorlimites = { |
47 | + iconePonto: function(sel){ | ||
48 | + if(sel){ | ||
49 | + return i3GEO.configura.locaplic+"/imagens/google/symbol_middot_y.png"; | ||
50 | + } | ||
51 | + else{ | ||
52 | + return i3GEO.configura.locaplic+"/imagens/google/symbol_middot.png"; | ||
53 | + } | ||
54 | + }, | ||
47 | /** | 55 | /** |
48 | * Objeto DOM com a imagem de aguarde existente no cabecalho da janela | 56 | * Objeto DOM com a imagem de aguarde existente no cabecalho da janela |
49 | * | 57 | * |
@@ -113,7 +121,16 @@ i3GEOF.editorlimites = { | @@ -113,7 +121,16 @@ i3GEOF.editorlimites = { | ||
113 | drawingModes: [google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYLINE] | 121 | drawingModes: [google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYLINE] |
114 | }, | 122 | }, |
115 | markerOptions: { | 123 | markerOptions: { |
116 | - icon: new google.maps.MarkerImage('http://www.example.com/icon.png') | 124 | + icon: i3GEOF.editorlimites.iconePonto(), |
125 | + clickable: true, | ||
126 | + zIndex: 1, | ||
127 | + draggable: true, | ||
128 | + tema: "", | ||
129 | + colunaid: "", | ||
130 | + valorid: "", | ||
131 | + colunanome: "", | ||
132 | + valornome: "", | ||
133 | + editable: false | ||
117 | }, | 134 | }, |
118 | polygonOptions: { | 135 | polygonOptions: { |
119 | fillColor: '#ffff00', | 136 | fillColor: '#ffff00', |
@@ -132,7 +149,7 @@ i3GEOF.editorlimites = { | @@ -132,7 +149,7 @@ i3GEOF.editorlimites = { | ||
132 | i3GEOF.editorlimites.drawingManager.setMap(i3GeoMap); | 149 | i3GEOF.editorlimites.drawingManager.setMap(i3GeoMap); |
133 | i3GEOF.editorlimites.drawingManager.setDrawingMode(null); | 150 | i3GEOF.editorlimites.drawingManager.setDrawingMode(null); |
134 | google.maps.event.addListener(i3GEOF.editorlimites.drawingManager, 'overlaycomplete', function(e) { | 151 | google.maps.event.addListener(i3GEOF.editorlimites.drawingManager, 'overlaycomplete', function(e) { |
135 | - if (e.type != google.maps.drawing.OverlayType.MARKER) { | 152 | + //if (e.type != google.maps.drawing.OverlayType.MARKER) { |
136 | i3GEOF.editorlimites.drawingManager.setDrawingMode(null); | 153 | i3GEOF.editorlimites.drawingManager.setDrawingMode(null); |
137 | i3GEOF.editorlimites.mudaicone(); | 154 | i3GEOF.editorlimites.mudaicone(); |
138 | var newShape = e.overlay; | 155 | var newShape = e.overlay; |
@@ -147,7 +164,7 @@ i3GEOF.editorlimites = { | @@ -147,7 +164,7 @@ i3GEOF.editorlimites = { | ||
147 | }); | 164 | }); |
148 | i3GEOF.editorlimites.setSelection(newShape); | 165 | i3GEOF.editorlimites.setSelection(newShape); |
149 | i3GEOF.editorlimites.shapes.push(newShape); | 166 | i3GEOF.editorlimites.shapes.push(newShape); |
150 | - } | 167 | + //} |
151 | }); | 168 | }); |
152 | google.maps.event.addListener( | 169 | google.maps.event.addListener( |
153 | i3GEOF.editorlimites.drawingManager, | 170 | i3GEOF.editorlimites.drawingManager, |
@@ -183,10 +200,11 @@ i3GEOF.editorlimites = { | @@ -183,10 +200,11 @@ i3GEOF.editorlimites = { | ||
183 | html:function(){ | 200 | html:function(){ |
184 | var ins = '<div style=margin-left:5px >' + | 201 | var ins = '<div style=margin-left:5px >' + |
185 | ' <button title="Desenhar um polígono" onclick="i3GEOF.editorlimites.digitalizaPol(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/polygon-create.png" /></button>' + | 202 | ' <button title="Desenhar um polígono" onclick="i3GEOF.editorlimites.digitalizaPol(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/polygon-create.png" /></button>' + |
186 | - ' <button title="Capturar polígono de um tema" onclick="i3GEOF.editorlimites.capturaPoligonoTema.ativa(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/layer-import.png" /></button>' + | 203 | + ' <button title="Adicionar ponto" onclick="i3GEOF.editorlimites.digitalizaPt(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/point-create.png" /></button>' + |
204 | + ' <button title="Capturar elemento de um tema" onclick="i3GEOF.editorlimites.capturaPoligonoTema.ativa(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/layer-import.png" /></button>' + | ||
187 | ' <button title="Selecionar" onclick="i3GEOF.editorlimites.seleciona(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/select.png" /></button>' + | 205 | ' <button title="Selecionar" onclick="i3GEOF.editorlimites.seleciona(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/select.png" /></button>' + |
188 | ' <button title="Remove selecionado (não apaga)" onclick="i3GEOF.editorlimites.deleteSelectedShape()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/selected-delete.png" /></button>' + | 206 | ' <button title="Remove selecionado (não apaga)" onclick="i3GEOF.editorlimites.deleteSelectedShape()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/selected-delete.png" /></button>' + |
189 | - ' <button title="Salvar limite" onclick="i3GEOF.editorlimites.salvaLimite.inicia()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/vector-save.png" /></button>' + | 207 | + ' <button title="Salvar/excluir dados" onclick="i3GEOF.editorlimites.salvaLimite.inicia()"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/vector-save.png" /></button>' + |
190 | ' <button title="Editar atributos" onclick="i3GEOF.editorlimites.editarAtributos.ativa(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/annotation-form.png" /></button>' + | 208 | ' <button title="Editar atributos" onclick="i3GEOF.editorlimites.editarAtributos.ativa(this)"><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/annotation-form.png" /></button>' + |
191 | ' <button title="Ajuda" onmousedown="i3GEOF.editorlimites.mudaicone()" onclick="i3GEOF.editorlimites.ajuda()" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/help-contents.png" /></button>' + | 209 | ' <button title="Ajuda" onmousedown="i3GEOF.editorlimites.mudaicone()" onclick="i3GEOF.editorlimites.ajuda()" ><img src="'+i3GEO.configura.locaplic+'/imagens/gisicons/help-contents.png" /></button>' + |
192 | ' <br><div id="i3geoCartoRegioesEditaveisDiv" ><img style="display:block;z-index:2" src="'+i3GEO.configura.locaplic+'/imagens/aguarde.gif" /></div></div>'; //combo para escolher a regiao | 210 | ' <br><div id="i3geoCartoRegioesEditaveisDiv" ><img style="display:block;z-index:2" src="'+i3GEO.configura.locaplic+'/imagens/aguarde.gif" /></div></div>'; //combo para escolher a regiao |
@@ -211,7 +229,7 @@ i3GEOF.editorlimites = { | @@ -211,7 +229,7 @@ i3GEOF.editorlimites = { | ||
211 | } | 229 | } |
212 | else{ | 230 | else{ |
213 | shape.editable = true; | 231 | shape.editable = true; |
214 | - shape.setFlat(false); | 232 | + shape.setIcon({url: i3GEOF.editorlimites.iconePonto(true)}); |
215 | } | 233 | } |
216 | }, | 234 | }, |
217 | /** | 235 | /** |
@@ -227,7 +245,7 @@ i3GEOF.editorlimites = { | @@ -227,7 +245,7 @@ i3GEOF.editorlimites = { | ||
227 | } | 245 | } |
228 | else if(i3GEOF.editorlimites.shapes[i] != ""){//caso for ponto | 246 | else if(i3GEOF.editorlimites.shapes[i] != ""){//caso for ponto |
229 | i3GEOF.editorlimites.shapes[i].editable = false; | 247 | i3GEOF.editorlimites.shapes[i].editable = false; |
230 | - i3GEOF.editorlimites.shapes[i].setFlat(true); | 248 | + i3GEOF.editorlimites.shapes[i].setIcon({url: i3GEOF.editorlimites.iconePonto(false)}); |
231 | } | 249 | } |
232 | } | 250 | } |
233 | }, | 251 | }, |
@@ -244,7 +262,7 @@ i3GEOF.editorlimites = { | @@ -244,7 +262,7 @@ i3GEOF.editorlimites = { | ||
244 | } | 262 | } |
245 | else if(i3GEOF.editorlimites.shapes[i] != ""){//caso for ponto | 263 | else if(i3GEOF.editorlimites.shapes[i] != ""){//caso for ponto |
246 | i3GEOF.editorlimites.shapes[i].editable = true; | 264 | i3GEOF.editorlimites.shapes[i].editable = true; |
247 | - i3GEOF.editorlimites.shapes[i].setFlat(false); | 265 | + i3GEOF.editorlimites.shapes[i].setIcon({url: i3GEOF.editorlimites.iconePonto(true)}); |
248 | } | 266 | } |
249 | } | 267 | } |
250 | }, | 268 | }, |
@@ -512,6 +530,17 @@ i3GEOF.editorlimites = { | @@ -512,6 +530,17 @@ i3GEOF.editorlimites = { | ||
512 | }); | 530 | }); |
513 | }, | 531 | }, |
514 | /** | 532 | /** |
533 | + * Ativa a digitalizacao de ponto | ||
534 | + * @param objeto DOM que representa o botao que sera focado | ||
535 | + */ | ||
536 | + digitalizaPt: function(botao){ | ||
537 | + i3GEOF.editorlimites.mudaicone(botao); | ||
538 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | ||
539 | + i3GEOF.editorlimites.drawingManager.setOptions({ | ||
540 | + drawingMode: google.maps.drawing.OverlayType.MARKER | ||
541 | + }); | ||
542 | + }, | ||
543 | + /** | ||
515 | * Ativa a selecao de figuras | 544 | * Ativa a selecao de figuras |
516 | * @param objeto DOM que representa o botao que sera focado | 545 | * @param objeto DOM que representa o botao que sera focado |
517 | */ | 546 | */ |
@@ -605,9 +634,9 @@ i3GEOF.editorlimites = { | @@ -605,9 +634,9 @@ i3GEOF.editorlimites = { | ||
605 | pol = new google.maps.Marker({ | 634 | pol = new google.maps.Marker({ |
606 | position: new google.maps.LatLng(obj.getPosition().ob,obj.getPosition().pb), | 635 | position: new google.maps.LatLng(obj.getPosition().ob,obj.getPosition().pb), |
607 | map: i3GeoMap, | 636 | map: i3GeoMap, |
608 | - fillColor: '#ffff00', | ||
609 | - fillOpacity: .5, | ||
610 | - strokeWeight: 2, | 637 | + icon: { |
638 | + url: i3GEOF.editorlimites.iconePonto(false) | ||
639 | + }, | ||
611 | clickable: true, | 640 | clickable: true, |
612 | zIndex: 1, | 641 | zIndex: 1, |
613 | draggable: true, | 642 | draggable: true, |
@@ -616,7 +645,6 @@ i3GEOF.editorlimites = { | @@ -616,7 +645,6 @@ i3GEOF.editorlimites = { | ||
616 | valorid: valorid, | 645 | valorid: valorid, |
617 | colunanome: colunanome, | 646 | colunanome: colunanome, |
618 | valornome: valornome, | 647 | valornome: valornome, |
619 | - flat: true, | ||
620 | editable: false | 648 | editable: false |
621 | }); | 649 | }); |
622 | google.maps.event.addListener(pol, 'click', function() { | 650 | google.maps.event.addListener(pol, 'click', function() { |
@@ -694,7 +722,7 @@ i3GEOF.editorlimites = { | @@ -694,7 +722,7 @@ i3GEOF.editorlimites = { | ||
694 | '<p class=paragrafo >Escolha a operação desejada:</p>' + | 722 | '<p class=paragrafo >Escolha a operação desejada:</p>' + |
695 | '<input id=i3GEOFmetaestati3GEOF.editorlimitesBotao1 type="button" value="Salvar tudo" />' + | 723 | '<input id=i3GEOFmetaestati3GEOF.editorlimitesBotao1 type="button" value="Salvar tudo" />' + |
696 | ' <input id=i3GEOFmetaestati3GEOF.editorlimitesBotao2 type="button" value="Salvar apenas os atributos" />' + | 724 | ' <input id=i3GEOFmetaestati3GEOF.editorlimitesBotao2 type="button" value="Salvar apenas os atributos" />' + |
697 | - '<br><br><input id=i3GEOFmetaestati3GEOF.editorlimitesBotao3 type="button" value="Excluir polígono" />'; | 725 | + '<br><br><input id=i3GEOFmetaestati3GEOF.editorlimitesBotao3 type="button" value="Excluir" />'; |
698 | return ins; | 726 | return ins; |
699 | }, | 727 | }, |
700 | /** | 728 | /** |
@@ -709,7 +737,7 @@ i3GEOF.editorlimites = { | @@ -709,7 +737,7 @@ i3GEOF.editorlimites = { | ||
709 | }; | 737 | }; |
710 | titulo = "Salva limite </a>"; | 738 | titulo = "Salva limite </a>"; |
711 | janela = i3GEO.janela.cria( | 739 | janela = i3GEO.janela.cria( |
712 | - "350px", | 740 | + "300px", |
713 | "265px", | 741 | "265px", |
714 | "", | 742 | "", |
715 | "", | 743 | "", |
ferramentas/metaestat/editorlimites.php
1 | <?php | 1 | <?php |
2 | /* | 2 | /* |
3 | - Title: Editor de limites geograficos do sistema de metadados estatisticos | 3 | +Title: Editor de limites geograficos do sistema de metadados estatisticos |
4 | 4 | ||
5 | - Interface de mapa interativo com as opcoes de edicao vetorial dos limites das regioes cadastradas | 5 | +Interface de mapa interativo com as opcoes de edicao vetorial dos limites das regioes cadastradas |
6 | 6 | ||
7 | - Arquivo: | 7 | +Arquivo: |
8 | 8 | ||
9 | - i3geo/ferramentas/metaestat/editorlimites.php | 9 | +i3geo/ferramentas/metaestat/editorlimites.php |
10 | 10 | ||
11 | - Licenca: | 11 | +Licenca: |
12 | 12 | ||
13 | - GPL2 | 13 | +GPL2 |
14 | 14 | ||
15 | - i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | 15 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet |
16 | 16 | ||
17 | - Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | ||
18 | - Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com.br | 17 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil |
18 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com.br | ||
19 | 19 | ||
20 | - Este programa é software livre; você pode redistribuí-lo | ||
21 | - e/ou modificá-lo sob os termos da Licença Pública Geral | ||
22 | - GNU conforme publicada pela Free Software Foundation; | 20 | +Este programa é software livre; você pode redistribuí-lo |
21 | +e/ou modificá-lo sob os termos da Licença Pública Geral | ||
22 | +GNU conforme publicada pela Free Software Foundation; | ||
23 | 23 | ||
24 | - Este programa é distribuído na expectativa de que seja útil, | ||
25 | - porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | ||
26 | - de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | ||
27 | - Consulte a Licença Pública Geral do GNU para mais detalhes. | ||
28 | - Você deve ter recebido uma cópia da Licença Pública Geral do | ||
29 | - GNU junto com este programa; se não, escreva para a | ||
30 | - Free Software Foundation, Inc., no endereço | ||
31 | - 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 24 | +Este programa é distribuído na expectativa de que seja útil, |
25 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | ||
26 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | ||
27 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | ||
28 | +Você deve ter recebido uma cópia da Licença Pública Geral do | ||
29 | +GNU junto com este programa; se não, escreva para a | ||
30 | +Free Software Foundation, Inc., no endereço | ||
31 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
32 | */ | 32 | */ |
33 | error_reporting(0); | 33 | error_reporting(0); |
34 | include_once(dirname(__FILE__)."/../../ms_configura.php"); | 34 | include_once(dirname(__FILE__)."/../../ms_configura.php"); |
@@ -179,7 +179,7 @@ i3GEO.finalizaAPI = function(){ | @@ -179,7 +179,7 @@ i3GEO.finalizaAPI = function(){ | ||
179 | minimiza = function() { | 179 | minimiza = function() { |
180 | i3GEO.janela.minimiza("janelaEditorLimites"); | 180 | i3GEO.janela.minimiza("janelaEditorLimites"); |
181 | }; | 181 | }; |
182 | - janela = i3GEO.janela.cria("260px", "100px", "", "", "", | 182 | + janela = i3GEO.janela.cria("300px", "100px", "", "", "", |
183 | "Editor", "janelaEditorLimites", false, "hd", | 183 | "Editor", "janelaEditorLimites", false, "hd", |
184 | cabecalho, minimiza); | 184 | cabecalho, minimiza); |
185 | $i("janelaEditorLimites_corpo").style.backgroundColor = "white"; | 185 | $i("janelaEditorLimites_corpo").style.backgroundColor = "white"; |
558 Bytes
573 Bytes
2.68 KB
2.97 KB