diff --git a/aplicmap/geral1debianv6.map b/aplicmap/geral1debianv6.map index b9e3665..a70b0d3 100644 --- a/aplicmap/geral1debianv6.map +++ b/aplicmap/geral1debianv6.map @@ -151,7 +151,7 @@ MAP POSITION LR SIZE 200 2 STATUS embed - STYLE 1 + STYLE 0 TRANSPARENT FALSE UNITS KILOMETERS END diff --git a/classesphp/classe_escala.php b/classesphp/classe_escala.php index 033e697..e8bcfc0 100644 --- a/classesphp/classe_escala.php +++ b/classesphp/classe_escala.php @@ -40,55 +40,55 @@ class Escala { /* Variavel: $mapa - + Objeto mapa */ protected $mapa; /* Variavel: $arquivo - + Arquivo map file */ protected $arquivo; /* Variavel: $nomeImagem - + Nome da imagem criada */ protected $nomeImagem; - + /* function: __construct -Cria um objeto Escala +Cria um objeto Escala parameters: -$map_file - Endereço do mapfile no servidor. +$map_file - Endereço do mapfile no servidor. */ function __construct($map_file,$nomeImagem="",$locaplic="") { - //error_reporting(0); - if(file_exists($locaplic."/funcoes_gerais.php")) - include_once($locaplic."/funcoes_gerais.php"); - else - include_once("funcoes_gerais.php"); - $this->locaplic = $locaplic; - $this->mapa = ms_newMapObj($map_file); - $this->arquivo = $map_file; - if ($nomeImagem == "") - {$this->nomeImagem = nomeRandomico();} + //error_reporting(0); + if(file_exists($locaplic."/funcoes_gerais.php")) + include_once($locaplic."/funcoes_gerais.php"); + else + include_once("funcoes_gerais.php"); + $this->locaplic = $locaplic; + $this->mapa = ms_newMapObj($map_file); + $this->arquivo = $map_file; + if ($nomeImagem == "") + {$this->nomeImagem = nomeRandomico();} } /* function: salva Salva o mapfile atual - -*/ - function salva() - { - if (connection_aborted()){exit();} - $this->mapa->save($this->arquivo); + +*/ + function salva() + { + if (connection_aborted()){exit();} + $this->mapa->save($this->arquivo); } /* @@ -105,7 +105,7 @@ string com variáveis javascript. { $objImagem = $this->mapa->drawscalebar(); if($objImagem->imagepath == "") - {echo "Erro IMAGEPATH vazio";exit;} + {echo "Erro IMAGEPATH vazio";exit;} $nomer = ($objImagem->imagepath)."sca".$this->nomeImagem.".png"; $objImagem->saveImage($nomer); $nomer = ($objImagem->imageurl).basename($nomer); @@ -128,7 +128,7 @@ string javascript com os parametros. $bcor = $cor->red.",".$cor->green.",".$cor->blue; $cor = $eb->outlinecolor; $ocor = $cor->red.",".$cor->green.",".$cor->blue; - return("var w=".$eb->width.";var h=".$eb->height.";var estilo=".$eb->style.";var intervalos=".$eb->intervals.";var unidade=".$eb->units.";var cor='".$fcor."';var bcor='".$bcor."';var ocor='".$fcor."'"); + return("var status = ".$eb->status.";var w=".$eb->width.";var h=".$eb->height.";var estilo=".$eb->style.";var intervalos=".$eb->intervals.";var unidade=".$eb->units.";var cor='".$fcor."';var bcor='".$bcor."';var ocor='".$fcor."'"); } /* function: mudaEscalaGrafica @@ -152,7 +152,7 @@ $bcor - Cor do fundo RGB separado por vírgulas. $ocor - Cor do contorno RGB separado por vírgulas. */ - function mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor) + function mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor,$status=3) { $eb = $this->mapa->scalebar; $eb->set("width",$w); @@ -173,8 +173,12 @@ $ocor - Cor do contorno RGB separado por vírgulas. //desabilita a escala if ($estilo == 2) {$eb->set("status",MS_OFF);} - else + else {$eb->set("status",MS_EMBED);} + if ($status == 3) + {$eb->set("status",MS_EMBED);} //MS_ON, MS_OFF, MS_EMBED + else + {$eb->set("status",MS_OFF);} $this->salva(); return("ok"); } diff --git a/curso/ini.map b/curso/ini.map index b9e3665..a70b0d3 100755 --- a/curso/ini.map +++ b/curso/ini.map @@ -151,7 +151,7 @@ MAP POSITION LR SIZE 200 2 STATUS embed - STYLE 1 + STYLE 0 TRANSPARENT FALSE UNITS KILOMETERS END diff --git a/ferramentas/opcoes_escala/dicionario.js b/ferramentas/opcoes_escala/dicionario.js index cba2956..dd04f5f 100644 --- a/ferramentas/opcoes_escala/dicionario.js +++ b/ferramentas/opcoes_escala/dicionario.js @@ -77,5 +77,11 @@ i3GEOF.opcoesEscala.dicionario = { en:"", es:"", it:"" + }], + 14: [{ + pt:"Inclui no corpo do mapa?", + en:"", + es:"", + it:"" }] }; \ No newline at end of file diff --git a/ferramentas/opcoes_escala/exec.php b/ferramentas/opcoes_escala/exec.php index 90cb267..2fccd0e 100644 --- a/ferramentas/opcoes_escala/exec.php +++ b/ferramentas/opcoes_escala/exec.php @@ -17,7 +17,7 @@ Aplica novos parâmetros na barra de escala atual. include_once(dirname(__FILE__)."/../../classesphp/classe_escala.php"); copiaSeguranca($map_file); $m = new Escala($map_file); - $retorno = $m->mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor); + $retorno = $m->mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor,$status); $_SESSION["contadorsalva"]++; break; /* diff --git a/ferramentas/opcoes_escala/index.js b/ferramentas/opcoes_escala/index.js index 46b307b..df4988c 100644 --- a/ferramentas/opcoes_escala/index.js +++ b/ferramentas/opcoes_escala/index.js @@ -112,6 +112,14 @@ i3GEOF.opcoesEscala = { */ html:function(){ var ins = '
'+$trad(14,i3GEOF.opcoesEscala.dicionario)+': | ' + + ' ' + + ' | |
Largura: | ' + $inputText("","","i3GEOopcoesEscalaw","",4,"") + ' |