From c67d1b816315f7c7b0b30fed9ca9f55f88bbb773 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 20 Feb 2008 16:55:21 +0000 Subject: [PATCH] --- mobile/index.php | 2 +- mobile/inicia.php | 7 ++++--- ms_criamapa.php | 24 ++++++++++-------------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/mobile/index.php b/mobile/index.php index 77ca6f0..1c91e32 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -94,7 +94,7 @@ var h = screen.availHeight; if (w > 600){var w = w/2;} if (h > 600){var h = h/2;} document.getElementById('wmobile').value = w; -document.getElementById('hmobile').value = h - 20; +document.getElementById('hmobile').value = h - 30; if ('' != "") {document.getElementById('f').submit();} /* diff --git a/mobile/inicia.php b/mobile/inicia.php index 96b46a6..a2325e4 100644 --- a/mobile/inicia.php +++ b/mobile/inicia.php @@ -56,9 +56,10 @@ function iniciamobile() $mapa->setsize($wmobile,$hmobile); $eb = $mapa->scalebar; $eb->set("style",0); - $cornb = $eb->backgroundcolor; - $n = explode(",",$bcor); - $cornb->setrgb(255,0,0); + $eb->set("position",MS_LL); + $cornb = $eb->backgroundcolor; + $n = explode(",",$bcor); + $cornb->setrgb(255,0,0); $mapa->save($tmpfname); //$tipo = "inicia"; include("mobile.php"); diff --git a/ms_criamapa.php b/ms_criamapa.php index 960384c..e55a40b 100644 --- a/ms_criamapa.php +++ b/ms_criamapa.php @@ -487,23 +487,23 @@ function ligaTemas() $lista = explode(" ", $layers); foreach ($lista as $l) { - $arqt = trim($l); if ($l == "") {continue;} if(@$mapn->getLayerByName($l)) {$layern = $mapn->getLayerByName($l);$layern->set("status",MS_DEFAULT);} $grupos = $mapn->getLayersIndexByGroup($l); - if(count($grupos > 0)) + if(count($grupos) > 0) { for ($i = 0;$i < count($grupos);$i++) { - $layern = $mapn->getLayer($i); - if($layern->group == $l) - {$layern->set("status",MS_DEFAULT);} + $layern = $mapn->getLayer($grupos[$i]); + if(strtolower($layern->group) == strtolower($l)) + { + $layern->set("status",MS_DEFAULT); + } } } } - } } /* @@ -549,14 +549,10 @@ function incluiTemasIniciais() $layern = $maptemp->getLayer($i); if($layern->type == MS_LAYER_RASTER) {$existeraster = true;} - if((!$existeraster) && ($layern->open() == MS_SUCCESS)) - { - $layern->setmetadata("NOMEORIGINAL",$layern->name); - if ($layern->name == "estadosl") - {$layern->set("data",$temasaplic."/dados/estados.shp");} - ms_newLayerObj(&$mapn, $layern); - } - $layern->close(); + if ($layern->name == "estadosl") + {$layern->set("data",$temasaplic."/dados/estados.shp");} + $layern->setmetadata("NOMEORIGINAL",$layern->name); + ms_newLayerObj(&$mapn, $layern); } } } -- libgit2 0.21.2