From 6e5346051aec9ce7ebd61c83a874a81bfc042ae5 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 18 Dec 2007 11:59:28 +0000 Subject: [PATCH] Incluida opção de localização de um lugar. --- mobile/adicionatema.php | 9 +++++++-- mobile/desligar.php | 7 ++++++- mobile/escala.php | 5 +++++ mobile/index.php | 26 ++++++++++++++++++++++++-- mobile/inicia.php | 6 ++++-- mobile/legenda.php | 7 ++++++- mobile/ligar.php | 7 ++++++- mobile/localizar.php | 7 ++++++- mobile/mobile.php | 8 ++++++++ 9 files changed, 72 insertions(+), 10 deletions(-) diff --git a/mobile/adicionatema.php b/mobile/adicionatema.php index 40af356..5132b93 100644 --- a/mobile/adicionatema.php +++ b/mobile/adicionatema.php @@ -55,6 +55,11 @@ input cursor:pointer; background-color:white; } +h1 +{ + font:16pt arial,helvetica,clean,sans-serif; + color:brown; +}
@@ -70,7 +75,7 @@ if ($tipo == "listatemas") { $m = new Menutemas($tmpfname,"","nao"); $r = $m->pegaListaDeTemas($grupo,$subgrupo,""); - echo "Escolha o tema:

"; + echo "

Escolha o tema:

"; foreach($r as $l) { echo "".$l["nome"]."
"; @@ -89,7 +94,7 @@ if ($tipo == "adicionar") { $m = new Menutemas($tmpfname,"",$locsistemas); $r = $m->pegaListaDeGrupos("","nao"); - echo "Escolha o sub-grupo:

"; + echo "

Escolha o sub-grupo:

"; for($rid=0;$rid @@ -73,7 +78,7 @@ $par = $m->parametrosTemas(); $par = mb_convert_encoding($par,"ISO-8859-1","UTF-8"); $par = explode("'",$par); $par = explode(";",$par[1]); -echo "Escolha o tema que vc não quer ver no mapa:

"; +echo "

Escolha o tema que vc não quer ver no mapa:

"; $existe = false; foreach($par as $p) { diff --git a/mobile/escala.php b/mobile/escala.php index fc5eedf..0addab3 100644 --- a/mobile/escala.php +++ b/mobile/escala.php @@ -52,6 +52,11 @@ input cursor:pointer; background-color:white; } +h1 +{ + font:16pt arial,helvetica,clean,sans-serif; + color:brown; +} diff --git a/mobile/index.php b/mobile/index.php index 0cad3f9..378c568 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -16,6 +16,11 @@ input color:blue; cursor:pointer; } +h1 +{ + font:16pt arial,helvetica,clean,sans-serif; + color:brown; +}
@@ -54,7 +59,6 @@ Free Software Foundation, Inc., no endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. */ - include_once("../classesphp/pega_variaveis.php"); require_once("../classesphp/funcoes_gerais.php"); include("../classesphp/classe_menutemas.php"); @@ -62,15 +66,20 @@ include("../classesphp/carrega_ext.php"); include("../ms_configura.php"); $m = new Menutemas($tmpfname,""); $mapas = $m->pegaListaDeMapas($locmapas); +echo "

Escolha um dos mapas:

"; foreach($mapas["mapas"] as $obj) { echo "".$obj["NOME"]."

"; } +echo "

ou uma das opções:

"; +echo "Procurar lugar

"; ?> - + + +

O i3Geo é um software livre desenvolvido pelo Ministério do Meio Ambiente. Veja: @@ -97,5 +106,18 @@ function ligar(temas) document.getElementById('temasa').value = temas; document.getElementById('f').submit(); } +/* +Function: localizar + +Inicia a busca por um lugar + +*/ +function localizar(temas) +{ + document.getElementById('temasa').value = "estadosl"; + document.getElementById('layers').value = "baserasterwms"; + document.getElementById('tipo').value = "localizar"; + document.getElementById('f').submit(); +} \ No newline at end of file diff --git a/mobile/inicia.php b/mobile/inicia.php index 831133e..46a6d25 100644 --- a/mobile/inicia.php +++ b/mobile/inicia.php @@ -32,8 +32,10 @@ Free Software Foundation, Inc., no endereço include_once("../classesphp/pega_variaveis.php"); $caminho = "../"; +if(!isset($layers)) $layers = $temasa; $executa = "iniciamobile"; +if(!isset($tipo)){$tipo = "inicia";} include("../ms_criamapa.php"); /* Function: iniciamobile @@ -48,11 +50,11 @@ A variável tmpfname é definida no processo de criação do mapa, feito pelo ms_cri */ function iniciamobile() { - global $wmobile,$hmobile,$tmpfname; + global $wmobile,$hmobile,$tmpfname,$tipo; $mapa = ms_newMapObj($tmpfname); $mapa->setsize($wmobile,$hmobile); $mapa->save($tmpfname); - $tipo = "inicia"; + //$tipo = "inicia"; include("mobile.php"); exit; } diff --git a/mobile/legenda.php b/mobile/legenda.php index cc0fb95..e6f39ca 100644 --- a/mobile/legenda.php +++ b/mobile/legenda.php @@ -53,6 +53,11 @@ input cursor:pointer; background-color:white; } +h1 +{ + font:16pt arial,helvetica,clean,sans-serif; + color:brown; +}

@@ -65,7 +70,7 @@ input $m = new Legenda($tmpfname,$locaplic,"",$template); $r = $m->criaLegenda(); if(!$r){$r = "erro. Legenda nao disponivel";} -$r = mb_convert_encoding($r,"ISO-8859-1","UTF-8"); +$r = mb_convert_encoding($r["legenda"],"ISO-8859-1","UTF-8"); echo $r; ?> diff --git a/mobile/ligar.php b/mobile/ligar.php index 073c2e9..be98d21 100644 --- a/mobile/ligar.php +++ b/mobile/ligar.php @@ -53,6 +53,11 @@ input cursor:pointer; background-color:white; } +h1 +{ + font:16pt arial,helvetica,clean,sans-serif; + color:brown; +} @@ -72,7 +77,7 @@ $par = $m->parametrosTemas(); $par = mb_convert_encoding($par,"ISO-8859-1","UTF-8"); $par = explode("'",$par); $par = explode(";",$par[1]); -echo "Escolha o tema que vc quer ver no mapa:

"; +echo "

Escolha o tema que vc quer ver no mapa:

"; $existe = false; foreach($par as $p) { diff --git a/mobile/localizar.php b/mobile/localizar.php index 7dd1de0..b1fc809 100644 --- a/mobile/localizar.php +++ b/mobile/localizar.php @@ -59,6 +59,11 @@ input cursor:pointer; background-color:white; } +h1 +{ + font:16pt arial,helvetica,clean,sans-serif; + color:brown; +}

@@ -81,7 +86,7 @@ if ($tipo == 'executa') foreach($r["geonames"] as $linha) { $lugares = $linha["lugares"]; - echo $linha["tema"]."
"; + echo "

".$linha["tema"]."

"; $layer = $linha["layer"]; foreach ($lugares as $lugar) { diff --git a/mobile/mobile.php b/mobile/mobile.php index fcfca47..46ec4dd 100644 --- a/mobile/mobile.php +++ b/mobile/mobile.php @@ -107,6 +107,11 @@ if ($tipo=="oeste") $m->pan($x,$y,"",""); $m->salva(); } +if ($tipo=="localizar") +{ + include("localizar.php"); + exit; +} $mapa = ms_newMapObj($tmpfname); $w = $mapa->width; $h = $mapa->height; @@ -129,6 +134,7 @@ else