Commit f396e9c3d48250877c092a9c777dd2b1ba856217
1 parent
6ddb32bb
Exists in
master
and in
7 other branches
$1
Showing
6 changed files
with
49 additions
and
29 deletions
Show diff stats
aplicmap/geral1debianv6.map
classesphp/classe_escala.php
| @@ -40,55 +40,55 @@ class Escala | @@ -40,55 +40,55 @@ class Escala | ||
| 40 | { | 40 | { |
| 41 | /* | 41 | /* |
| 42 | Variavel: $mapa | 42 | Variavel: $mapa |
| 43 | - | 43 | + |
| 44 | Objeto mapa | 44 | Objeto mapa |
| 45 | */ | 45 | */ |
| 46 | protected $mapa; | 46 | protected $mapa; |
| 47 | /* | 47 | /* |
| 48 | Variavel: $arquivo | 48 | Variavel: $arquivo |
| 49 | - | 49 | + |
| 50 | Arquivo map file | 50 | Arquivo map file |
| 51 | */ | 51 | */ |
| 52 | protected $arquivo; | 52 | protected $arquivo; |
| 53 | /* | 53 | /* |
| 54 | Variavel: $nomeImagem | 54 | Variavel: $nomeImagem |
| 55 | - | 55 | + |
| 56 | Nome da imagem criada | 56 | Nome da imagem criada |
| 57 | */ | 57 | */ |
| 58 | protected $nomeImagem; | 58 | protected $nomeImagem; |
| 59 | 59 | ||
| 60 | - | 60 | + |
| 61 | /* | 61 | /* |
| 62 | function: __construct | 62 | function: __construct |
| 63 | 63 | ||
| 64 | -Cria um objeto Escala | 64 | +Cria um objeto Escala |
| 65 | 65 | ||
| 66 | parameters: | 66 | parameters: |
| 67 | -$map_file - Endereço do mapfile no servidor. | 67 | +$map_file - Endereço do mapfile no servidor. |
| 68 | */ | 68 | */ |
| 69 | function __construct($map_file,$nomeImagem="",$locaplic="") | 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 | function: salva | 83 | function: salva |
| 84 | 84 | ||
| 85 | Salva o mapfile atual | 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,7 +105,7 @@ string com variáveis javascript. | ||
| 105 | { | 105 | { |
| 106 | $objImagem = $this->mapa->drawscalebar(); | 106 | $objImagem = $this->mapa->drawscalebar(); |
| 107 | if($objImagem->imagepath == "") | 107 | if($objImagem->imagepath == "") |
| 108 | - {echo "Erro IMAGEPATH vazio";exit;} | 108 | + {echo "Erro IMAGEPATH vazio";exit;} |
| 109 | $nomer = ($objImagem->imagepath)."sca".$this->nomeImagem.".png"; | 109 | $nomer = ($objImagem->imagepath)."sca".$this->nomeImagem.".png"; |
| 110 | $objImagem->saveImage($nomer); | 110 | $objImagem->saveImage($nomer); |
| 111 | $nomer = ($objImagem->imageurl).basename($nomer); | 111 | $nomer = ($objImagem->imageurl).basename($nomer); |
| @@ -128,7 +128,7 @@ string javascript com os parametros. | @@ -128,7 +128,7 @@ string javascript com os parametros. | ||
| 128 | $bcor = $cor->red.",".$cor->green.",".$cor->blue; | 128 | $bcor = $cor->red.",".$cor->green.",".$cor->blue; |
| 129 | $cor = $eb->outlinecolor; | 129 | $cor = $eb->outlinecolor; |
| 130 | $ocor = $cor->red.",".$cor->green.",".$cor->blue; | 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 | function: mudaEscalaGrafica | 134 | function: mudaEscalaGrafica |
| @@ -152,7 +152,7 @@ $bcor - Cor do fundo RGB separado por vírgulas. | @@ -152,7 +152,7 @@ $bcor - Cor do fundo RGB separado por vírgulas. | ||
| 152 | 152 | ||
| 153 | $ocor - Cor do contorno RGB separado por vírgulas. | 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 | $eb = $this->mapa->scalebar; | 157 | $eb = $this->mapa->scalebar; |
| 158 | $eb->set("width",$w); | 158 | $eb->set("width",$w); |
| @@ -173,8 +173,12 @@ $ocor - Cor do contorno RGB separado por vírgulas. | @@ -173,8 +173,12 @@ $ocor - Cor do contorno RGB separado por vírgulas. | ||
| 173 | //desabilita a escala | 173 | //desabilita a escala |
| 174 | if ($estilo == 2) | 174 | if ($estilo == 2) |
| 175 | {$eb->set("status",MS_OFF);} | 175 | {$eb->set("status",MS_OFF);} |
| 176 | - else | 176 | + else |
| 177 | {$eb->set("status",MS_EMBED);} | 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 | $this->salva(); | 182 | $this->salva(); |
| 179 | return("ok"); | 183 | return("ok"); |
| 180 | } | 184 | } |
curso/ini.map
ferramentas/opcoes_escala/dicionario.js
| @@ -77,5 +77,11 @@ i3GEOF.opcoesEscala.dicionario = { | @@ -77,5 +77,11 @@ i3GEOF.opcoesEscala.dicionario = { | ||
| 77 | en:"", | 77 | en:"", |
| 78 | es:"", | 78 | es:"", |
| 79 | it:"" | 79 | it:"" |
| 80 | + }], | ||
| 81 | + 14: [{ | ||
| 82 | + pt:"Inclui no corpo do mapa?", | ||
| 83 | + en:"", | ||
| 84 | + es:"", | ||
| 85 | + it:"" | ||
| 80 | }] | 86 | }] |
| 81 | }; | 87 | }; |
| 82 | \ No newline at end of file | 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,7 +17,7 @@ Aplica novos parâmetros na barra de escala atual. | ||
| 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_escala.php"); | 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_escala.php"); |
| 18 | copiaSeguranca($map_file); | 18 | copiaSeguranca($map_file); |
| 19 | $m = new Escala($map_file); | 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 | $_SESSION["contadorsalva"]++; | 21 | $_SESSION["contadorsalva"]++; |
| 22 | break; | 22 | break; |
| 23 | /* | 23 | /* |
ferramentas/opcoes_escala/index.js
| @@ -112,6 +112,14 @@ i3GEOF.opcoesEscala = { | @@ -112,6 +112,14 @@ i3GEOF.opcoesEscala = { | ||
| 112 | */ | 112 | */ |
| 113 | html:function(){ | 113 | html:function(){ |
| 114 | var ins = '<table summary="" class=lista >' + | 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> </td><td></td></tr>' + | ||
| 115 | '<tr><td>Largura:</td><td>' + | 123 | '<tr><td>Largura:</td><td>' + |
| 116 | $inputText("","","i3GEOopcoesEscalaw","",4,"") + | 124 | $inputText("","","i3GEOopcoesEscalaw","",4,"") + |
| 117 | '</td></tr>' + | 125 | '</td></tr>' + |
| @@ -241,6 +249,7 @@ i3GEOF.opcoesEscala = { | @@ -241,6 +249,7 @@ i3GEOF.opcoesEscala = { | ||
| 241 | eval(retorno.data); | 249 | eval(retorno.data); |
| 242 | $i("i3GEOopcoesEscalaw").value = w; | 250 | $i("i3GEOopcoesEscalaw").value = w; |
| 243 | $i("i3GEOopcoesEscalah").value = h; | 251 | $i("i3GEOopcoesEscalah").value = h; |
| 252 | + $i("i3GEOopcoesEscalastatus").value = status; | ||
| 244 | $i("i3GEOopcoesEscalaestilo").value = estilo; | 253 | $i("i3GEOopcoesEscalaestilo").value = estilo; |
| 245 | $i("i3GEOopcoesEscalaintervalos").value = intervalos; | 254 | $i("i3GEOopcoesEscalaintervalos").value = intervalos; |
| 246 | $i("i3GEOopcoesEscalaunidade").value = unidade; | 255 | $i("i3GEOopcoesEscalaunidade").value = unidade; |
| @@ -267,6 +276,7 @@ i3GEOF.opcoesEscala = { | @@ -267,6 +276,7 @@ i3GEOF.opcoesEscala = { | ||
| 267 | var par = "&w=" + $i("i3GEOopcoesEscalaw").value + | 276 | var par = "&w=" + $i("i3GEOopcoesEscalaw").value + |
| 268 | "&h=" + $i("i3GEOopcoesEscalah").value + | 277 | "&h=" + $i("i3GEOopcoesEscalah").value + |
| 269 | "&estilo=" + $i("i3GEOopcoesEscalaestilo").value + | 278 | "&estilo=" + $i("i3GEOopcoesEscalaestilo").value + |
| 279 | + "&status="+$i("i3GEOopcoesEscalastatus").value + | ||
| 270 | "&intervalos=" + $i("i3GEOopcoesEscalaintervalos").value + | 280 | "&intervalos=" + $i("i3GEOopcoesEscalaintervalos").value + |
| 271 | "&unidade=" + $i("i3GEOopcoesEscalaunidade").value + | 281 | "&unidade=" + $i("i3GEOopcoesEscalaunidade").value + |
| 272 | "&cor=" + $i("i3GEOopcoesEscalacor").value + | 282 | "&cor=" + $i("i3GEOopcoesEscalacor").value + |