Commit c67d1b816315f7c7b0b30fed9ca9f55f88bbb773

Authored by Edmar Moretti
1 parent 30aa0e8b

--no commit message

mobile/index.php
@@ -94,7 +94,7 @@ var h = screen.availHeight; @@ -94,7 +94,7 @@ var h = screen.availHeight;
94 if (w > 600){var w = w/2;} 94 if (w > 600){var w = w/2;}
95 if (h > 600){var h = h/2;} 95 if (h > 600){var h = h/2;}
96 document.getElementById('wmobile').value = w; 96 document.getElementById('wmobile').value = w;
97 -document.getElementById('hmobile').value = h - 20; 97 +document.getElementById('hmobile').value = h - 30;
98 if ('<?php echo $temasa;?>' != "") 98 if ('<?php echo $temasa;?>' != "")
99 {document.getElementById('f').submit();} 99 {document.getElementById('f').submit();}
100 /* 100 /*
mobile/inicia.php
@@ -56,9 +56,10 @@ function iniciamobile() @@ -56,9 +56,10 @@ function iniciamobile()
56 $mapa->setsize($wmobile,$hmobile); 56 $mapa->setsize($wmobile,$hmobile);
57 $eb = $mapa->scalebar; 57 $eb = $mapa->scalebar;
58 $eb->set("style",0); 58 $eb->set("style",0);
59 - $cornb = $eb->backgroundcolor;  
60 - $n = explode(",",$bcor);  
61 - $cornb->setrgb(255,0,0); 59 + $eb->set("position",MS_LL);
  60 + $cornb = $eb->backgroundcolor;
  61 + $n = explode(",",$bcor);
  62 + $cornb->setrgb(255,0,0);
62 $mapa->save($tmpfname); 63 $mapa->save($tmpfname);
63 //$tipo = "inicia"; 64 //$tipo = "inicia";
64 include("mobile.php"); 65 include("mobile.php");
ms_criamapa.php
@@ -487,23 +487,23 @@ function ligaTemas() @@ -487,23 +487,23 @@ function ligaTemas()
487 $lista = explode(" ", $layers); 487 $lista = explode(" ", $layers);
488 foreach ($lista as $l) 488 foreach ($lista as $l)
489 { 489 {
490 - $arqt = trim($l);  
491 if ($l == "") 490 if ($l == "")
492 {continue;} 491 {continue;}
493 if(@$mapn->getLayerByName($l)) 492 if(@$mapn->getLayerByName($l))
494 {$layern = $mapn->getLayerByName($l);$layern->set("status",MS_DEFAULT);} 493 {$layern = $mapn->getLayerByName($l);$layern->set("status",MS_DEFAULT);}
495 $grupos = $mapn->getLayersIndexByGroup($l); 494 $grupos = $mapn->getLayersIndexByGroup($l);
496 - if(count($grupos > 0)) 495 + if(count($grupos) > 0)
497 { 496 {
498 for ($i = 0;$i < count($grupos);$i++) 497 for ($i = 0;$i < count($grupos);$i++)
499 { 498 {
500 - $layern = $mapn->getLayer($i);  
501 - if($layern->group == $l)  
502 - {$layern->set("status",MS_DEFAULT);} 499 + $layern = $mapn->getLayer($grupos[$i]);
  500 + if(strtolower($layern->group) == strtolower($l))
  501 + {
  502 + $layern->set("status",MS_DEFAULT);
  503 + }
503 } 504 }
504 } 505 }
505 } 506 }
506 -  
507 } 507 }
508 } 508 }
509 /* 509 /*
@@ -549,14 +549,10 @@ function incluiTemasIniciais() @@ -549,14 +549,10 @@ function incluiTemasIniciais()
549 $layern = $maptemp->getLayer($i); 549 $layern = $maptemp->getLayer($i);
550 if($layern->type == MS_LAYER_RASTER) 550 if($layern->type == MS_LAYER_RASTER)
551 {$existeraster = true;} 551 {$existeraster = true;}
552 - if((!$existeraster) && ($layern->open() == MS_SUCCESS))  
553 - {  
554 - $layern->setmetadata("NOMEORIGINAL",$layern->name);  
555 - if ($layern->name == "estadosl")  
556 - {$layern->set("data",$temasaplic."/dados/estados.shp");}  
557 - ms_newLayerObj(&$mapn, $layern);  
558 - }  
559 - $layern->close(); 552 + if ($layern->name == "estadosl")
  553 + {$layern->set("data",$temasaplic."/dados/estados.shp");}
  554 + $layern->setmetadata("NOMEORIGINAL",$layern->name);
  555 + ms_newLayerObj(&$mapn, $layern);
560 } 556 }
561 } 557 }
562 } 558 }