From 9a4188ebe81583d9a32246b3fb3f1ad3df5829d9 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Thu, 14 Oct 2010 14:53:33 +0000 Subject: [PATCH] Opção para desativar a legenda de um tema. Correções para o funcionamento no IE. Novo esquema para mostrar help sobre os botões da barra de ferramentas --- aplicmap/geral1.map | 2 +- aplicmap/geral1windows.map | 2 +- aplicmap/googlemaps.phtml | 11 +++++------ classesjs/classe_arvoredecamadas.js | 12 +++++++++--- classesjs/classe_arvoredetemas.js | 2 +- classesjs/classe_barradebotoes.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- classesjs/classe_calculo.js | 6 +++--- classesjs/classe_configura.js | 1 - classesjs/classe_interface.js | 23 +++++++++++++---------- classesjs/classe_janela.js | 39 +++++++++++++++++++++++++++++++-------- classesjs/classe_mapa.js | 40 +++++++++++++++++++++------------------- classesjs/classe_maparef.js | 8 ++++++-- classesjs/classe_php.js | 16 +++++++++++++--- classesjs/classe_tema.js | 22 ++++++++++++++++++++++ classesjs/classe_util.js | 26 +++++++++++++------------- classesjs/dicionario.js | 33 +++++++++++++++++++++++++++------ classesphp/classe_legenda.php | 23 ++++++++++++++++------- classesphp/classe_mapa.php | 3 ++- classesphp/classe_selecao.php | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- classesphp/classe_shp.php | 2 +- classesphp/classe_temas.php | 21 +++++++++++++++++++++ classesphp/classe_toponimia.php | 1 + classesphp/funcoes_gerais.php | 46 ++++++++++++++++++++++++++++++++++++++++++++-- classesphp/mapa_controle.php | 47 +++++++++++++++++++++++++++++++++++++++++++---- classesphp/mapa_inicia.php | 4 ++++ css/botoes.css | 16 ++++++++-------- ferramentas/3d/3d.php | 2 ++ ferramentas/colorpicker/index.htm | 34 ++++++++++------------------------ ferramentas/confluence/index.js.php | 8 ++++---- ferramentas/epsg.txt | 2 ++ ferramentas/etiqueta/index.js.php | 4 ++-- ferramentas/gradecoord/index.js.php | 4 ++-- ferramentas/graficotema/index.js.php | 4 ++-- ferramentas/identifica/index.js.php | 17 +++++++++++------ ferramentas/imprimir/a4lpaisagempdf.php | 22 +++++++++++++++++++++- ferramentas/imprimir/aggpng.php | 18 +++++++++++++++++- ferramentas/imprimir/geotif.php | 17 ++++++++++++++++- ferramentas/imprimir/index.js.php | 18 +++++++++--------- ferramentas/imprimir/svg.php | 15 +++++++++++++++ ferramentas/imprimir/swf.php | 15 +++++++++++++++ ferramentas/inseretxt/index.js.php | 8 +++++++- ferramentas/inserexy2/index.js.php | 30 +++++++++++++++++++++--------- ferramentas/legenda/index.js.php | 3 +-- ferramentas/metar/index.js.php | 4 ++-- ferramentas/opcoes_escala/index.js.php | 6 +++--- ferramentas/opcoes_fundo/exemplo.htm | 2 +- ferramentas/opcoes_fundo/index.js.php | 2 +- ferramentas/opcoes_legenda/index.js.php | 8 ++++---- ferramentas/opcoes_tamanho/index.js.php | 4 ++-- ferramentas/selecao/index.js.php | 2 +- ferramentas/tabela/index.js.php | 8 ++++---- ferramentas/tipoimagem/index.js.php | 4 ++-- ferramentas/upload/index.js.php | 12 ++++++++++-- ferramentas/upload/upload.php | 3 ++- ferramentas/uploaddbf/index.js.php | 2 +- ferramentas/uploadgpx/index.js.php | 2 +- ferramentas/wiki/index.js.php | 8 ++++---- imagens/visual/default/left.png | Bin 0 -> 256 bytes mashups/index.html | 6 +++--- menutemas/admin.db | Bin 66560 -> 0 bytes temas/biomashp.map | 1 + 61 files changed, 650 insertions(+), 203 deletions(-) create mode 100644 imagens/visual/default/left.png diff --git a/aplicmap/geral1.map b/aplicmap/geral1.map index a91f0a3..fdc7ec5 100644 --- a/aplicmap/geral1.map +++ b/aplicmap/geral1.map @@ -120,7 +120,7 @@ MAP EXTENT -75.5728 -37.4751 -30.525 7.57273#-79.8713331401 -41.7736536401 -26.2264448599 11.8712346401 #edite o caminho se a aplicacao for movida de lugar IMAGE "/opt/www/html/i3geo/imagens/referencia1.png" - OUTLINECOLOR 120 220 220 + OUTLINECOLOR -1 -1 -1 SIZE 150 150 STATUS off MARKER "ref" diff --git a/aplicmap/geral1windows.map b/aplicmap/geral1windows.map index a644c2f..0fb692a 100644 --- a/aplicmap/geral1windows.map +++ b/aplicmap/geral1windows.map @@ -114,7 +114,7 @@ MAP EXTENT -75.5728 -37.4751 -30.525 7.57273#-79.8713331401 -41.7736536401 -26.2264448599 11.8712346401 #edite o caminho se a aplicacao for movida de lugar IMAGE "c:/ms4w/apache/htdocs/i3geo/imagens/referencia1.png" - OUTLINECOLOR 120 220 220 + OUTLINECOLOR -1 -1 -1 SIZE 150 150 STATUS off MARKER "ref" diff --git a/aplicmap/googlemaps.phtml b/aplicmap/googlemaps.phtml index 4c3192f..bbc82d5 100644 --- a/aplicmap/googlemaps.phtml +++ b/aplicmap/googlemaps.phtml @@ -69,22 +69,21 @@ include_once("../ms_configura.php"); -
+
- + diff --git a/classesjs/classe_arvoredecamadas.js b/classesjs/classe_arvoredecamadas.js index bb113eb..fb5599c 100644 --- a/classesjs/classe_arvoredecamadas.js +++ b/classesjs/classe_arvoredecamadas.js @@ -702,7 +702,7 @@ i3GEO.arvoreDeCamadas = { } if(i3GEO.arvoreDeCamadas.OPCOESTEMAS === true){ conteudo = $trad("t18a"); - d = {html:conteudo,idopcoes:ltema.name}; + d = {html:conteudo,idopcoes:ltema.name,identifica:ltema.identifica}; opcoesNode = new YAHOO.widget.HTMLNode(d, node, false,true); opcoesNode.enableHighlight = false; opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes, 1); @@ -728,7 +728,7 @@ i3GEO.arvoreDeCamadas = { mostraOpcoes: function(node){ if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeCamadas.mostraOpcoes()");} //YAHOO.log("Mostrando as opções da árvore de camadas", "i3geo"); - var idtema,ltema,tnome,d,n; + var idtema,ltema,tnome,d,n,temp; idtema = node.data.idopcoes; ltema = i3GEO.arvoreDeCamadas.pegaTema(idtema); if(navm) @@ -752,13 +752,19 @@ i3GEO.arvoreDeCamadas = { if(i3GEO.Interface.ATUAL !== "flamingo") {i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node);} i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node); - i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node); + if(ltema.identifica == "sim" || ltema.identifica == "SIM" || ltema.identifica == "") + {i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node);} i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node); i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node); if(i3GEO.parametros.versaoms > 4){ i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node); } } + temp = $trad("p18"); + if(ltema.classe.toLowerCase() == "nao") + {temp = $trad("p17");} + i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("p19"),temp,'i3GEO.tema.invertestatuslegenda(\"'+ltema.name+'\")',node); + if (ltema.type < 4){ i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node); } diff --git a/classesjs/classe_arvoredetemas.js b/classesjs/classe_arvoredetemas.js index abd694f..cb41b8e 100644 --- a/classesjs/classe_arvoredetemas.js +++ b/classesjs/classe_arvoredetemas.js @@ -710,7 +710,7 @@ i3GEO.arvoreDeTemas = { if(navm){insp += "style='top:0px;'";} else {insp += "style='top:4px;'";} - insp += " title='"+$trad("a1")+"' src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' style='cursor:pointer;top:2px;position:relative;' />"; + insp += " src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' />"; insp += "
+ -
-
+
- -
+
 "; tempNode = new YAHOO.widget.HTMLNode( {html:insp}, diff --git a/classesjs/classe_barradebotoes.js b/classesjs/classe_barradebotoes.js index c6b71cb..72b5819 100644 --- a/classesjs/classe_barradebotoes.js +++ b/classesjs/classe_barradebotoes.js @@ -41,6 +41,18 @@ Veja também classe_interface.js (i3GEO.Interface) que possuí parâmetros que perm */ i3GEO.barraDeBotoes = { /* + Propriedade: AJUDA + + Mostra um texto de ajuda colado à barra de botões + + Tipo: + {boolean} + + Default: + {true} + */ + AJUDA: true, + /* Propriedade: SOICONES Esconde as bordas das barras e o fundo, mostrando apenas os ícones @@ -428,8 +440,8 @@ i3GEO.barraDeBotoes = { if(l[b].conteudo) {eval('$i(l[b].iddiv).innerHTML = "'+l[b].conteudo+'"');} if(l[b].dica){ - eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.ajuda.mostraJanela("'+l[b].dica+'","");}'); - eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.ajuda.mostraJanela("");};'); + eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'","");}'); + eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.barraDeBotoes.mostraJanela(this,"");};'); } if(l[b].funcaoonclick){ $i(l[b].iddiv).onclick = l[b].funcaoonclick; @@ -849,6 +861,40 @@ i3GEO.barraDeBotoes = { $i(id+"_c").style.visibility = "hidden"; } } + }, + mostraJanela: function(objeto,mensagem){ + var divmensagem = $i("divMensagemBarraDeBotoes"), + pos = YAHOO.util.Dom.getXY(objeto); + if(i3GEO.barraDeBotoes.AJUDA == false || $i("janelaMenTexto")){ + i3GEO.ajuda.mostraJanela(mensagem); + i3GEO.barraDeBotoes.escondeJanelaAjuda(); + return; + } + if(!divmensagem){ + divmensagem = document.createElement("div"); + divmensagem.id = "divMensagemBarraDeBotoes"; + divmensagem.style.border = "0px solid rgb(120 120 120)"; + divmensagem.style.position = "absolute"; + if($i("i3geo")) + {$i("i3geo").appendChild(divmensagem);} + else + {document.body.appendChild(divmensagem);} + divmensagem.innerHTML = "
parar
"; + } + if(mensagem != ""){ + divmensagem.style.left = parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px"; + divmensagem.style.top = pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10) / 2)+"px"; + $i("divMensagemBarraDeBotoesCorpo").innerHTML = mensagem; + divmensagem.style.display="block"; + try{clearTimeout(timeAjudaBotoes);}catch(e){} + timeAjudaBotoes = setTimeout("i3GEO.barraDeBotoes.escondeJanelaAjuda()",3000); + } + }, + escondeJanelaAjuda:function(){ + var i = $i("divMensagemBarraDeBotoes"); + if(i) + {i.style.display="none";} + clearTimeout(timeAjudaBotoes); } }; //YAHOO.log("carregou classe barradebotoes", "Classes i3geo"); \ No newline at end of file diff --git a/classesjs/classe_calculo.js b/classesjs/classe_calculo.js index 192ab34..d552849 100644 --- a/classesjs/classe_calculo.js +++ b/classesjs/classe_calculo.js @@ -113,11 +113,10 @@ i3GEO.calculo = { dd2tela: function (vx,vy,docmapa,ext,cellsize){ try{ var pos,latlng,xyn,dc,imgext,c,xy; - if(i3GEO.Interface.ATUAL == "googlemaps"){ + if(i3GEO.Interface.ATUAL == "googlemaps" && docmapa.id != "mapaReferencia"){ pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); xyn = i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx)); xy = []; - console.info(xyn.x); return [(xyn.x)+pos[0],(xyn.y)+pos[1]]; } if(i3GEO.Interface.ATUAL == "openlayers" && docmapa.id != "mapaReferencia"){ @@ -590,7 +589,8 @@ i3GEO.calculo = { xyMax = i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel); w = xyMax[0]-xyMin[0]; h = xyMin[1]-xyMax[1]; - tl = i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel); + tl = i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel); + pos = i3GEO.util.pegaPosicaoObjeto(documento); t = tl[1] - pos[1]; l = tl[0] - pos[0]; diff --git a/classesjs/classe_configura.js b/classesjs/classe_configura.js index 9ddb265..0f1baf4 100644 --- a/classesjs/classe_configura.js +++ b/classesjs/classe_configura.js @@ -471,7 +471,6 @@ i3GEO.configura = { { text: "p8", url: "javascript:i3GEO.mapa.dialogo.queryMap()"}, { text: "p9", url: "javascript:i3GEO.mapa.dialogo.corFundo()"}, { text: "p10", url: "javascript:i3GEO.mapa.dialogo.gradeCoord()"}, - { text: "p11", url: "javascript:i3GEO.mapa.dialogo.template()"}, { text: "p12", url: "javascript:i3GEO.mapa.dialogo.autoredesenha()"} ] }, diff --git a/classesjs/classe_interface.js b/classesjs/classe_interface.js index 71d50cf..25fd3a3 100644 --- a/classesjs/classe_interface.js +++ b/classesjs/classe_interface.js @@ -10,7 +10,7 @@ Licenca: GPL2 -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br @@ -781,8 +781,8 @@ i3GEO.Interface = { } } catch(e){} - if(i3geoOL.getLayersByName("Fundo").length == 0 && fundoIsBase === true){ - layer = new OpenLayers.Layer.WMS( "Fundo", urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio: 1,singleTile:true,isBaseLayer:true, opacity: 1,visibility:true}); + if(i3geoOL.getLayersByName("Nenhum").length == 0 && fundoIsBase === true){ + layer = new OpenLayers.Layer.WMS( "Nenhum", urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio: 1,singleTile:true,isBaseLayer:true, opacity: 1,visibility:true}); i3geoOL.addLayer(layer); } opcoes = { @@ -909,7 +909,7 @@ i3GEO.Interface = { }, ligaDesliga:function(obj){ var layers = i3geoOL.getLayersByName(obj.value), - temp = function(){}, + temp = function(){i3GEO.mapa.legendaHTML.atualiza();}, desligar = "", ligar = ""; if(layers.length > 0){ @@ -1159,7 +1159,10 @@ i3GEO.Interface = { ret = pol.split(" "); function montaMapa(retorno){ var pos, sw,ne,z,myMapType; - i3GeoMap = new google.maps.Map($i(i3GEO.Interface.IDMAPA),{scaleControl:true}); + try{ + i3GeoMap = new google.maps.Map($i(i3GEO.Interface.IDMAPA),{scaleControl:true}); + } + catch(e){alert(e);return;} // //carrega o javascript que permite fazer o zoom por box // @@ -1184,6 +1187,7 @@ i3GEO.Interface = { i3GEO.gadgets.mostraCoordenadasUTM(); i3GEO.gadgets.mostraEscalaNumerica(); i3GEO.gadgets.mostraMenuSuspenso(); + i3GEO.idioma.mostraSeletor(); g_operacao = ""; g_tipoacao = ""; if(i3GEO.parametros.kmlurl !== "") @@ -1242,7 +1246,7 @@ i3GEO.Interface = { google.maps.event.addListener(i3GeoMap, "tilesloaded", function() { i3GEO.Interface.googlemaps.recalcPar(); }); - google.maps.event.addListener(i3GeoMap, "zoom_changed", function() { + google.maps.event.addListener(i3GeoMap, "bounds_changed", function() { i3GEO.Interface.googlemaps.recalcPar(); g_operacao = ""; g_tipoacao = ""; @@ -1329,7 +1333,7 @@ i3GEO.Interface = { }, ligaDesliga:function(obj){ var indice = i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value), - temp = function(){}, + temp = function(){i3GEO.mapa.legendaHTML.atualiza();}, desligar = "", ligar = ""; //alert(indice+" "+obj.value) @@ -1382,11 +1386,10 @@ i3GEO.Interface = { escalaAtual = i3GEO.parametros.mapscale; g_operacao = ""; g_tipoacao = ""; - sw = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,i3GEO.parametros.h)); - ne = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(i3GEO.parametros.w,0)); + sw = i3GeoMap.getBounds().getSouthWest(); + ne = i3GeoMap.getBounds().getNorthEast(); i3GEO.parametros.mapexten = sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat(); i3GEO.parametros.mapscale = i3GEO.Interface.googlemaps.calcescala(); - //alert(i3GEO.parametros.mapscale) sw = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1)); ne = i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0)); i3GEO.parametros.pixelsize = sw.lng() - ne.lng(); diff --git a/classesjs/classe_janela.js b/classesjs/classe_janela.js index 3a90e26..ee817f0 100644 --- a/classesjs/classe_janela.js +++ b/classesjs/classe_janela.js @@ -42,6 +42,18 @@ As janelas são criadas por meio da biblioteca YUI */ i3GEO.janela = { /* + Propriedade: ESTILOABD + + Estilo que será aplicado ao elemento body da janela (class='bd') + + Tipo: + {String} + + Default: + {display:block;padding:5px 0 5px 0} + */ + ESTILOBD: "display:block;padding:5px 0 5px 0", + /* Propriedade: ESTILOAGUARDE Estilo da janela de aguarde @@ -211,7 +223,7 @@ i3GEO.janela = { ins += texto; if(funcaoMinimiza) {ins += "
";} - ins += '
'; + ins += '
'; if(wsrc !== "") {ins += '';} ins += '
'; @@ -235,10 +247,15 @@ i3GEO.janela = { else{ if(waltura !== "auto") {$i(id+'_corpo').style.height=parseInt(waltura,10);} + $i(id+'_corpo').style.width=parseInt(wlargura,10); + if(navm) + {$i(id+'_corpo').style.width=parseInt(wlargura,10)-2;} + /* if(navn) {$i(id+'_corpo').style.width=parseInt(wlargura,10)-10;} else {$i(id+'_corpo').style.width=parseInt(wlargura,10)-2;} + */ } fix = false; if(nx === "" || nx === "center") @@ -415,8 +432,8 @@ i3GEO.janela = { {document.body.removeChild($i(id+"_c"));} YAHOO.namespace("aguarde."+id); pos = [0,0]; - if($i("corpoMapa")) - {pos = YAHOO.util.Dom.getXY($i("corpoMapa"));} + if($i(i3GEO.Interface.IDCORPO)) + {pos = YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));} else if ($i("contemImg")) {pos = YAHOO.util.Dom.getXY($i("contemImg"));} texto += "
bloquear/desbloquear"; @@ -441,7 +458,7 @@ i3GEO.janela = { {$i(id+"_mask").style.zIndex=5000;} if($i(id+"_c")){ $i(id+"_c").style.zIndex=6000; - $i(id+"_c").style.backgroundColor = "white"; + $i(id+"_c").style.backgroundColor = ""; } //YAHOO.log("Fim abreAguarde", "janela"); @@ -697,7 +714,10 @@ try{ nBodyBottomPadding = parseInt(Dom.getStyle(oBody, "paddingBottom"), 10); nBodyOffset = nBodyBorderTopWidth + nBodyBorderBottomWidth + nBodyTopPadding + nBodyBottomPadding; } - me.cfg.setProperty("width", nStartWidth + "px"); + // + //ajusta o tamanho do body no IE qd a janela é redimensionada + // + me.cfg.setProperty("width", nStartWidth + "px"); aStartPos = [Event.getPageX(e), Event.getPageY(e)]; }; this.ddResize.onDrag = function(e){ @@ -706,9 +726,11 @@ try{ nOffsetY = aNewPos[1] - aStartPos[1], nNewWidth = Math.max(nStartWidth + nOffsetX, 10), nNewHeight = Math.max(nStartHeight + nOffsetY, 10), - nBodyHeight = (nNewHeight - (oFooter.offsetHeight + oHeader.offsetHeight + nBodyOffset)); - me.cfg.setProperty("width", nNewWidth + "px"); - oBody.style.width = nNewWidth - nBodyOffset+"px"; + nBodyHeight = (nNewHeight - (oFooter.offsetHeight + oHeader.offsetHeight + nBodyOffset)); + me.cfg.setProperty("width", nNewWidth + "px"); + if(navm) + {nNewWidth = nNewWidth - 2;} + oBody.style.width = nNewWidth+"px"; if (nBodyHeight < 0) {nBodyHeight = 0;} oBody.style.height = nBodyHeight + "px"; @@ -717,6 +739,7 @@ try{ $i("wdocai").style.width = oBody.style.width; } }; + this.ddResize.onMouseUp = this.ddResize.onDrag.call(); } function onBeforeShow(){ initResizeFunctionality.call(this); diff --git a/classesjs/classe_mapa.js b/classesjs/classe_mapa.js index 6ddd85e..e10b4cc 100644 --- a/classesjs/classe_mapa.js +++ b/classesjs/classe_mapa.js @@ -256,7 +256,7 @@ i3GEO.mapa = { /* Function: atualiza - Atualiza a legenda do mapa que são utilizados para mostrar a legenda + Atualiza o elemento HTML do mapa utilizado para mostrar a legenda */ atualiza: function(){ if(typeof(console) !== 'undefined'){console.info("i3GEO.mapa.legendaHTML.atualiza()");} @@ -648,24 +648,27 @@ i3GEO.mapa = { nds = ds.length; for(s=0;s
";} - if(valor !== "" && link !== "") - {ins += "" + alias + " : " + valor + "
";} - if(img !== "") - {ins += img+"
";} - ins += ""; - mostra = true; - } - else{ - ins += "" + valor + "
"; - mostra = true; + try{ + eval("var alias = ds[s]."+tips[r]+".alias"); + eval("var valor = ds[s]."+tips[r]+".valor"); + eval("var link = ds[s]."+tips[r]+".link"); + eval("var img = ds[s]."+tips[r]+".img"); + if (i3GEO.configura.tipotip === "completo" || i3GEO.configura.tipotip === "balao"){ + if(valor !== "" && link === "") + {ins += "" + alias + " :" + valor + "
";} + if(valor !== "" && link !== "") + {ins += "" + alias + " : " + valor + "
";} + if(img !== "") + {ins += img+"
";} + ins += ""; + mostra = true; + } + else{ + ins += "" + valor + "
"; + mostra = true; + } } + catch(e){} } } } @@ -688,7 +691,6 @@ i3GEO.mapa = { } else{ if(i3GEO.Interface.ATUAL === "googleearth"){ - //res = '
'+res+'
'; i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy); } else{ diff --git a/classesjs/classe_maparef.js b/classesjs/classe_maparef.js index e073a5b..50319e3 100644 --- a/classesjs/classe_maparef.js +++ b/classesjs/classe_maparef.js @@ -11,7 +11,7 @@ Licenca: GPL2 -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br @@ -212,6 +212,8 @@ i3GEO.maparef = { $i("i3geo_winRef").style.border = "1px solid gray"; moveX = pos[0] + i3GEO.parametros.w + 153 - i3GEO.maparef.RIGHT - 300; moveY = pos[1] + i3GEO.maparef.TOP; + if(i3GEO.Interface.ATUAL == "googlemaps") + {moveY += 30;} YAHOO.janelaRef.xp.panel.moveTo(moveX,moveY); escondeRef = function(){ YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close, "click"); @@ -226,7 +228,6 @@ i3GEO.maparef = { {YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove", atualizaLocalizarxy);} } } - //YAHOO.log("Fim initJanelaRef", "i3geo"); if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()") < 0) {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()");} this.atualiza(true); @@ -353,6 +354,9 @@ i3GEO.maparef = { if (navm){novoel.style.filter='alpha(opacity=40)';} else{novoel.style.opacity= 0.4;} $i("mapaReferencia").appendChild(novoel); + // + //aplica os eventos de movimentação sobre o box azul + // boxrefdd = new YAHOO.util.DD("boxref"); // //atualiza o mapa principal quando o box é modificado manualmente diff --git a/classesjs/classe_php.js b/classesjs/classe_php.js index b6dfb4b..59da9cb 100644 --- a/classesjs/classe_php.js +++ b/classesjs/classe_php.js @@ -394,7 +394,7 @@ i3GEO.php = { */ identificaunico: function(funcao,xy,tema,item){ i3GEO.php.verifica(); - var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid; + var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten; cpJSON.call(p,"identificaunico",funcao); }, /* @@ -563,7 +563,7 @@ i3GEO.php = { aplicaResolucao: function(funcao,resolucao){ i3GEO.php.verifica(); var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten; - cpJSON.call(p,"crialente",funcao); + cpJSON.call(p,"crialente",funcao); }, /* Function: geradestaque @@ -716,6 +716,16 @@ i3GEO.php = { cpJSON.call(p,"limpasel",funcao); }, /* + Function: invertestatuslegenda + + + */ + invertestatuslegenda: function(funcao,tema){ + i3GEO.php.verifica(); + var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid; + cpJSON.call(p,"invertestatuslegenda",funcao); + }, + /* Function: mudatransp @@ -724,7 +734,7 @@ i3GEO.php = { i3GEO.php.verifica(); var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid; cpJSON.call(p,"mudatransp",funcao); - }, + }, /* Function: mudanome diff --git a/classesjs/classe_tema.js b/classesjs/classe_tema.js index f9d8d1f..2f2810d 100644 --- a/classesjs/classe_tema.js +++ b/classesjs/classe_tema.js @@ -236,6 +236,28 @@ i3GEO.tema = { {alert("Valor não definido.");} }, /* + Function: invertestatuslegenda + + Inverte o status atual do metadata CLASSE, permitindo esconder ou mostrar a legenda do tema + + Parametros: + + idtema - código do tema + */ + invertestatuslegenda: function(idtema){ + if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.invertestatuslegenda()");} + alert("Essa opção afeta apenas a impressão do mapa"); + i3GEO.mapa.ativaTema(idtema); + g_operacao = "transparencia"; + var temp = function(retorno){ + i3GEO.atualiza(retorno); + i3GEO.arvoreDeCamadas.atualiza(); + }; + i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1")); + i3GEO.contadorAtualiza++; + i3GEO.php.invertestatuslegenda(temp,idtema); + }, + /* Function: mudanome Muda o nome de um tema diff --git a/classesjs/classe_util.js b/classesjs/classe_util.js index 4421850..b8dc132 100644 --- a/classesjs/classe_util.js +++ b/classesjs/classe_util.js @@ -897,16 +897,15 @@ i3GEO.util = { novoel, wdocaiframe, fix = false, - wlargura = "400", - waltura = "240", + wlargura = "300", + waltura = "250", wsrc = i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento+"&tipo="+tipo, nx = "", ny = "", texto = "Cor", id = "i3geo_janelaCor", modal = true, - classe = "hd", - wlargura_ = "400px"; + classe = "hd" YAHOO.namespace("janelaCor.xp"); if ($i(id)) {YAHOO.janelaCor.xp.panel.destroy();} @@ -915,7 +914,7 @@ i3GEO.util = { ins += texto; ins += '
'; if(wsrc !== "") - {ins += '';} + {ins += '';} ins += '
'; novoel = document.createElement("div"); novoel.id = "i3geo_janelaCor"; @@ -928,14 +927,14 @@ i3GEO.util = { wdocaiframe = $i("i3geo_janelaCori"); if (wdocaiframe) { - temp = wdocaiframe.style; - temp.width = parseInt(wlargura,10)-12; - temp.height=waltura; wdocaiframe.style.display = "block"; wdocaiframe.src = wsrc; + wdocaiframe.style.height = "250px"; + wdocaiframe.style.width = "325px"; + wdocaiframe.style.border = "0px solid white"; } if(nx === "" || nx === "center"){fix = true;} - YAHOO.janelaCor.xp.panel = new YAHOO.widget.ResizePanel(id, { zIndex:5000, modal:modal, width: wlargura_, fixedcenter: fix, constraintoviewport: false, visible: true, iframe:false} ); + YAHOO.janelaCor.xp.panel = new YAHOO.widget.ResizePanel(id, { height:"300px",zIndex:5000, modal:modal, width: "350px", fixedcenter: fix, constraintoviewport: false, visible: true, iframe:false} ); YAHOO.janelaCor.xp.panel.render(); $i(id+'_cabecalho').className = classe; }, @@ -1834,13 +1833,14 @@ i3GEO.util = { var ins = new Array(), i,n,temp; if (retorno.data !== undefined){ - ins.push(""); - ins.push(""); + ins.push(""); ins.push(""); + ins.push(""); + ins.push(""); n = retorno.data.length; - for (i=1;i"); + for (i=2;i"); ins.push(""); } ins.push("
"+retorno.data[0].nome+"
"+retorno.data[1].nome+"
"+retorno.data[i].nome+"
"); diff --git a/classesjs/dicionario.js b/classesjs/dicionario.js index 33812fd..63017ff 100644 --- a/classesjs/dicionario.js +++ b/classesjs/dicionario.js @@ -2,7 +2,7 @@ g_traducao = { //texto da janela de mensagens "p1": [ { -pt:"O I3Geo é software livre! Para download clique aqui. Qrcode mobile", +pt:"O i3Geo é software livre! Para download clique aqui. Qrcode mobile", en:"I3geo is a open source software! Click to download.", es:"I3Geo es software libre. Download", it:"I3geo è un software libero! clicca qui per il download." @@ -113,6 +113,27 @@ en:"Base layers", es:"Base layers", it:"Base layers" }], +"p17": [ +{ +pt: "Imprime legenda", +en:"Enable legend", +es:"Activar Subtitulo", +it:"Attiva legenda" +}], +"p18": [ +{ +pt: "Não imprime a legenda", +en:"Disable legend", +es:"Desactivar Subtitulo", +it:"Disattiva legenda" +}], +"p19": [ +{ +pt: "Ativa ou desativa a legenda de um tema na opção de impressão do mapa", +en:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa", +es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa", +it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa" +}], //itens do menu suspenso "s1": [ { @@ -921,14 +942,14 @@ it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per indiv }], "d2":[ { -pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangˆncia geográfica da inicialização.", +pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangência geográfica da inicialização.", en:"Change the scale of the map adjusting it to show the same initial geographical cover.", es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial", it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione" }], "d3":[ { -pt:"Amplia o mapa - coloca o ponto clicado no centro da tela ou amplia a região indicada por um retângulo.Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.", +pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a região indicada por um retângulo. Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.", en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.", es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía la región indicada por un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada", it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell’area di zoom desiderata." @@ -956,7 +977,7 @@ it:"Riduci la mappa tenendo come referimento il centro corrente" }], "d7":[ { -pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mesmo.", +pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mapa.", en:"Displays information about a point on the map. Once activated, click on it.", es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mismo.", it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso." @@ -1068,9 +1089,9 @@ it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza }], "d21a":[ { -pt:"Mede a área de um polígono desenhado na tela. O cálculo de ária é aproximado e sua precisão depende da escala do mapa.", +pt:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.", en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.", -es:"Mede a área de um polígono desenhado na tela. O cálculo de ária é aproximado e sua precisão depende da escala do mapa.", +es:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.", it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa." }], "d22":[ diff --git a/classesphp/classe_legenda.php b/classesphp/classe_legenda.php index 9a936be..e67e681 100644 --- a/classesphp/classe_legenda.php +++ b/classesphp/classe_legenda.php @@ -109,16 +109,19 @@ $tema - nome do tema $template - nome do template para processar a legenda */ - function __construct($map_file,$locaplic="",$tema="",$template="") + function __construct($map_file="",$locaplic="",$tema="",$template="") { //error_reporting(E_ALL); if(file_exists($locaplic."/funcoes_gerais.php")) include_once($locaplic."/funcoes_gerais.php"); else include_once("funcoes_gerais.php"); - $this->mapa = ms_newMapObj($map_file); + $this->localaplicacao = $locaplic; + if($map_file == "") + {return;} + $this->mapa = ms_newMapObj($map_file); $this->arquivo = $map_file; - $this->localaplicacao = $locaplic; + if($tema != "" && @$this->mapa->getlayerbyname($tema)) { $this->layer = $this->mapa->getlayerbyname($tema); @@ -445,6 +448,7 @@ Para cada tipo de simbologia deve haver um arquivo .map com as definições básica Todos os símbolos do arquivo symbols/simbolos serão retornados como imagens. parameters: + $tipo - Tipo de representação do símbolo, 0 pontos, 1 linhas e 2 polígonos. $dir_tmp - Diretório temporário do mapserver. @@ -461,10 +465,15 @@ String no formato HTML com as imagens dos símbolos */ function listaSimbolos($tipo,$dir_tmp,$imgdir,$onclick,$tamanho=8,$width=1) { + //error_reporting(E_ALL); if ($tipo == 3){$tipo = 2;} //tipo raster - if (!file_exists($dir_tmp."/".$imgdir."/simbolos".$tipo.".inc")) + if($imgdir == "") + {$dir = $dir_tmp;} + else + {$dir = $dir_tmp."/".$imgdir;} + if (!file_exists($dir."/simbolos".$tipo.".inc")) { - $f = fopen($dir_tmp."/".$imgdir."/simbolos".$tipo.".inc","w"); + $f = fopen($dir."/simbolos".$tipo.".inc","w"); if ($tipo == 2){$t="simpol.map";} if ($tipo == 0){$t="simpt.map";} if ($tipo == 1){ @@ -499,13 +508,13 @@ String no formato HTML com as imagens dos símbolos } fwrite($f,""); fclose($f); - copy ($dir_tmp."/".$imgdir."/simbolos".$tipo.".inc",$dir_tmp."/comum/simbolos".$tipo.".inc"); + //copy ($dir."/simbolos".$tipo.".inc",$dir_tmp."/comum/simbolos".$tipo.".inc"); return $ins; } else { $res = ""; - include_once $dir_tmp."/comum/simbolos".$tipo.".inc"; + include_once $dir."/simbolos".$tipo.".inc"; return $res; } } diff --git a/classesphp/classe_mapa.php b/classesphp/classe_mapa.php index 8c2243a..6bf318c 100644 --- a/classesphp/classe_mapa.php +++ b/classesphp/classe_mapa.php @@ -249,7 +249,8 @@ string - javascript com os parametros "editorsql"=>$editorsql, "linhadotempo"=>$ltempo, "escondido"=>strtolower($escondido), - "iconetema"=>($oLayer->getmetadata("iconetema")) + "iconetema"=>($oLayer->getmetadata("iconetema")), + "classe"=>($oLayer->getmetadata("classe")) ); } } diff --git a/classesphp/classe_selecao.php b/classesphp/classe_selecao.php index aa07295..4e8a8b7 100644 --- a/classesphp/classe_selecao.php +++ b/classesphp/classe_selecao.php @@ -86,7 +86,11 @@ $ext - extensão geográfica do mapa { //error_reporting(E_ALL); $this->qyfile = str_replace(".map",".qy",$map_file); - $this->mapa = ms_newMapObj($map_file); + if($tema != "") + {$this->qyfileTema = dirname($map_file)."/".$tema.".php";} + else + {$this->qyfileTema = "";} + $this->mapa = ms_newMapObj($map_file); $this->arquivo = $map_file; if($tema != "" && @$this->mapa->getlayerbyname($tema)) $this->layer = $this->mapa->getlayerbyname($tema); @@ -139,6 +143,7 @@ $ys - lista de coordenadas y separadas por virgula {$this->mapa->loadquery($this->qyfile);} $indxlayer = $this->layer->index; $res_count = $this->layer->getNumresults(); + /* $shp_atual = array(); for ($i = 0; $i < $res_count;++$i) { @@ -146,6 +151,11 @@ $ys - lista de coordenadas y separadas por virgula $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $shpi = array(); //transforma os pontos em shape $s = ms_newShapeObj(MS_SHAPE_POLYGON); @@ -197,13 +207,16 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa $tipoLayero = $layero->type; $this->layer->set("template","none.htm"); $layero->set("template","none.htm"); + /* if (file_exists($this->qyfile)) {$this->mapa->loadquery($this->qyfile);} + */ $indxlayer = $this->layer->index; $res_count = $this->layer->getNumresults(); $res_counto = $layero->getNumresults(); if ($res_counto == 0) {return false;} + /* $shp_atual = array(); for ($i = 0; $i < $res_count;++$i) { @@ -211,6 +224,11 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $shpi = array(); $i = $layero->index; $selecao = ""; @@ -357,6 +375,7 @@ $valor - Valor. } $this->layer->set("template","none.htm"); $indxlayer = $this->layer->index; + /* if (file_exists($this->qyfile)) {$this->mapa->loadquery($this->qyfile);} $res_count = $this->layer->getNumresults(); @@ -367,6 +386,11 @@ $valor - Valor. $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $shpi = array(); if($this->layer->connectiontype == MS_POSTGIS) { @@ -422,6 +446,7 @@ $valor - Valor. if(!$this->layer){return "erro";} $this->layer->set("template","none.htm"); $indxlayer = $this->layer->index; + /* if (file_exists($this->qyfile)) {$this->mapa->loadquery($this->qyfile);} $res_count = $this->layer->getNumresults(); @@ -432,6 +457,11 @@ $valor - Valor. $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $shpi = array(); $items = pegaItens($this->layer); $filtro = str_replace("|","'",$filtro); @@ -476,6 +506,8 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa if ($tipo == "inverte") {return ($this->selecaoInverte());} if(!$this->layer){return "erro";} + /* + $shp_atual = array(); if (file_exists($this->qyfile)) {$this->mapa->loadquery($this->qyfile);} $indxlayer = $this->layer->index; @@ -487,6 +519,11 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $shpi = array(); $c = explode(" ",$xy); $pt = ms_newPointObj(); @@ -549,6 +586,8 @@ Limpa a seleção do tema. */ function selecaoLimpa() { + if(file_exists($this->qyfileTema)) + {unlink($this->qyfileTema);} if ($this->nome != "") //limpa de um tema { if(!$this->layer){return "erro";} @@ -578,6 +617,7 @@ Inverte seleção do tema. {$this->mapa->loadquery($this->qyfile);} $indxlayer = $this->layer->index; $items = pegaItens($this->layer); + /* $res_count = $this->layer->getNumresults(); $shp_atual = array(); for ($i = 0; $i < $res_count;++$i) @@ -586,9 +626,11 @@ Inverte seleção do tema. $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); - //$qstring = "/.*/"; - //if($this->layer->connectiontype == MS_POSTGIS) - //{$qstring = $items[0].' ~* \'^.\' ';} + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $this->layer->queryByrect($this->mapa->extent); $res_count = $this->layer->getNumresults(); $shp_todos = array(); @@ -602,6 +644,7 @@ Inverte seleção do tema. foreach ($shp as $indx) {$this->mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} $this->mapa->savequery($this->qyfile); + $this->serializeQ($this->qyfileTema,$shp); return("ok"); } /* @@ -617,6 +660,7 @@ $shp_atual - Indices dos elementos já selecionados. */ function selecaoAdiciona($shpi,$shp_atual) { + error_reporting(E_ALL); if(!$this->layer){return "erro";} $indxlayer = $this->layer->index; $shp = array_merge($shpi,$shp_atual); @@ -625,7 +669,7 @@ $shp_atual - Indices dos elementos já selecionados. foreach ($shp as $indx) {@$this->mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} $this->mapa->savequery($this->qyfile); - + $this->serializeQ($this->qyfileTema,$shp); return("ok"); } /* @@ -650,6 +694,7 @@ $shp_atual - Indices dos elementos já selecionados. foreach ($shp as $indx) {$this->mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} $this->mapa->savequery($this->qyfile); + $this->serializeQ($this->qyfileTema,$shp); return("ok"); } /* @@ -674,6 +719,7 @@ $ids - Ids separados por vírgula correspondendo aos registros. foreach ($ids as $i) {$this->mapa->queryByIndex($indxlayer, -1, $i);} $this->mapa->savequery($this->qyfile); + $this->serializeQ($this->qyfileTema,$ids); return("ok"); } /* @@ -725,6 +771,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa if (file_exists($this->qyfile)) {$this->mapa->loadquery($this->qyfile);} $indxlayer = $this->layer->index; + /* $res_count = $this->layer->getNumresults(); $shp_atual = array(); for ($i = 0; $i < $res_count;++$i) @@ -733,6 +780,11 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $shpi = array(); $rect = $this->mapa->extent; $ident = @$this->layer->queryByRect($rect); @@ -773,6 +825,7 @@ $ext - coordenadas separadas por espaços no estilo xmin ymin xmax ymax if (file_exists($this->qyfile)) {$this->mapa->loadquery($this->qyfile);} $indxlayer = $this->layer->index; + /* $res_count = $this->layer->getNumresults(); $shp_atual = array(); for ($i = 0; $i < $res_count;++$i) @@ -781,6 +834,11 @@ $ext - coordenadas separadas por espaços no estilo xmin ymin xmax ymax $shp_atual[] = $rc->shapeindex; } $this->mapa->freequery($indxlayer); + */ + $shp_atual = array(); + if($this->qyfileTema != "" && file_exists($this->qyfileTema)) + {$shp_atual = $this->unserializeQ($this->qyfileTema);} + $shpi = array(); $temp = explode(" ",$ext); $rect = ms_newRectObj(); @@ -804,5 +862,39 @@ $ext - coordenadas separadas por espaços no estilo xmin ymin xmax ymax if ($tipo == "retira") {return($this->selecaoRetira($shpi,$shp_atual));} } +/* +function unserializeQ + +Deserializa um arquivo de geometrias. + +Parametros: +$arquivo - arquivo que será processado +*/ + function unserializeQ($arq) + { + $handle = fopen ($arq, "r"); + $conteudo = fread ($handle, filesize ($arq)); + fclose ($handle); + return(unserialize($conteudo)); + } +/* +function serializeQ + +Deserializa um arquivo de geometrias. + +Parametros: +$arquivo - arquivo que será processado + +$geos - array com os dados +*/ + function serializeQ($arq,$geos) + { + if (file_exists($arq)) + {unlink($arq);} + $fp = fopen($arq,"w"); + $r = serialize($geos); + fwrite($fp,$r); + fclose($fp); + } } ?> \ No newline at end of file diff --git a/classesphp/classe_shp.php b/classesphp/classe_shp.php index 75015ac..cd63b1e 100644 --- a/classesphp/classe_shp.php +++ b/classesphp/classe_shp.php @@ -41,7 +41,7 @@ class SHP Objeto mapa */ - protected $mapa; + public $mapa; /* Variavel: $arquivo diff --git a/classesphp/classe_temas.php b/classesphp/classe_temas.php index 4133c30..5a4f1c3 100644 --- a/classesphp/classe_temas.php +++ b/classesphp/classe_temas.php @@ -499,6 +499,27 @@ $valor - Novo valor da transparência return("ok"); } /* +function: inverteStatusLegenda + +Muda o metadata CLASSE, invertendo seu valor + +*/ + function inverteStatusLegenda() + { + //error_reporting(E_ALL); + $valor = $this->layer->getmetadata("classe"); + if($valor == "" || strtolower($valor) == "sim") + {$valor = "NAO";} + else + {$valor = "SIM";} + foreach ($this->grupo as $lg) + { + $ll = $this->mapa->getlayerbyname($lg); + $ll->setmetaData("classe",$valor); + } + return("ok"); + } +/* function: mudaNome Muda nome do tema. diff --git a/classesphp/classe_toponimia.php b/classesphp/classe_toponimia.php index b429fde..f73ea27 100644 --- a/classesphp/classe_toponimia.php +++ b/classesphp/classe_toponimia.php @@ -237,6 +237,7 @@ $item Lista de Itens separados por vírgula que serão utilizados. function ativaEtiquetas($item) { if(!$this->layer){return "erro";} + $this->layer->setmetadata("IDENTIFICA",""); $this->layer->setmetadata("TIP",$item); return("ok"); } diff --git a/classesphp/funcoes_gerais.php b/classesphp/funcoes_gerais.php index 0c62b1e..06aca40 100644 --- a/classesphp/funcoes_gerais.php +++ b/classesphp/funcoes_gerais.php @@ -837,6 +837,8 @@ $zoom - fator de zoom $tipo - tipo de referência dinamico|mapa +$interface - interface do mapa atual padrao|openlayers|googlemaps|flamingo|googleearth + Parametros: $ext {string} - (opcional) extensão geográfica do mapa @@ -847,17 +849,18 @@ String contendo variáveis no formato javascript */ function retornaReferenciaDinamica($ext="") { - global $nomeImagem,$map_file,$utilizacgi,$locmapserv,$locaplic,$zoom,$tipo; + global $nomeImagem,$map_file,$utilizacgi,$locmapserv,$locaplic,$zoom,$tipo,$interface; // //adiciona o tema com o web service com o mapa mundi // $objMapa = ms_newMapObj($map_file); + if($interface == "googlemaps") + {$objMapa->setProjection("init=epsg:4291");} if($ext && $ext != ""){ $e = explode(" ",$ext); $extatual = $objMapa->extent; $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); } - $numlayers = $objMapa->numlayers; for ($i=0;$i < $numlayers;++$i) { @@ -900,6 +903,8 @@ function retornaReferenciaDinamica($ext="") $nomer = ($objImagem->imageurl).basename($nomer); $s = "var refimagem='".$nomer."';var refwidth=".$objImagem->width.";var refheight=".$objImagem->height.";var refpath='".$objImagem->imagepath."';var refurl='".$objImagem->imageurl."'"; $mapa = ms_newMapObj($map_file); + if($interface == "googlemaps") + {$mapa->setProjection("init=epsg:4291");} $ref = $mapa->reference; $r = $ref->extent; // @@ -2585,4 +2590,41 @@ function cpjson($obj){ $cp->return_data(); } } +/* +Function: removeLinha + +Remove uma linha do mapfile baseado na comparação de strings. + +Parametros: + +$texto + +$mapfile +*/ +function removeLinha($texto,$mapfile) +{ + $abre = fopen($mapfile, "r"); + while (!feof($abre)) + { + $buffer = fgets($abre); + $maparray[] = $buffer; + } + fclose($abre); + $novoarray = array(); + foreach ($maparray as $e) + { + $remove = "nao"; + $testa = explode($texto,$e); + if (count($testa) > 1) + {$remove = "sim";} + if ($remove == "nao") + {$novoarray[] = $e;} + } + //salva o mapfile + $abre = fopen($mapfile, "wt"); + foreach($novoarray as $linha) + {$escreve = fwrite ($abre,$linha);} + $fecha = fclose ($abre); +} + ?> \ No newline at end of file diff --git a/classesphp/mapa_controle.php b/classesphp/mapa_controle.php index 6349ec1..9c17cd9 100644 --- a/classesphp/mapa_controle.php +++ b/classesphp/mapa_controle.php @@ -1272,6 +1272,21 @@ Aplica processos em um tema do tipo imagem redesenhaMapa(); break; /* +Valor: INVERTESTATUSLEGENDA + +Inverte o metadata CLASSE + +inverteStatusLegenda> +*/ + case "INVERTESTATUSLEGENDA": + include_once("classe_temas.php"); + copiaSeguranca($map_file); + $m = new Temas($map_file,$tema); + $m->inverteStatusLegenda(); + $m->salva(); + redesenhaMapa(); + break; +/* Valor: MUDATRANSP Altera a transparência de um tema @@ -1547,7 +1562,18 @@ Os valores para o gráfico são obtidos do tema indicado na classe. Para cada novo include_once("classe_shp.php"); copiaSeguranca($map_file); $m = new SHP($map_file,$tema,$locaplic); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + $m->salva(); + } $retorno = $m->insereSHPgrafico($x,$y,$itens,$width,$inclinacao,$shadow_height); + if($interface == "googlemaps") + { + $m->mapa->setProjection($projMapa); + $m->salva(); + } break; /* Valor: MOSTRAWKT @@ -2045,8 +2071,7 @@ Identifica elementos no mapa. { $m->mapa->setProjection($projMapa); $m->salva(); - } - + } break; /* Valor: IDENTIFICAUNICO @@ -2058,9 +2083,22 @@ Identifica elementos no mapa retornando apenas o valor de um único item. case "IDENTIFICAUNICO": if (!isset($resolucao)){$resolucao = 5;} include_once("classe_atributos.php"); - $m = new Atributos($map_file,$tema); + if(!isset($ext)) + {$ext = "";} + $m = new Atributos($map_file,$tema,"",$ext); + if($interface == "googlemaps") + { + $projMapa = $m->mapa->getProjection(); + $m->mapa->setProjection("init=epsg:4291"); + $m->salva(); + } $xy = explode(",",$xy); $retorno = $m->identificaQBP($tema,$xy[0],$xy[1],$map_file,$resolucao,$item,$tiporetorno="unico"); + if($interface == "googlemaps") + { + $m->mapa->setProjection($projMapa); + $m->salva(); + } break; /* Valor: ESTATISTICA @@ -2238,8 +2276,8 @@ Aplica uma resolução nova ao mapa atual e gera uma imagem para a lente. $m = new Navegacao($map_file); if(!isset($ext)) {$ext = "";} + $ext = projetaExt($map_file,$ext); $m->aplicaResolucao($resolucao,$ext); - //$m->desabilitaRASTER(); $retorno = ($m->mapa->width).",".($m->mapa->height).",".$m->gravaImagemCorpo(); break; /* @@ -2500,6 +2538,7 @@ Seleciona elementos utilizando um ponto. selecaoPT> */ case "SELECAOPT": + //error_reporting(E_ALL); include_once("classe_selecao.php"); copiaSeguranca($map_file); if(!isset($xy)){$xy = "";} diff --git a/classesphp/mapa_inicia.php b/classesphp/mapa_inicia.php index 5e1396a..46b8366 100644 --- a/classesphp/mapa_inicia.php +++ b/classesphp/mapa_inicia.php @@ -126,6 +126,9 @@ function iniciaMapa() {$layer->set("status",MS_OFF);} if($layer->type == MS_LAYER_POLYGON) { + if($layer->opacity == ""); + {$layer->set("opacity",50);} + /* $nclasses = $layer->numclasses; for($ii=0;$ii<$nclasses;++$ii){ $classe = $layer->getclass($ii); @@ -136,6 +139,7 @@ function iniciaMapa() $estilo->set("size","2"); } } + */ } //echo $l->getProjection();exit; if($layer->getProjection() == "" ) diff --git a/css/botoes.css b/css/botoes.css index 4a0027c..9ffe387 100644 --- a/css/botoes.css +++ b/css/botoes.css @@ -161,6 +161,14 @@ width:20px; height:10px; } +#menuinterface +{ + background-image:URL('../imagens/visual/default/sprite.png'); + background-repeat: no-repeat; + background-position: 3px -1775px; + width:52px; + height:15px; +} #menuajudaMenu { background-image:URL('../imagens/visual/default/sprite.png'); @@ -615,14 +623,6 @@ height:20px; cursor:pointer; } -#menuinterface -{ - background-image:URL('../imagens/visual/default/sprite.png'); - background-repeat: no-repeat; - background-position: 3px -1775px; - width:52px; - height:15px; -} #rota { background-image:URL('../imagens/visual/default/sprite.png'); diff --git a/ferramentas/3d/3d.php b/ferramentas/3d/3d.php index d4569e2..76bde1d 100644 --- a/ferramentas/3d/3d.php +++ b/ferramentas/3d/3d.php @@ -45,6 +45,8 @@ if ($temaz=="") if ($maptemp == ""){echo "Arquivo com o relevo não foi encontrado";return;} } $mapa = ms_newMapObj($map_file); +if($interface == "googlemaps") +{$mapa->setProjection("init=epsg:4291");} if(isset($ext) && $ext != "") { $e = explode(" ",$ext); diff --git a/ferramentas/colorpicker/index.htm b/ferramentas/colorpicker/index.htm index ceff90c..263e61c 100644 --- a/ferramentas/colorpicker/index.htm +++ b/ferramentas/colorpicker/index.htm @@ -25,6 +25,7 @@ body { @@ -50,7 +51,6 @@ API --> picker; Event.onDOMReady(function() { - YAHOO.log("Creating Color Picker.", "info", "example"); picker = new YAHOO.widget.ColorPicker("container", { showhsvcontrols: true, showhexcontrols: true, @@ -59,37 +59,21 @@ API --> HUE_THUMB: window.parent.i3GEO.configura.locaplic+"/pacotes/yui270/build/colorpicker/assets/hue_thumb.png" } }); - YAHOO.log("Finished creating Color Picker.", "info", "example"); - - //a listener for logging RGB color changes; - //this will only be visible if logger is enabled: var onRgbChange = function(o) { - /*o is an object - { newValue: (array of R, G, B values), - prevValue: (array of R, G, B values), - type: "rgbChange" - } - */ - YAHOO.log("The new color value is " + o.newValue, "info", "example"); } - - //subscribe to the rgbChange event; picker.on("rgbChange", onRgbChange); - - //use setValue to reset the value to white: + document.getElementById("yui-picker-swatch").style.display = "none"; + document.getElementById("yui-picker-controls").style.top = "0px"; + document.getElementById("yui-picker-websafe-swatch").style.left = "245px"; + document.getElementById("yui-picker-websafe-swatch").style.top = "185px"; Event.on("reset", "click", function(e) { - picker.setValue([255, 255, 255], false); //false here means that rgbChange - //wil fire; true would silence it + picker.setValue([255, 255, 255], false); + }); - - //use the "get" method to get the current value - //of one of the Color Picker's properties; in - //this case, we'll get the hex value and write it - //to the log: Event.on("gethex", "click", function(e) { - YAHOO.log("Current hex value: " + picker.get("hex"), "info", "example"); }); }); + })(); // //utilize tipo para definir o tipo de cor de retorno @@ -117,6 +101,8 @@ function aplicarCor() doc.getElementById(elemento).value = ncor; window.parent.YAHOO.janelaCor.xp.panel.destroy(); } + + diff --git a/ferramentas/confluence/index.js.php b/ferramentas/confluence/index.js.php index 494fc77..bd36294 100644 --- a/ferramentas/confluence/index.js.php +++ b/ferramentas/confluence/index.js.php @@ -66,8 +66,8 @@ i3GEOF.confluence = { i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.confluence.lista()"); } if(i3GEO.Interface.ATUAL === "googlemaps"){ - confluenceDragend = GEvent.addListener(i3GeoMap, "dragend", function() {i3GEOF.confluence.lista();}); - confluenceZoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {i3GEOF.confluence.lista();}); + confluenceDragend = google.maps.event.addListener(i3GeoMap, "dragend", function() {i3GEOF.confluence.lista();}); + confluenceZoomend = google.maps.event.addListener(i3GeoMap, "zoomend", function() {i3GEOF.confluence.lista();}); } i3GEOF.confluence.lista(); } @@ -124,8 +124,8 @@ i3GEOF.confluence = { i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.confluence.lista()"); } if(i3GEO.Interface.ATUAL === "googlemaps"){ - GEvent.removeListener(confluenceDragend); - GEvent.removeListener(confluenceZoomend); + google.maps.event.removeListener(confluenceDragend); + google.maps.event.removeListener(confluenceZoomend); } }; YAHOO.util.Event.addListener(janela[0].close, "click", temp); diff --git a/ferramentas/epsg.txt b/ferramentas/epsg.txt index d426be5..e5d7db4 100644 --- a/ferramentas/epsg.txt +++ b/ferramentas/epsg.txt @@ -1,5 +1,7 @@ # Geográfica SAD69 <4291> +proj=longlat +ellps=GRS67 +no_defs no_defs <> +# WGS 84 +<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs <> # Corrego Alegre / UTM zone 21S <22521> +proj=utm +zone=21 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs <> # Corrego Alegre / UTM zone 22S diff --git a/ferramentas/etiqueta/index.js.php b/ferramentas/etiqueta/index.js.php index 5c6e7c0..6663899 100644 --- a/ferramentas/etiqueta/index.js.php +++ b/ferramentas/etiqueta/index.js.php @@ -84,7 +84,7 @@ i3GEOF.etiqueta = { html:function(){ var ins = ''; ins += '

Escolha o item que será utilizado como fonte de dados para incluir a etiqueta:
'; - ins += '

'; + ins += '
'; ins += '

'; ins += '

'; ins += ''; @@ -148,7 +148,7 @@ i3GEOF.etiqueta = { itensatuais = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); itensatuais = itensatuais.etiquetas.split(","); ins = []; - ins.push(""); + ins.push("
"); n = retorno.data.valores.length; for (i=0;i' + '' + '' + - ' ' + @@ -151,7 +151,7 @@ i3GEOF.gradeCoord = { titulo = "Grade de coordenadas    "; janela = i3GEO.janela.cria( "350px", - "250px", + "440px", "", "", "", diff --git a/ferramentas/graficotema/index.js.php b/ferramentas/graficotema/index.js.php index 5803983..d00d63d 100644 --- a/ferramentas/graficotema/index.js.php +++ b/ferramentas/graficotema/index.js.php @@ -100,7 +100,7 @@ i3GEOF.graficoTema = { ins += ' '; ins += '

Escolha os itens to tipo numérico que comporão cada parte do gráfico

'; - ins += '

Escolha o tema para ver a lista de itens
'; + ins += '
Escolha o tema para ver a lista de itens
'; ins += '

'; ins += '

'; ins += '

Marque os itens para compor as partes do gráfico. Edite os valores de cor (R,G,B) conforme o desejado. Após escolher os itens, clique em criar gráficos para inserir um novo tema com os gráficos.

'; @@ -180,7 +180,7 @@ i3GEOF.graficoTema = { ins.push("
 
Cor da má +scara de um pixel de entorno:' + + ' Cor da máscara de um pixel de entorno:' + $inputText("","","i3GEOgradeCoordmascara_i","",11,"-1,-1,-1") + 'aquarela.gif' + '
"); n = retorno.data.valores.length; for (i=0;i"); + ins.push(""); ins.push(""); ins.push(""); ins.push(""); diff --git a/ferramentas/identifica/index.js.php b/ferramentas/identifica/index.js.php index 0585783..523c6e5 100644 --- a/ferramentas/identifica/index.js.php +++ b/ferramentas/identifica/index.js.php @@ -132,9 +132,14 @@ i3GEOF.identifica = { $i("i3GEOidentificaguia4").onclick = function(){ i3GEO.guias.mostraGuiaFerramenta("i3GEOidentificaguia4","i3GEOidentificaguia"); new YAHOO.widget.Button("i3GEOidentificabotao1",{onclick:{fn: function(){ - //window.location.href = "../etiqueta/index.htm?tema="+tema; - if(i3GEO.temaAtivo !== "") - {i3GEO.tema.dialogo.etiquetas(i3GEO.temaAtivo);} + if(i3GEO.temaAtivo !== ""){ + + var ltema = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); + if(ltema.identifica == "nao" || ltema.identifica == "NAO") + {alert("Esse tema não permite etiquetas");} + else + {i3GEO.tema.dialogo.etiquetas(i3GEO.temaAtivo);} + } else {alert("Nenhum tema definido");} }}}); @@ -319,11 +324,11 @@ i3GEOF.identifica = { } if(lista[l].identifica !== "nao") - {linhas1 += "";} + {linhas1 += "";} } divResultado = $i("i3GEOidentificalistaTemas"); if(divResultado) - {divResultado.innerHTML = linhas+"
 "+retorno.data.valores[i].item+"  
"+nome+"
"+nome+"
"+linhas1+"
Todos
";} + {divResultado.innerHTML = linhas+""+linhas1+"
Todos
";} }, /* Function: montaLinkGeohack @@ -407,7 +412,7 @@ i3GEOF.identifica = { { ltema = i3GEOF.identifica.sistemasAdicionais[l].split(","); if (ltema.length > 1) - {linhas += ""+ltema[0]+"";} + {linhas += ""+ltema[0]+"";} } if(divins){ diff --git a/ferramentas/imprimir/a4lpaisagempdf.php b/ferramentas/imprimir/a4lpaisagempdf.php index b6e465e..2c80f26 100644 --- a/ferramentas/imprimir/a4lpaisagempdf.php +++ b/ferramentas/imprimir/a4lpaisagempdf.php @@ -36,8 +36,11 @@ $nomes = nomeRandomico(); // //substitui a string de conexão com o banco em cada layer se for necessário // -substituiCon($map_file,$postgis_mapa); $map = ms_newMapObj($map_file); +$temp = str_replace(".map","xxx.map",$map_file); +$map->save($temp); +substituiCon($temp,$postgis_mapa); +$map = ms_newMapObj($temp); if($interface == "googlemaps") {$map->setProjection("init=epsg:4291");} @@ -61,7 +64,23 @@ foreach ($temas as $tema) {$classe->set("name",$layer->getmetadata("tema"));} } } + if ($layer->getmetadata("classe") == "NAO") + { + $nclasses = $layer->numclasses; + if ($nclasses > 0) + { + for($i=0;$i<$nclasses;$i++) + { + $classe = $layer->getclass($i); + $classe->set("name","classeNula"); + } + } + } } +$map->save($temp); +removeLinha("classeNula",$temp); +$map = ms_newMapObj($temp); + $o = $map->outputformat; if($interface == "openlayers" || $interface == "googlemaps"){ if($mapexten != ""){ @@ -73,6 +92,7 @@ if($interface == "openlayers" || $interface == "googlemaps"){ $legenda->set("status",MS_EMBED); $o->set("imagemode",MS_IMAGEMODE_RGB); } +$o->set("imagemode",MS_IMAGEMODE_RGB); $o->set("transparent","false"); $imgo = $map->draw(); $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; diff --git a/ferramentas/imprimir/aggpng.php b/ferramentas/imprimir/aggpng.php index f7b22c3..29649a7 100644 --- a/ferramentas/imprimir/aggpng.php +++ b/ferramentas/imprimir/aggpng.php @@ -78,7 +78,23 @@ foreach ($temas as $tema) {$classe->set("name",$layer->getmetadata("tema"));} } } + if ($layer->getmetadata("classe") == "NAO") + { + $nclasses = $layer->numclasses; + if ($nclasses > 0) + { + for($i=0;$i<$nclasses;$i++) + { + $classe = $layer->getclass($i); + $classe->set("name","classeNula"); + } + } + } } +$map->save($temp); +removeLinha("classeNula",$temp); +$map = ms_newMapObj($temp); +$o = $map->outputformat; if($interface == "openlayers" || $interface == "googlemaps"){ if($mapexten != ""){ $ext = explode(" ",$mapexten); @@ -87,9 +103,9 @@ if($interface == "openlayers" || $interface == "googlemaps"){ } $legenda = $map->legend; $legenda->set("status",MS_EMBED); - $o = $map->outputformat; $o->set("imagemode",MS_IMAGEMODE_RGB); } +$o->set("imagemode",MS_IMAGEMODE_RGB); $imgo = $map->draw(); $nomer = ($imgo->imagepath)."mapa".$nomes.".png"; $imgo->saveImage($nomer); diff --git a/ferramentas/imprimir/geotif.php b/ferramentas/imprimir/geotif.php index 1ad44dd..dc5b66e 100644 --- a/ferramentas/imprimir/geotif.php +++ b/ferramentas/imprimir/geotif.php @@ -78,7 +78,22 @@ foreach ($temas as $tema) {$classe->set("name",$layer->getmetadata("tema"));} } } + if ($layer->getmetadata("classe") == "NAO") + { + $nclasses = $layer->numclasses; + if ($nclasses > 0) + { + for($i=0;$i<$nclasses;$i++) + { + $classe = $layer->getclass($i); + $classe->set("name","classeNula"); + } + } + } } +$map->save($temp); +removeLinha("classeNula",$temp); +$map = ms_newMapObj($temp); $o = $map->outputformat; if($interface == "openlayers" || $interface == "googlemaps"){ if($mapexten != ""){ @@ -90,7 +105,7 @@ if($interface == "openlayers" || $interface == "googlemaps"){ $legenda->set("status",MS_EMBED); $o->set("imagemode",MS_IMAGEMODE_RGB); } - +$o->set("imagemode",MS_IMAGEMODE_RGB); $imgo = $map->draw(); $nomer = ($imgo->imagepath)."mapa".$nomes.".tif"; $imgo->saveImage($nomer); diff --git a/ferramentas/imprimir/index.js.php b/ferramentas/imprimir/index.js.php index 38a69c6..c4ecffd 100644 --- a/ferramentas/imprimir/index.js.php +++ b/ferramentas/imprimir/index.js.php @@ -69,32 +69,32 @@ i3GEOF.imprimir = { String com o código html */ html:function(){ - var ins = '

Escolha o modelo:

' + + var ins = '

Escolha o modelo: (utilize as propriedades do mapa para compor a legenda e outros elementos do mapa)

' + ''; if(i3GEO.Interface.ATUAL == "padrao"){ ins += ' ' + - ' ' + + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + ' '; } ins += ' ' + - ' ' + + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + ' ' + '
A4 paisagem
A4 retrato
A4 com margens pdf
Geo Tiff
Agg/Png alta qualidade
Svg - vetorial
'; @@ -114,8 +114,8 @@ i3GEOF.imprimir = { //cria a janela flutuante titulo = "Imprimir    "; janela = i3GEO.janela.cria( - "220px", - "140px", + "250px", + "180px", "", "", "", diff --git a/ferramentas/imprimir/svg.php b/ferramentas/imprimir/svg.php index 81b31c0..c901db9 100644 --- a/ferramentas/imprimir/svg.php +++ b/ferramentas/imprimir/svg.php @@ -75,7 +75,22 @@ foreach ($temas as $tema) {$classe->set("name",$layer->getmetadata("tema"));} } } + if ($layer->getmetadata("classe") == "NAO") + { + $nclasses = $layer->numclasses; + if ($nclasses > 0) + { + for($i=0;$i<$nclasses;$i++) + { + $classe = $layer->getclass($i); + $classe->set("name","classeNula"); + } + } + } } +$map->save($temp); +removeLinha("classeNula",$temp); +$map = ms_newMapObj($temp); $o = $map->outputformat; if($interface == "openlayers" || $interface == "googlemaps"){ if($mapexten != ""){ diff --git a/ferramentas/imprimir/swf.php b/ferramentas/imprimir/swf.php index bdc0945..8fac834 100644 --- a/ferramentas/imprimir/swf.php +++ b/ferramentas/imprimir/swf.php @@ -48,7 +48,22 @@ foreach ($temas as $tema) {$classe->set("name",$layer->getmetadata("tema"));} } } + if ($layer->getmetadata("classe") == "NAO") + { + $nclasses = $layer->numclasses; + if ($nclasses > 0) + { + for($i=0;$i<$nclasses;$i++) + { + $classe = $layer->getclass($i); + $classe->set("name","classeNula"); + } + } + } } +$map->save($temp); +removeLinha("classeNula",$temp); +$map = ms_newMapObj($temp); $of = $map->outputformat; $of->set("driver","swf"); $of->set("imagemode","PC256"); diff --git a/ferramentas/inseretxt/index.js.php b/ferramentas/inseretxt/index.js.php index 0098c36..5e31812 100644 --- a/ferramentas/inseretxt/index.js.php +++ b/ferramentas/inseretxt/index.js.php @@ -74,7 +74,8 @@ i3GEOF.inseretxt = { $i("i3GEOinseretxtDivComboTemas").style.display = "block"; if ($i("i3GEOinseretxtComboTemas")){ $i("i3GEOinseretxtComboTemas").onchange = function(){ - i3GEO.mapa.ativaTema($i("i3GEOinseretxtComboTemas").value); + $i("i3GEOinseretxtDivComboItens").innerHTML = "

Aguarde...

"; + i3GEO.mapa.ativaTema($i("i3GEOinseretxtComboTemas").value); //combodeitens i3GEO.util.comboItens( "i3GEOinseretxtComboItens", @@ -373,6 +374,11 @@ i3GEOF.inseretxt = { } else{ temp = function(retorno){ + if(retorno.data[0] == " "){ + alert("Nada encontrado."); + i3GEOF.inseretxt.aguarde.visibility = "hidden"; + return; + } i3GEOF.inseretxt.insere(retorno.data); }; tema = $i("i3GEOinseretxtComboTemas").value; diff --git a/ferramentas/inserexy2/index.js.php b/ferramentas/inserexy2/index.js.php index 9a9211c..d0d5efc 100644 --- a/ferramentas/inserexy2/index.js.php +++ b/ferramentas/inserexy2/index.js.php @@ -67,7 +67,7 @@ i3GEOF.inserexy = { //eventos das guias $i("i3GEOinserexyguia1").onclick = function(){ i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia1","i3GEOinserexyguia"); - $i("i3GEOinserexyprojecao").style.display = "block"; + $i("i3GEOinserexyprojecao").style.display = "none"; }; $i("i3GEOinserexyguia2").onclick = function(){ i3GEO.guias.mostraGuiaFerramenta("i3GEOinserexyguia2","i3GEOinserexyguia"); @@ -153,7 +153,7 @@ i3GEOF.inserexy = { '
  • Coordenadas
  • ' + ' ' + '
    ' + - '
    ' + + '' + '
    '+ '