From fa723b9a7f845e4833bbc638f57dec3b0371c0bd Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 1 Feb 2011 13:31:44 +0000 Subject: [PATCH] Parâmetro de configuração para permitir ajuste automático do tamanho do mapa. Correção no tamanho da barra de botões. --- admin/admin.db | Bin 70656 -> 0 bytes classesjs/classe_barradebotoes.js | 4 ++-- classesjs/classe_configura.js | 13 +++++++++++++ classesjs/classe_i3geo.js | 18 +++++++++--------- interface/openlayers.htm | 7 +++++++ testainstal.php | 9 ++++++--- 6 files changed, 37 insertions(+), 14 deletions(-) diff --git a/admin/admin.db b/admin/admin.db index 8bccf5b..168f50e 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/classesjs/classe_barradebotoes.js b/classesjs/classe_barradebotoes.js index 2216d6e..8203d3c 100644 --- a/classesjs/classe_barradebotoes.js +++ b/classesjs/classe_barradebotoes.js @@ -594,7 +594,7 @@ i3GEO.barraDeBotoes = { {i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic);} //copia os botoes do HTML para a janela ticone = 28; - alturadisponivel = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - ticone - 25 - 28; + alturadisponivel = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - ticone - 28 - 28; if(i3GEO.barraDeBotoes.AUTOALTURA === true) {alturadisponivel += 28;} numerobotoes = parseInt(alturadisponivel / ticone,10); @@ -645,7 +645,7 @@ i3GEO.barraDeBotoes = { {i3GEO.navega.barraDeZoom.ativa();} YAHOO.janelaBotoes.xp.panel.render(); if(i3GEO.barraDeBotoes.AUTOALTURA === true){ - YAHOO.util.Dom.setStyle("i3geo_barra2","height",i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - 1 + "px"); + //YAHOO.util.Dom.setStyle("i3geo_barra2","height",i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - 1 + "px"); } YAHOO.janelaBotoes.xp.panel.moveTo(x,y); if($i("sobeferramentas")){ diff --git a/classesjs/classe_configura.js b/classesjs/classe_configura.js index 9f0ed4c..fc81825 100644 --- a/classesjs/classe_configura.js +++ b/classesjs/classe_configura.js @@ -306,6 +306,19 @@ i3GEO.configura = { */ diminuiyN: 100, /* + Propriedade: autotamanho + + Calcula o tamanho do mapa conforme o tamanho da janela do navegador (false) ou calcula o tamanho do mapa + conforme o tamanho da tela do monitor (true) + + Tipo: + {boolean} + + Default: + {false} + */ + autotamanho: false, + /* Propriedade: map3d Variável que define o nome do map_file que possuí o layer para uso na função 3d. diff --git a/classesjs/classe_i3geo.js b/classesjs/classe_i3geo.js index ccec134..2983cc0 100644 --- a/classesjs/classe_i3geo.js +++ b/classesjs/classe_i3geo.js @@ -526,17 +526,17 @@ i3GEO = { if ($i("contemFerramentas")) {menos += parseInt($i("contemFerramentas").style.width,10);} if ($i("ferramentas")) - {menos += parseInt($i("ferramentas").style.width,10);} - - //novow = parseInt(screen.availWidth,10) - diminuix; + {menos += parseInt($i("ferramentas").style.width,10);} + if(i3GEO.configura.autotamanho === true){ + //novow = parseInt(screen.availWidth,10) - diminuix - i3GEO.util.getScrollerWidth(); + //novoh = parseInt(screen.availHeight,10) - diminuiy; + if (window.top === window.self){//nao se aplica em iframe + window.resizeTo(screen.availWidth,screen.availHeight); + window.moveTo(0,0); + } + } novow = YAHOO.util.Dom.getDocumentWidth() - i3GEO.util.getScrollerWidth(); - //novoh = parseInt(screen.availHeight,10) - diminuiy; novoh = YAHOO.util.Dom.getDocumentHeight(); - - if (window.top === window.self){//nao se aplica em iframe - window.resizeTo(screen.availWidth,screen.availHeight); - window.moveTo(0,0); - } //o try aqui é necessário por conta do uso possível do i3geo em um iframe try{ if (novow < 800){ diff --git a/interface/openlayers.htm b/interface/openlayers.htm index 62268db..d103c9a 100644 --- a/interface/openlayers.htm +++ b/interface/openlayers.htm @@ -173,7 +173,14 @@ Para definir quais botões das barras de ferramentas serão incluídos no mapa, vej Se não for definida, o i3Geo tentará encontrar o local automaticamente */ //i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; +/* +Para outras configurações, veja i3geo/classesjs/classe_configura.js + +exemplo +i3GEO.configura.autotamanho = true; +*/ +i3GEO.configura.autotamanho = false; i3GEO.Interface.ATUAL = "openlayers"; i3GEO.Interface.IDCORPO = "contemImg"; diff --git a/testainstal.php b/testainstal.php index 4ad56ac..ab265f8 100644 --- a/testainstal.php +++ b/testainstal.php @@ -50,6 +50,7 @@ i3geo/testainstal.php */ error_reporting(E_ALL); +echo ""; echo "
\n";
 echo "TESTE DE INSTALACAO DO i3Geo
\n"; echo getcwd(); @@ -58,8 +59,10 @@ echo "

PHP (a versão deve ser a 5x e menor que 5.3): "; echo "
".phpversion()."
\n"; include("classesphp/carrega_ext.php"); $exts = get_loaded_extensions(); -echo "Obs: MapServer (a versão deve ser >= 5.2 para que a sobreposição de temas funcione na interface Google Maps): "; +echo "Obs: MapServer (a versão deve ser >= 5.2 para que a sobreposição de temas funcione na interface Google Maps):
"; echo ms_GetVersion()."

"; +if(!function_exists("ms_GetVersion")) +{echo "O MAPSERVER PARECE NAO ESTAR INSTALADO

";} echo "---"; echo "
Extensões:
"; if (!extension_loaded("libxml")){echo "Problema: não está instalado a libxml
";} @@ -76,8 +79,8 @@ if (!extension_loaded( "mbstring")){echo "Obs: não var_dump( $exts ); -echo "Existe o ms_configura.php? "; -if(file_exists("ms_configura.php")) echo "Sim\n"; else {echo "Nao";saindo("ms_configura não encontrado");} +echo "Existe o ms_configura.php?
"; +if(file_exists("ms_configura.php")) echo "Sim\n"; else {echo "Nao";saindo(" ms_configura não encontrado");} echo "Incluindo...\n
"; include ("ms_configura.php"); echo "$mensagemInicia \n"; -- libgit2 0.21.2