Commit f396e9c3d48250877c092a9c777dd2b1ba856217

Authored by Edmar Moretti
1 parent 6ddb32bb

$1

aplicmap/geral1debianv6.map
... ... @@ -151,7 +151,7 @@ MAP
151 151 POSITION LR
152 152 SIZE 200 2
153 153 STATUS embed
154   - STYLE 1
  154 + STYLE 0
155 155 TRANSPARENT FALSE
156 156 UNITS KILOMETERS
157 157 END
... ...
classesphp/classe_escala.php
... ... @@ -40,55 +40,55 @@ class Escala
40 40 {
41 41 /*
42 42 Variavel: $mapa
43   -
  43 +
44 44 Objeto mapa
45 45 */
46 46 protected $mapa;
47 47 /*
48 48 Variavel: $arquivo
49   -
  49 +
50 50 Arquivo map file
51 51 */
52 52 protected $arquivo;
53 53 /*
54 54 Variavel: $nomeImagem
55   -
  55 +
56 56 Nome da imagem criada
57 57 */
58 58 protected $nomeImagem;
59 59  
60   -
  60 +
61 61 /*
62 62 function: __construct
63 63  
64   -Cria um objeto Escala
  64 +Cria um objeto Escala
65 65  
66 66 parameters:
67   -$map_file - Endereço do mapfile no servidor.
  67 +$map_file - Endereço do mapfile no servidor.
68 68 */
69 69 function __construct($map_file,$nomeImagem="",$locaplic="")
70 70 {
71   - //error_reporting(0);
72   - if(file_exists($locaplic."/funcoes_gerais.php"))
73   - include_once($locaplic."/funcoes_gerais.php");
74   - else
75   - include_once("funcoes_gerais.php");
76   - $this->locaplic = $locaplic;
77   - $this->mapa = ms_newMapObj($map_file);
78   - $this->arquivo = $map_file;
79   - if ($nomeImagem == "")
80   - {$this->nomeImagem = nomeRandomico();}
  71 + //error_reporting(0);
  72 + if(file_exists($locaplic."/funcoes_gerais.php"))
  73 + include_once($locaplic."/funcoes_gerais.php");
  74 + else
  75 + include_once("funcoes_gerais.php");
  76 + $this->locaplic = $locaplic;
  77 + $this->mapa = ms_newMapObj($map_file);
  78 + $this->arquivo = $map_file;
  79 + if ($nomeImagem == "")
  80 + {$this->nomeImagem = nomeRandomico();}
81 81 }
82 82 /*
83 83 function: salva
84 84  
85 85 Salva o mapfile atual
86   -
87   -*/
88   - function salva()
89   - {
90   - if (connection_aborted()){exit();}
91   - $this->mapa->save($this->arquivo);
  86 +
  87 +*/
  88 + function salva()
  89 + {
  90 + if (connection_aborted()){exit();}
  91 + $this->mapa->save($this->arquivo);
92 92 }
93 93  
94 94 /*
... ... @@ -105,7 +105,7 @@ string com variáveis javascript.
105 105 {
106 106 $objImagem = $this->mapa->drawscalebar();
107 107 if($objImagem->imagepath == "")
108   - {echo "Erro IMAGEPATH vazio";exit;}
  108 + {echo "Erro IMAGEPATH vazio";exit;}
109 109 $nomer = ($objImagem->imagepath)."sca".$this->nomeImagem.".png";
110 110 $objImagem->saveImage($nomer);
111 111 $nomer = ($objImagem->imageurl).basename($nomer);
... ... @@ -128,7 +128,7 @@ string javascript com os parametros.
128 128 $bcor = $cor->red.",".$cor->green.",".$cor->blue;
129 129 $cor = $eb->outlinecolor;
130 130 $ocor = $cor->red.",".$cor->green.",".$cor->blue;
131   - 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."'");
  131 + 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."'");
132 132 }
133 133 /*
134 134 function: mudaEscalaGrafica
... ... @@ -152,7 +152,7 @@ $bcor - Cor do fundo RGB separado por vírgulas.
152 152  
153 153 $ocor - Cor do contorno RGB separado por vírgulas.
154 154 */
155   - function mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor)
  155 + function mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor,$status=3)
156 156 {
157 157 $eb = $this->mapa->scalebar;
158 158 $eb->set("width",$w);
... ... @@ -173,8 +173,12 @@ $ocor - Cor do contorno RGB separado por vírgulas.
173 173 //desabilita a escala
174 174 if ($estilo == 2)
175 175 {$eb->set("status",MS_OFF);}
176   - else
  176 + else
177 177 {$eb->set("status",MS_EMBED);}
  178 + if ($status == 3)
  179 + {$eb->set("status",MS_EMBED);} //MS_ON, MS_OFF, MS_EMBED
  180 + else
  181 + {$eb->set("status",MS_OFF);}
178 182 $this->salva();
179 183 return("ok");
180 184 }
... ...
curso/ini.map
... ... @@ -151,7 +151,7 @@ MAP
151 151 POSITION LR
152 152 SIZE 200 2
153 153 STATUS embed
154   - STYLE 1
  154 + STYLE 0
155 155 TRANSPARENT FALSE
156 156 UNITS KILOMETERS
157 157 END
... ...
ferramentas/opcoes_escala/dicionario.js
... ... @@ -77,5 +77,11 @@ i3GEOF.opcoesEscala.dicionario = {
77 77 en:"",
78 78 es:"",
79 79 it:""
  80 + }],
  81 + 14: [{
  82 + pt:"Inclui no corpo do mapa?",
  83 + en:"",
  84 + es:"",
  85 + it:""
80 86 }]
81 87 };
82 88 \ No newline at end of file
... ...
ferramentas/opcoes_escala/exec.php
... ... @@ -17,7 +17,7 @@ Aplica novos parâmetros na barra de escala atual.
17 17 include_once(dirname(__FILE__)."/../../classesphp/classe_escala.php");
18 18 copiaSeguranca($map_file);
19 19 $m = new Escala($map_file);
20   - $retorno = $m->mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor);
  20 + $retorno = $m->mudaEscalaGrafica($w,$h,$estilo,$intervalos,$unidade,$cor,$bcor,$ocor,$status);
21 21 $_SESSION["contadorsalva"]++;
22 22 break;
23 23 /*
... ...
ferramentas/opcoes_escala/index.js
... ... @@ -112,6 +112,14 @@ i3GEOF.opcoesEscala = {
112 112 */
113 113 html:function(){
114 114 var ins = '<table summary="" class=lista >' +
  115 + '<tr><td>'+$trad(14,i3GEOF.opcoesEscala.dicionario)+':</td><td>' +
  116 + ' <select id=i3GEOopcoesEscalastatus >' +
  117 + ' <option value=3 >'+$trad("x14")+'</option>' +
  118 + ' <option value=1 >'+$trad("x15")+'</option>' +
  119 + ' <option value=0 >---</option>' +
  120 + ' </select>' +
  121 + '<td></tr>' +
  122 + '<tr><td>&nbsp;</td><td></td></tr>' +
115 123 '<tr><td>Largura:</td><td>' +
116 124 $inputText("","","i3GEOopcoesEscalaw","",4,"") +
117 125 '</td></tr>' +
... ... @@ -241,6 +249,7 @@ i3GEOF.opcoesEscala = {
241 249 eval(retorno.data);
242 250 $i("i3GEOopcoesEscalaw").value = w;
243 251 $i("i3GEOopcoesEscalah").value = h;
  252 + $i("i3GEOopcoesEscalastatus").value = status;
244 253 $i("i3GEOopcoesEscalaestilo").value = estilo;
245 254 $i("i3GEOopcoesEscalaintervalos").value = intervalos;
246 255 $i("i3GEOopcoesEscalaunidade").value = unidade;
... ... @@ -267,6 +276,7 @@ i3GEOF.opcoesEscala = {
267 276 var par = "&w=" + $i("i3GEOopcoesEscalaw").value +
268 277 "&h=" + $i("i3GEOopcoesEscalah").value +
269 278 "&estilo=" + $i("i3GEOopcoesEscalaestilo").value +
  279 + "&status="+$i("i3GEOopcoesEscalastatus").value +
270 280 "&intervalos=" + $i("i3GEOopcoesEscalaintervalos").value +
271 281 "&unidade=" + $i("i3GEOopcoesEscalaunidade").value +
272 282 "&cor=" + $i("i3GEOopcoesEscalacor").value +
... ...