From f396e9c3d48250877c092a9c777dd2b1ba856217 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 25 Feb 2014 03:32:11 +0000 Subject: [PATCH] $1 --- aplicmap/geral1debianv6.map | 2 +- classesphp/classe_escala.php | 56 ++++++++++++++++++++++++++++++-------------------------- curso/ini.map | 2 +- ferramentas/opcoes_escala/dicionario.js | 6 ++++++ ferramentas/opcoes_escala/exec.php | 2 +- ferramentas/opcoes_escala/index.js | 10 ++++++++++ 6 files changed, 49 insertions(+), 29 deletions(-) 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 = '' + + '' + + '' + '' + @@ -241,6 +249,7 @@ i3GEOF.opcoesEscala = { eval(retorno.data); $i("i3GEOopcoesEscalaw").value = w; $i("i3GEOopcoesEscalah").value = h; + $i("i3GEOopcoesEscalastatus").value = status; $i("i3GEOopcoesEscalaestilo").value = estilo; $i("i3GEOopcoesEscalaintervalos").value = intervalos; $i("i3GEOopcoesEscalaunidade").value = unidade; @@ -267,6 +276,7 @@ i3GEOF.opcoesEscala = { var par = "&w=" + $i("i3GEOopcoesEscalaw").value + "&h=" + $i("i3GEOopcoesEscalah").value + "&estilo=" + $i("i3GEOopcoesEscalaestilo").value + + "&status="+$i("i3GEOopcoesEscalastatus").value + "&intervalos=" + $i("i3GEOopcoesEscalaintervalos").value + "&unidade=" + $i("i3GEOopcoesEscalaunidade").value + "&cor=" + $i("i3GEOopcoesEscalacor").value + -- libgit2 0.21.2
'+$trad(14,i3GEOF.opcoesEscala.dicionario)+':' + + ' ' + + '
 
Largura:' + $inputText("","","i3GEOopcoesEscalaw","",4,"") + '