Commit 296a59368cbc5e3e3e772def69a373ee76fc6be3
1 parent
d617b350
Exists in
master
and in
7 other branches
Correção na edição de intervalos de classes no METAESTAT
Showing
5 changed files
with
302 additions
and
3 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/js/estat_variavel.js
@@ -1107,7 +1107,7 @@ i3GEOadmin.variaveis = { | @@ -1107,7 +1107,7 @@ i3GEOadmin.variaveis = { | ||
1107 | {core_excluiNoTree(sUrl,no,mensagem);} | 1107 | {core_excluiNoTree(sUrl,no,mensagem);} |
1108 | }, | 1108 | }, |
1109 | gravaDados: function(tipo,id){ | 1109 | gravaDados: function(tipo,id){ |
1110 | - var sUrl,i,campos = null, | 1110 | + var reg,temp,sUrl,i,campos = null, |
1111 | par = null, | 1111 | par = null, |
1112 | prog = null; | 1112 | prog = null; |
1113 | if(tipo == "variavel"){ | 1113 | if(tipo == "variavel"){ |
@@ -1131,9 +1131,13 @@ i3GEOadmin.variaveis = { | @@ -1131,9 +1131,13 @@ i3GEOadmin.variaveis = { | ||
1131 | prog = i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=alteraClassificacaoMedida"; | 1131 | prog = i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=alteraClassificacaoMedida"; |
1132 | } | 1132 | } |
1133 | if(tipo == "classeClassificacao"){ | 1133 | if(tipo == "classeClassificacao"){ |
1134 | - campos = new Array("titulo","expressao","azul","verde","vermelho","tamanho","simbolo","otamanho","overde","oazul","overmelho"); | 1134 | + campos = new Array("titulo","azul","verde","vermelho","tamanho","simbolo","otamanho","overde","oazul","overmelho"); |
1135 | par = "&id_classe="+id; | 1135 | par = "&id_classe="+id; |
1136 | - prog = i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=alteraClasseClassificacao"; | 1136 | + //troca o < por | para evitar problemas de passagem de parametro |
1137 | + temp = $i("Eexpressao").value; | ||
1138 | + reg = new RegExp("<", "g"); | ||
1139 | + temp = temp.replace(reg,'|'); | ||
1140 | + prog = i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=alteraClasseClassificacao&expressao="+temp; | ||
1137 | } | 1141 | } |
1138 | if(tipo == "linkMedida"){ | 1142 | if(tipo == "linkMedida"){ |
1139 | campos = new Array("nome","link"); | 1143 | campos = new Array("nome","link"); |
admin/php/classe_metaestat.php
@@ -1172,6 +1172,9 @@ class Metaestat{ | @@ -1172,6 +1172,9 @@ class Metaestat{ | ||
1172 | $titulo = utf8_encode($titulo); | 1172 | $titulo = utf8_encode($titulo); |
1173 | } | 1173 | } |
1174 | //echo "UPDATE ".$this->esquemaadmin."i3geoestat_classe SET azul = '$azul', verde = '$verde', vermelho = '$vermelho',expressao = '$expressao', titulo = '$titulo' WHERE id_classe = $id_classe";exit; | 1174 | //echo "UPDATE ".$this->esquemaadmin."i3geoestat_classe SET azul = '$azul', verde = '$verde', vermelho = '$vermelho',expressao = '$expressao', titulo = '$titulo' WHERE id_classe = $id_classe";exit; |
1175 | + //o sinal de | e substituido por < para compatibilizar pois o contrario e feito no lado do cliente | ||
1176 | + //essa troca e feita para evitar um erro na passagem de parametro, que remove o < | ||
1177 | + $expressao = str_replace("|","<",$expressao); | ||
1175 | $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_classes SET tamanho='$tamanho',simbolo='$simbolo',overmelho='$overmelho',overde='$overde',oazul='$oazul',otamanho='$otamanho',azul = '$azul', verde = '$verde', vermelho = '$vermelho',expressao = '$expressao', titulo = '$titulo' WHERE id_classe = $id_classe"); | 1178 | $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_classes SET tamanho='$tamanho',simbolo='$simbolo',overmelho='$overmelho',overde='$overde',oazul='$oazul',otamanho='$otamanho',azul = '$azul', verde = '$verde', vermelho = '$vermelho',expressao = '$expressao', titulo = '$titulo' WHERE id_classe = $id_classe"); |
1176 | $retorna = $id_classe; | 1179 | $retorna = $id_classe; |
1177 | } | 1180 | } |
@@ -0,0 +1,288 @@ | @@ -0,0 +1,288 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | +<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | ||
5 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | ||
6 | +<title>i3GEO - OpenLayers</title> | ||
7 | +<!-- estilo necessário para a ferramenta de edição --> | ||
8 | +<style> | ||
9 | +.olControlEditingToolbar1 div { | ||
10 | + background-image:url(../mashups/openlayers.png); | ||
11 | + background-repeat:no-repeat; | ||
12 | + float:right; | ||
13 | + right: 0px; | ||
14 | + height:29px; | ||
15 | + margin:2px; | ||
16 | + width:29px; | ||
17 | + cursor:pointer; | ||
18 | +} | ||
19 | +</style> | ||
20 | +</head> | ||
21 | +<body id="i3geo"> | ||
22 | +<!-- inclui o nome do usuario logado --> | ||
23 | +<div id="i3GEONomeLogin" style="position:absolute;left:10px;top:12px;font-size:11px;z-index:50000"></div> | ||
24 | +<table id='mst' summary="" style='display:none;' width=100% cellspacing='0'> | ||
25 | + | ||
26 | +<!-- | ||
27 | + Inclui a barra superior. Se vc não quiser o menu, é só comentar o TR | ||
28 | +--> | ||
29 | +<tr style="border:0px"> | ||
30 | + <td colspan=2 id="barraSuperior" style="background-image:url('../imagens/visual/default/cabeca.png');height:10px"></td> | ||
31 | +</tr> | ||
32 | +<tr> | ||
33 | +<td> | ||
34 | + <table width=100% cellspacing=0 cellpadding=0 > | ||
35 | + <tr> | ||
36 | + <td></td> | ||
37 | + <td> | ||
38 | + <!-- | ||
39 | + Guias principais, não mude o ID, apenas o nome se for desejado | ||
40 | + Para remover uma guia, basta comentar a linha | ||
41 | + --> | ||
42 | + <div class=verdeescuro style="top:0px;cursor:pointer;"> | ||
43 | + <div id=guia1 class=guia ></div> | ||
44 | + <div id=guia2 class=guia ></div> | ||
45 | + <div id=guia4 class=guia ></div> | ||
46 | + <div id=guia5 class=guia ></div> | ||
47 | + </div> | ||
48 | + </td> | ||
49 | + | ||
50 | + </tr> | ||
51 | + </table> | ||
52 | +</td> | ||
53 | +<td id="contemMenu" style="text-align:right;height:0px;border-width:0pt 0pt 1px;border-color:rgb(240,240,240)"> | ||
54 | + <!-- | ||
55 | + menu suspenso | ||
56 | + --> | ||
57 | + <div id="menus" ></div> | ||
58 | +</td> | ||
59 | +</tr> | ||
60 | +<tr> | ||
61 | + <td class=tdbranca id=contemFerramentas style="vertical-align:top;width:300px;text-align:left;"> | ||
62 | + <!-- | ||
63 | + As divs guiaNobj guardam o conteúdo que é mostrado quando a guia é clicada | ||
64 | + Para cada botão na guia deve haver um div com o conteúdo, pe. | ||
65 | + o div com id=guia1 deve ter um div com id=guia1obj | ||
66 | + --> | ||
67 | + <div id='guia1obj' > | ||
68 | + <!-- Esta div acrescenta a opção de busca rápida, caso vc queira colocá-la em um lugar específico --> | ||
69 | + <div style='left:5px;top:10px;' id=buscaRapida ></div> | ||
70 | + <!-- Esta div acrescenta a lista de propriedades do mapa --> | ||
71 | + <div id=listaPropriedades style='top:15px;' ></div> | ||
72 | + <!-- 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 --> | ||
73 | + <div id=listaLayersBase style='top:15px;'></div> | ||
74 | + <!-- Esta div acrescenta a lista de de camadas disponíveis no mapa atual --> | ||
75 | + <div id=listaTemas style='top:15px;'></div> | ||
76 | + </div> | ||
77 | + | ||
78 | + <!-- se vc quiser colocar a arvore de adição de temas em um lugar específico, | ||
79 | + use o div abaixo, caso contrário, a árvore será colocada na guia definida em objmapa.guiaMenu, por default a guia2 | ||
80 | + <div id=arvoreAdicionaTema style='top:25px;' ></div> | ||
81 | + <div id=outrasOpcoesAdiciona style='top:25px;' ></div> | ||
82 | + --> | ||
83 | + | ||
84 | + <div id='guia2obj' style='display:none;'>Aguarde...<img alt="" src="../imagens/branco.gif" width=248 /></div> | ||
85 | + <div id='guia4obj' style='display:none;text-align:left'><div id='legenda' style='text-align:left'></div></div> | ||
86 | + <div id='guia5obj' style='display:none;text-align:left'><div id='banners' style='overflow:auto;text-align:left'>Aguarde...</div></div> | ||
87 | + </td> | ||
88 | + <td style="vertical-align:top;border-width:0px;"> | ||
89 | + <table width="100%" style="vertical-align:top;border-width:0px"> | ||
90 | + <tr><td class=verdeclaro id=contemImg > | ||
91 | + <div id=corpoMapa style="position:relative;background-image:url('../imagens/i3geo1bw.jpg');"></div> | ||
92 | + </td></tr> | ||
93 | + </table> | ||
94 | + </td> | ||
95 | + </tr> | ||
96 | + | ||
97 | +<tr> | ||
98 | + | ||
99 | + <td class=tdbranca > | ||
100 | + <!-- | ||
101 | + Nesse div são incluídos os ícones que permitem ao usuário modificar o visual de cores dos ícones | ||
102 | + <div id=visual ></div> | ||
103 | + --> | ||
104 | + <!-- botão de compartilhamento em redes sociais --> | ||
105 | + <div id=i3GEOcompartilhar style="text-align:left;border-top:1px solid rgb(250,250,250);padding-top:1px" ></div> | ||
106 | + <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | ||
107 | + <div id=tempoRedesenho style=color:green;background-color:black;width:50px;display:none ></div> | ||
108 | + </td> | ||
109 | + <td class=tdbranca > | ||
110 | + <table width=100% > | ||
111 | + <tr> | ||
112 | + <td class=tdbranca > | ||
113 | + <!-- aqui será incluída a escala numérica --> | ||
114 | + <div id=escala style="text-align:right;" ></div> | ||
115 | + </td> | ||
116 | + <td class=tdbranca > | ||
117 | + <!-- aqui será incluído o gadget que mostra a coordenada geográfica da posição do mouse --> | ||
118 | + <div id=localizarxy style="text-align:left;font-size:10px;display:inline-table">Aguarde...</div> | ||
119 | + </td> | ||
120 | + <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> | ||
121 | + <td class=tdbranca ><div id=seletorIdiomas ></div></td> | ||
122 | + <!-- | ||
123 | + A opção de localização 'onde estou?' baseia-se na identificação do IP do usuário. Para | ||
124 | + que esta opção funcione corretamente, deve estar instalado no I3Geo o pacote geoIP. Veja no | ||
125 | + SVN do portal do software público o diretório arquivos_versões/pacotes para maiores informações | ||
126 | + --> | ||
127 | + <td class=tdbranca ><div id=ondeestou ></div></td> | ||
128 | + </tr> | ||
129 | + <!-- esta div recebe o cálculo do posicionamento do mouse em coordenadas UTM | ||
130 | + As coordenadas UTM apenas serão mostradas nessa div se o parâmetro | ||
131 | + i3GEO.gadgets.mostraCoordenadasUTM.idhtml for diferente de i3GEO.gadgets.mostraCoordenadasGEO.idhtml | ||
132 | + se os IDs forem iguais, o tipo de coordenada mostrada será intercalada, ora UTM ora GEO. | ||
133 | + <tr><td></td><td class="tdbranca"><div style="text-align:left;font-size:8px;background-color:white;display:none;" id=mostraUTM ></div></td><td></td></tr> | ||
134 | + --> | ||
135 | + </table> | ||
136 | + </td> | ||
137 | +</tr> | ||
138 | +<tr style="border:0px"><td colspan=3 id="barraInferior" style="background-image:url('../imagens/visual/default/rodape.png');height:10px"></td></tr> | ||
139 | +<!-- aqui são mostradas imagens obtidas do metadata mensagem que pode existir em cada layer --> | ||
140 | +<tr style="border:0px"><td colspan=3 style=background-color:black ><input style="border:0px none; background-color:black;color:white;font-size:12pt;" type="text" size="1" id="i3geo_letreiro" ></td></tr> | ||
141 | +<!-- esse elemento é preenchido automaticamente pelo i3Geo, conforme definido em ms_configura.php --> | ||
142 | +<tr style="border:0px"><td colspan=3 style=background-color:black;color:white id="emailInstituicao">@</td></tr> | ||
143 | + | ||
144 | +</table> | ||
145 | +<table id="i3GEOlogoMarcaX" style='margin: 0px auto;box-shadow:0 1px 13px gray;border-radius:5px;'> | ||
146 | + <tr> | ||
147 | + <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> | ||
148 | + </tr> | ||
149 | + <tr> | ||
150 | + <td style="padding:10px;"><img style="width:560px;height:81px" alt="" src='../imagens/logo_inicio.png' ></td> | ||
151 | + </tr> | ||
152 | + <tr> | ||
153 | + <td> | ||
154 | + <!-- | ||
155 | + <script id="ohloh" type="text/javascript" src="http://www.ohloh.net/p/150688/widgets/project_users.js?style=red"></script> | ||
156 | + --> | ||
157 | + </td> | ||
158 | + </tr> | ||
159 | +</table> | ||
160 | + | ||
161 | +<script src="../classesjs/i3geo47.js"></script> | ||
162 | +<script src="../pacotes/openlayers/OpenLayers211.js.php"></script> | ||
163 | +<script> | ||
164 | +//define qual guia iniciara aberta | ||
165 | +i3GEO.guias.ATUAL = "mapas"; | ||
166 | + | ||
167 | + | ||
168 | +i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | ||
169 | +i3GEO.configura.autotamanho = false; | ||
170 | +i3GEO.Interface.ATUAL = "openlayers"; | ||
171 | +i3GEO.Interface.IDCORPO = "contemImg"; | ||
172 | +//ativa ou desativa o balao de info ao clicar no mapa | ||
173 | +i3GEO.eventos.cliquePerm.ativo = true; | ||
174 | +// | ||
175 | +i3GEO.Interface.openlayers.GADGETS = { | ||
176 | + PanZoomBar:true, | ||
177 | + PanZoom:false, | ||
178 | + LayerSwitcher:true, | ||
179 | + ScaleLine:true, | ||
180 | + OverviewMap:false | ||
181 | + }; | ||
182 | +i3GEO.Interface.openlayers.TILES = true; | ||
183 | + | ||
184 | +// | ||
185 | +//desabilita o item que abre a interface "default" do menu suspenso | ||
186 | +// | ||
187 | +i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}'; | ||
188 | + | ||
189 | +/* | ||
190 | +Após a criação, é criado o objeto i3geoOL que corresponde ao objeto map da API do OpenLayers. | ||
191 | +Vc pode usar i3geoOL para aplicar os métodos e verificar as propriedades da API do OpenLayers | ||
192 | +*/ | ||
193 | +i3GEO.cria(); | ||
194 | +/* | ||
195 | + Inicializa o mapa | ||
196 | +*/ | ||
197 | +i3GEO.configura.mapaRefDisplay = "none"; | ||
198 | + | ||
199 | +i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; | ||
200 | +i3GEO.barraDeBotoes.OFFSET = -170; | ||
201 | + | ||
202 | +//i3GEO.barraDeBotoes.MAXBOTOES = 10; | ||
203 | +i3GEO.configura.oMenuData["submenus"]["janelas"] = []; | ||
204 | +i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.permiteLogin = true; | ||
205 | +//barra de botoes normal. descomente para usar | ||
206 | +/* | ||
207 | +i3GEO.barraDeBotoes.TIPO = "yui"; | ||
208 | +i3GEO.barraDeBotoes.AUTOALTURA = true; | ||
209 | +i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO = false; | ||
210 | +i3GEO.barraDeBotoes.PERMITEFECHAR = false; | ||
211 | +i3GEO.barraDeBotoes.PERMITEDESLOCAR = false; | ||
212 | +i3GEO.barraDeBotoes.AUTO = true; | ||
213 | +i3GEO.barraDeBotoes.COMPORTAMENTO = "laranja"; | ||
214 | + | ||
215 | +i3GEO.Interface.BARRABOTOESLEFT = 0; | ||
216 | +i3GEO.Interface.BARRABOTOESTOP = 2; | ||
217 | +i3GEO.Interface.BARRADEZOOMTOP = 10; | ||
218 | +i3GEO.Interface.BARRADEZOOMLEFT = 40; | ||
219 | +*/ | ||
220 | +i3GEO.idioma.IDSELETOR = "seletorIdiomas"; | ||
221 | +i3GEO.Interface.ATIVAMENUCONTEXTO = false; | ||
222 | +i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; | ||
223 | + | ||
224 | +i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true; | ||
225 | +i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true; | ||
226 | +i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; | ||
227 | +i3GEO.mapa.AUTORESIZE = true; | ||
228 | +// | ||
229 | +//esta é uma variável interna do OpenLayers que define o endereço do diretório onde estão as imagens usadas nos ícones | ||
230 | +// | ||
231 | +OpenLayers.ImgPath = "../pacotes/openlayers/img/"; | ||
232 | +// | ||
233 | +//adiciona camadas que podem ser ativadas como fundo do mapa | ||
234 | +// | ||
235 | +(function(){ | ||
236 | + var oce = new OpenLayers.Layer.ArcGIS93Rest( | ||
237 | + "ESRI Ocean Basemap", | ||
238 | + "http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export", | ||
239 | + {format:"jpg"}, | ||
240 | + {isBaseLayer:true,visibility:false} | ||
241 | + ); | ||
242 | + var ims = new OpenLayers.Layer.ArcGIS93Rest( | ||
243 | + "ESRI Imagery World 2D", | ||
244 | + "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export", | ||
245 | + {}, | ||
246 | + {isBaseLayer:true,visibility:false} | ||
247 | + ); | ||
248 | + var wsm = new OpenLayers.Layer.ArcGIS93Rest( | ||
249 | + "ESRI World Street Map", | ||
250 | + "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export", | ||
251 | + {}, | ||
252 | + {isBaseLayer:true,visibility:false} | ||
253 | + ); | ||
254 | + var bra = new OpenLayers.Layer.WMS( | ||
255 | + "Base carto MMA", | ||
256 | + "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map", | ||
257 | + {layers:"baseraster",srs:"EPSG:4618",format:"image/png",isBaseLayer:false}, | ||
258 | + {isBaseLayer:true,visibility:false} | ||
259 | + ); | ||
260 | + /* | ||
261 | + var osm = new OpenLayers.Layer.WMS( | ||
262 | + "Open Street Map", | ||
263 | + "http://full.wms.geofabrik.de/std/demo_key", | ||
264 | + {layers:""}, | ||
265 | + {isBaseLayer:true,visibility:false} | ||
266 | + ); | ||
267 | + */ | ||
268 | + i3GEO.Interface.openlayers.LAYERSADICIONAIS = [oce,ims,wsm,bra]; | ||
269 | +})(); | ||
270 | +// | ||
271 | +//define a funcao que sera executada ao clicar no mapa | ||
272 | +//default (balao do tipo etiqueta) | ||
273 | +i3GEO.eventos.MOUSECLIQUEPERM = [i3GEO.configura.funcaoTip]; | ||
274 | +//alternativo (janela de identificacao | ||
275 | +//i3GEO.eventos.MOUSECLIQUEPERM = [i3GEO.configura.funcaoIdentifica]; | ||
276 | +// | ||
277 | + | ||
278 | +// | ||
279 | +//substitui a janela de alerta normal do navegador por uma janela estilizada. Pode ser comentado sem problemas. No Safari apresentou problemas. | ||
280 | +// | ||
281 | +//i3GEO.janela.ativaAlerta(); | ||
282 | +// | ||
283 | +//inicia o mapa | ||
284 | +// | ||
285 | +i3GEO.inicia(); | ||
286 | +</script> | ||
287 | +</body> | ||
288 | +</html> |
exemplos/index.html
@@ -92,6 +92,10 @@ body,td { | @@ -92,6 +92,10 @@ body,td { | ||
92 | <a href="guias2.htm" target="_blank">Guias do tipo sanfona</a> | 92 | <a href="guias2.htm" target="_blank">Guias do tipo sanfona</a> |
93 | </p> | 93 | </p> |
94 | <p> | 94 | <p> |
95 | + <span style="font-weight: bold;"></span><a href="guias4.htm" | ||
96 | + target="_blank">Inicia com uma guia específica</a> | ||
97 | + </p> | ||
98 | + <p> | ||
95 | <a href="fotos1.htm" target="_blank">Guias do tipo sanfona com | 99 | <a href="fotos1.htm" target="_blank">Guias do tipo sanfona com |
96 | fotos</a> | 100 | fotos</a> |
97 | </p> | 101 | </p> |