Commit 33587442cca584562165d51343d2adf10ce52f0c

Authored by Edmar Moretti
1 parent 4371b9c2
Exists in master

Adaptação da ferramenta legenda ao novo tipo de janela flutuante

classesphp/classe_alteraclasse.php
... ... @@ -143,7 +143,7 @@ class Alteraclasse
143 143 }
144 144 }
145 145 $this->layer->setMetaData("cache", "");
146   - return ("ok");
  146 + return true;
147 147 }
148 148  
149 149 /*
... ... @@ -180,7 +180,7 @@ class Alteraclasse
180 180 $cor->setRGB(255, 100, 100);
181 181 }
182 182 $this->layer->setMetaData("cache", "");
183   - return ("ok");
  183 + return true;
184 184 }
185 185  
186 186 /*
... ... @@ -202,7 +202,7 @@ class Alteraclasse
202 202 *
203 203 * $maxScales - lista com valores para maxscaledenom
204 204 */
205   - function alteraclasses($ids, $nomes, $exps, $base64 = "nao", $minScales = "", $maxScales = "")
  205 + function alteraclasses($ids, $nomes, $exps, $base64 = "nao", $minScales = "", $maxScales = "",$separador=";")
206 206 {
207 207 if ($base64 == "sim") {
208 208 //$ids = base64_decode($ids);
... ... @@ -210,14 +210,14 @@ class Alteraclasse
210 210 $exps = base64_decode($exps);
211 211 }
212 212 // prepara os arrays com os valores
213   - $ids = explode(";", $ids);
214   - $minScales = explode(";", $minScales);
215   - $maxScales = explode(";", $maxScales);
  213 + $ids = explode($separador, $ids);
  214 + $minScales = explode($separador, $minScales);
  215 + $maxScales = explode($separador, $maxScales);
216 216  
217 217 $nomes = $this->converteTexto($nomes);
218   - $nomes = explode(";", $nomes);
  218 + $nomes = explode($separador, $nomes);
219 219 $exps = mb_convert_encoding($exps, "ISO-8859-1", "UTF-8");
220   - $exps = explode(";", $exps);
  220 + $exps = explode($separador, $exps);
221 221 // pega os layers existentes no array ids e armazena no array t
222 222 $c = count($ids);
223 223 for ($i = 0; $i < $c; ++ $i) {
... ... @@ -269,6 +269,7 @@ class Alteraclasse
269 269 }
270 270 }
271 271 }
  272 + return true;
272 273 }
273 274  
274 275 /*
... ... @@ -328,9 +329,9 @@ class Alteraclasse
328 329 $classe->set("title", ($this->layer->name) . "+" . $i);
329 330 }
330 331 $this->layer->setMetaData("cache", "");
331   - return ("ok");
  332 + return true;
332 333 } else {
333   - return ("erro. Nenhum valor numerico no item");
  334 + return false;
334 335 }
335 336 }
336 337  
... ... @@ -430,9 +431,9 @@ class Alteraclasse
430 431 $classe->set("name", $nomeclasse);
431 432  
432 433 $this->layer->setMetaData("cache", "");
433   - return ("ok");
  434 + return true;
434 435 } else {
435   - return ("erro. Nenhum valor numerico no item");
  436 + return false;
436 437 }
437 438 }
438 439  
... ... @@ -499,9 +500,9 @@ class Alteraclasse
499 500 $classe->set("name", $nomeclasse);
500 501  
501 502 $this->layer->setMetaData("cache", "");
502   - return ("ok");
  503 + return true;
503 504 } else {
504   - return ("erro. Nenhum valor numerico no item");
  505 + return false;
505 506 }
506 507 }
507 508  
... ... @@ -635,9 +636,9 @@ class Alteraclasse
635 636 // $classe->set("title",($this->layer->name)."+".$i);
636 637 }
637 638 $this->layer->setMetaData("cache", "");
638   - return ("ok");
  639 + return true;
639 640 } else {
640   - return ("erro. Nenhum valor numerico no item");
  641 + return false;
641 642 }
642 643 }
643 644  
... ... @@ -723,9 +724,9 @@ class Alteraclasse
723 724 $ncor->setrgb(255, 255, 255);
724 725 }
725 726 $this->layer->setMetaData("cache", "");
726   - return ("ok");
  727 + return true;
727 728 } else {
728   - return ("erro. Nenhum valor numerico no item");
  729 + return false;
729 730 }
730 731 }
731 732  
... ... @@ -812,7 +813,7 @@ class Alteraclasse
812 813 // $c->set("title",$tema."+".$i);
813 814 }
814 815 $this->layer->setMetaData("cache", "");
815   - return ("ok");
  816 + return true;
816 817 }
817 818  
818 819 /*
... ... @@ -848,7 +849,7 @@ class Alteraclasse
848 849 return "erro";
849 850 }
850 851 $this->layer->moveclassup($idclasse);
851   - return ("ok");
  852 + return true;
852 853 }
853 854  
854 855 /*
... ... @@ -866,7 +867,7 @@ class Alteraclasse
866 867 return "erro";
867 868 }
868 869 $this->layer->moveclassdown($idclasse);
869   - return ("ok");
  870 + return true;
870 871 }
871 872  
872 873 /*
... ... @@ -956,10 +957,15 @@ class Alteraclasse
956 957 $estilo = $classe->getstyle($j);
957 958 $s = "STYLE geomtransform '$tipo' END";
958 959 $estilo->updateFromString($s);
  960 + $estilo->set("size",10);
  961 + if($tipo == "" || $tipo == "bbox"){
  962 + $estilo->updateFromString("symbol 0");
  963 + } else {
  964 + $estilo->set("symbolname","ponto");
  965 + }
959 966 }
960 967 }
961   - $this->layer->setMetaData("cache", "");
962   - return ("ok");
  968 + return true;
963 969 }
964 970  
965 971 /*
... ... @@ -1007,7 +1013,7 @@ class Alteraclasse
1007 1013 }
1008 1014 $this->layer->setMetaData("cache", "");
1009 1015  
1010   - return ("ok");
  1016 + return true;
1011 1017 }
1012 1018  
1013 1019 /*
... ... @@ -1041,7 +1047,7 @@ class Alteraclasse
1041 1047 $ncor->setrgb($c["r"], $c["g"], $c["b"]);
1042 1048 }
1043 1049 $this->layer->setMetaData("cache", "");
1044   - return ("ok");
  1050 + return true;
1045 1051 }
1046 1052  
1047 1053 /*
... ... @@ -1049,7 +1055,7 @@ class Alteraclasse
1049 1055 *
1050 1056 * Calcula o tamanho dos estilos das classes, alterando o tamanho do s&iacute;mbolo.
1051 1057 */
1052   - function calculaTamanhoClasses()
  1058 + function calculaTamanhoClasses($size=5)
1053 1059 {
1054 1060 if (! $this->layer) {
1055 1061 return "erro";
... ... @@ -1058,7 +1064,7 @@ class Alteraclasse
1058 1064 for ($i = 0; $i < $numclasses; ++ $i) {
1059 1065 $classe = $this->layer->getclass($i);
1060 1066 $estilo = $classe->getstyle(0);
1061   - $estilo->set("size", ($i + 1));
  1067 + $estilo->set("size", ($i + $size));
1062 1068 if ($estilo->symbolname == "") {
1063 1069 if ($this->layer->type == MS_LAYER_LINE) {
1064 1070 $estilo->set("symbolname", "linha");
... ... @@ -1072,7 +1078,7 @@ class Alteraclasse
1072 1078 }
1073 1079 }
1074 1080 $this->layer->setMetaData("cache", "");
1075   - return ("ok");
  1081 + return true;
1076 1082 }
1077 1083  
1078 1084 /*
... ... @@ -1103,7 +1109,7 @@ class Alteraclasse
1103 1109 $indice ++;
1104 1110 }
1105 1111 $this->layer->setMetaData("cache", "");
1106   - return ("ok");
  1112 + return true;
1107 1113 }
1108 1114  
1109 1115 /*
... ...
classesphp/classe_legenda.php
... ... @@ -678,7 +678,7 @@ class Legenda
678 678 $classe = $this->layer->getclass($classe);
679 679 $classe->deletestyle($estilo);
680 680 $this->layer->removeMetaData("cache");
681   - return "ok";
  681 + return true;
682 682 }
683 683  
684 684 /*
... ... @@ -719,6 +719,7 @@ class Legenda
719 719 $classe = $this->layer->getclass($classe);
720 720 $classe->movestyleup($estilo);
721 721 $this->layer->removeMetaData("cache");
  722 + return true;
722 723 }
723 724  
724 725 /*
... ... @@ -739,6 +740,7 @@ class Legenda
739 740 $classe = $this->layer->getclass($classe);
740 741 $classe->movestyledown($estilo);
741 742 $this->layer->removeMetaData("cache");
  743 + return true;
742 744 }
743 745  
744 746 /*
... ... @@ -1043,7 +1045,7 @@ class Legenda
1043 1045 $this->reSLD($this->arquivo, $this->nome, $sld);
1044 1046 }
1045 1047 $this->layer->setMetaData("cache", "");
1046   - return "ok";
  1048 + return true;
1047 1049 }
1048 1050  
1049 1051 /*
... ... @@ -1282,7 +1284,7 @@ class Legenda
1282 1284 }
1283 1285 }
1284 1286 $this->layer->setMetaData("cache", "");
1285   - return "ok";
  1287 + return true;
1286 1288 }
1287 1289  
1288 1290 function converte($texto)
... ...
classesphp/classe_temas.php
... ... @@ -134,10 +134,14 @@ $ext - (opcional) extens&amp;atilde;o geogr&amp;aacute;fica que ser&amp;aacute; aplicada ao
134 134 $this->arquivo = $map_file;
135 135 }
136 136  
137   - if(file_exists($locaplic."/funcoes_gerais.php"))
  137 + if(file_exists($locaplic."/funcoes_gerais.php")){
138 138 include_once($locaplic."/funcoes_gerais.php");
139   - else
  139 + include_once($locaplic."/classe_vermultilayer.php");
  140 + }
  141 + else {
140 142 include_once("funcoes_gerais.php");
  143 + include_once("classe_vermultilayer.php");
  144 + }
141 145  
142 146 $this->tema = $tema;
143 147 $this->v = versao();
... ... @@ -229,7 +233,7 @@ $lista - lista de processos separados por |
229 233 $this->layer->setMetaData("cache","");
230 234 }
231 235  
232   - return("ok");
  236 + return true;
233 237 }
234 238 /*
235 239 function: gravaImagemCorpo (depreciado)
... ... @@ -273,18 +277,17 @@ Temas poligonais s&amp;atilde;o transformados em lineares, e lineares em poligonais.
273 277 A mudan&ccedil;a &eacute; feita apenas na representa&ccedil;&atilde;o do layer.
274 278 */
275 279 function alteraRepresentacao(){
276   - $retorno = "ok";
  280 + $retorno = true;
277 281 foreach ($this->grupo as $l){
278   -
279 282 $l = $this->mapa->getlayerbyname($l);
280   - if (($l->type == 1) || ($l->type == MS_LAYER_LINE)){
  283 + if ($l->type == MS_LAYER_LINE){
281 284 $l->set("type",MS_LAYER_POLYGON);
282 285 }
283   - elseif (($l->type == 2) || ($l->type == MS_LAYER_POLYGON)){
  286 + elseif ($l->type == MS_LAYER_POLYGON){
284 287 $l->set("type",MS_LAYER_LINE);
285 288 }
286 289 if (($l->type < 1) || ($l->type > 2)){
287   - $retorno = "erro. O tipo desse tema nao pode ser alterado";
  290 + $retorno = false;
288 291 }
289 292 if ($this->layer){
290 293 $this->layer->setMetaData("cache","");
... ... @@ -1427,6 +1430,7 @@ Adiciona LABEL em uma classe de um tema
1427 1430 if ($this->layer){
1428 1431 $this->layer->setMetaData("cache","");
1429 1432 }
  1433 + return true;
1430 1434 }
1431 1435 function removeLabel($iclasse){
1432 1436 $classe = $this->layer->getclass($iclasse);
... ... @@ -1442,25 +1446,10 @@ Adiciona LABEL em uma classe de um tema
1442 1446 $label->removeBinding(0);
1443 1447 $classe->settext($texto);
1444 1448 }
1445   - /*
1446   - $nlabel = $classe->numlabels;
1447   - for($i=0;$i<$nlabel;$i++){
1448   - if($this->vi >= 60200){
1449   - $label = $classe->getLabel($i);
1450   - }
1451   - else{
1452   - $label = $classe->label;
1453   - }
1454   - $label->set("type",MS_TRUETYPE);
1455   - $label->set("font","arial");
1456   - $label->set("size",0);
1457   - $s = "CLASS LABEL TEXT '' END END";
1458   - $classe->updateFromString($s);
1459   - }
1460   - */
1461 1449 if ($this->layer){
1462 1450 $this->layer->setMetaData("cache","");
1463 1451 }
  1452 + return true;
1464 1453 }
1465 1454 function criaCluster ($group = "",$filter = "",$maxdistance=5,$region='rectangle',$buffer=0){
1466 1455 if($group != ""){
... ... @@ -1478,7 +1467,7 @@ Adiciona LABEL em uma classe de um tema
1478 1467 $cluster->updateFromString("CLUSTER $par END");
1479 1468 $this->layer->setMetaData("cache","");
1480 1469 $this->layer->setMetadata("tiles","NAO");
1481   - $this->layer->setMetadata("cortepixels",0);
  1470 + $this->layer->setMetadata("cortepixels",$buffer);
1482 1471 //apaga as classes pois nao fazem mais sentido
1483 1472 if($group == ""){
1484 1473 $numclasses = $this->layer->numclasses;
... ... @@ -1495,7 +1484,8 @@ Adiciona LABEL em uma classe de um tema
1495 1484 $novoestilo->set("symbolname","ponto");
1496 1485 $cor = $novoestilo->color;
1497 1486 $cor->setRGB(255,100,100);
1498   - }
  1487 + }
  1488 + return true;
1499 1489 }
1500 1490 function removeCluster(){
1501 1491 $cluster = $this->layer->cluster;
... ... @@ -1515,6 +1505,7 @@ Adiciona LABEL em uma classe de um tema
1515 1505 }
1516 1506 }
1517 1507 }
  1508 + return true;
1518 1509 }
1519 1510 function selecaoLimpa(){
1520 1511 //apaga o arquivo do i3geo com os ids selecionados
... ...
classesphp/mapa_openlayers.php
... ... @@ -138,6 +138,7 @@ if (isset($_GET[&quot;TileMatrix&quot;])) {
138 138  
139 139 $_GET["BBOX"] = $lon1 . " " . $lat1 . " " . $lon2 . " " . $lat2;
140 140 }
  141 +
141 142 $map_fileX = $_SESSION["map_file"];
142 143 //
143 144 // verifica se o request e OGC
... ...
classesphp/sani_request.php
... ... @@ -4,7 +4,7 @@ if (basename(__FILE__) == basename($_SERVER[&#39;SCRIPT_FILENAME&#39;])){
4 4 }
5 5  
6 6 //error_reporting(0);
7   -$bl = array("exec ","exec(","password","select","_decode","passthru","shell_exec","escapeshellarg","escapeshellcmd","proc_close","proc_open","dl","popen","contents","delete","drop","update","insert","system",";");
  7 +$bl = array("exec ","exec(","password","select","_decode","passthru","shell_exec","escapeshellarg","escapeshellcmd","proc_close","proc_open","popen","delete","drop","update","insert","system",";");
8 8 if (isset($_GET)){
9 9 foreach(array_keys($_GET) as $k) {
10 10 $k = str_ireplace($bl,"",$k);
... ...
ferramentas/legenda/dicionario.js
... ... @@ -80,7 +80,7 @@ i3GEOF.legenda.dicionario =
80 80 ],
81 81 'aplicaOpacidade' : [
82 82 {
83   - pt : "aplicar opacidade nas classes existente, variando de 10 at&eacute; 100",
  83 + pt : "Aplicar opacidade nas classes existente, variando de 10 at&eacute; 100",
84 84 en : "apply opacity to existing classes. Opacity ranges from 10 to 100",
85 85 es : "aplicar opacidad a las clases existentes. La opacidad a aplicar var&iacute;a entre 10 y 100"
86 86 }
... ... @@ -94,7 +94,7 @@ i3GEOF.legenda.dicionario =
94 94 ],
95 95 'variaCoresExtremos' : [
96 96 {
97   - pt : "escolher e aplicar as varia&ccedil;&otilde;es de cores, entre dois extremos, nas classes existentes",
  97 + pt : "Escolher e aplicar as varia&ccedil;&otilde;es de cores, entre dois extremos, nas classes existentes",
98 98 en : "select and apply color variations between two extremes to existing classes",
99 99 es : "seleccionar y aplicar las variaciones de color entre dos extremos en las clases existentes"
100 100 }
... ... @@ -129,7 +129,7 @@ i3GEOF.legenda.dicionario =
129 129 ],
130 130 'aplicaVariaCores' : [
131 131 {
132   - pt : "aplicar varia&ccedil;&otilde;es de cores, entre dois extremos, nas classes existentes",
  132 + pt : "Aplicar varia&ccedil;&otilde;es de cores, entre dois extremos, nas classes existentes",
133 133 en : "apply color variations between two extremes to existing classes",
134 134 es : "aplicar variaciones de color entre dos extremos en las clases existentes"
135 135 }
... ... @@ -150,7 +150,7 @@ i3GEOF.legenda.dicionario =
150 150 ],
151 151 'adicionaNovaClasse' : [
152 152 {
153   - pt : "adicionar uma nova classe na legenda",
  153 + pt : "Adicionar uma nova classe na legenda",
154 154 en : "add a new class on the legend",
155 155 es : "a&ntilde;adir una clase nueva en la leyenda"
156 156 }
... ... @@ -836,7 +836,7 @@ i3GEOF.legenda.dicionario =
836 836 ],
837 837 "ClusterBuffer" : [
838 838 {
839   - pt : "Dist&acirc;ncia em pixel, no entorno da extens&atilde;o geogr&aacute;fica do mapa ou dos tiles, se for o caso, que extende a &aacute;rea de pesuisa dos pontos para forma&ccedil;&atilde;o do agrupamento",
  839 + pt : "Dist&acirc;ncia em pixel, no entorno da extens&atilde;o geogr&aacute;fica do mapa ou dos tiles, se for o caso, que extende a &aacute;rea de pesquisa dos pontos para forma&ccedil;&atilde;o do agrupamento",
840 840 en : "Distance in pixel around the map extent or tiles (if applicable), which extends the area of points to create cluster",
841 841 es : "Distancia en p&iacute;xel alrededor de la extensi&oacute;n geogr&aacute;fica del mapa o de las teselas (si es el caso), que ampl&iacute;a el &aacute;rea de los puntos para la creaci&oacute;n de la agrupaci&oacute;n"
842 842 }
... ... @@ -952,5 +952,10 @@ i3GEOF.legenda.dicionario =
952 952 pt : "Cor do contorno",
953 953 en : "Outline color",
954 954 es : "Color del contorno"
955   - } ]
  955 + } ],
  956 + "autoSizeSymbol" : [ {
  957 + pt : "Valor utilizado para definir o tamanho dos s&iacute;mbolos na op&ccedil;&atilde;o 'varia textura ou tamanho'",
  958 + en : "",
  959 + es : ""
  960 + } ]
956 961 };
957 962 \ No newline at end of file
... ...
ferramentas/legenda/exec.php
... ... @@ -3,26 +3,79 @@ include_once (dirname(__FILE__) . &quot;/../safe2.php&quot;);
3 3 verificaBlFerramentas(basename(dirname(__FILE__)), $_SESSION["i3geoBlFerramentas"], false);
4 4 $retorno = "";
5 5 switch (strtoupper($_GET["funcao"])) {
6   - case "EDITALEGENDA":
7   - include_once (dirname(__FILE__) . "/../../classesphp/classe_legenda.php");
8   - $m = new Legenda($_SESSION["map_file"], $_SESSION["locaplic"], $_POST["tema"]);
9   - $retorno = $m->tabelaLegenda();
  6 + case "SALVAPARAMETROSAUTO":
  7 + $map = ms_newMapObj($_SESSION["map_file"]);
  8 + $layer = $map->getlayerbyname($_POST["tema"]);
  9 + $layer->setmetadata("classesitem", $_POST["classesitem"]);
  10 + $layer->setmetadata("classesnome", $_POST["classesnome"]);
  11 + $layer->setmetadata("classescor", $_POST["classescor"]);
  12 + $layer->setmetadata("classessimbolo", $_POST["classessimbolo"]);
  13 + $layer->setmetadata("classestamanho", $_POST["classestamanho"]);
  14 + $layer->setmetadata("palletefile", $_POST["palletefile"]);
  15 + $layer->setmetadata("palletestep", $_POST["palletestep"]);
  16 + $layer->setmetadata("cache", "nao");
  17 + $layer->setmetadata("TILES", "nao");
  18 + autoClasses($layer, $map, $_SESSION["locaplic"]);
  19 + $layer->setmetadata("classesnome", "");
  20 + $layer->setmetadata("palletefile", "");
  21 + $map->save($_SESSION["map_file"]);
  22 + ob_clean();
  23 + header("Content-type: application/json");
  24 + echo json_encode(true);
  25 + exit();
  26 + break;
  27 + case "PARAMETROSAUTO":
  28 + $map = ms_newMapObj($_SESSION["map_file"]);
  29 + $layer = $map->getlayerbyname($_POST["tema"]);
  30 + $retorno = array();
  31 + $retorno["classesitem"] = $layer->getmetadata("classesitem");
  32 + $retorno["classesnome"] = $layer->getmetadata("classesnome");
  33 + $retorno["classescor"] = $layer->getmetadata("classescor");
  34 + $retorno["classessimbolo"] = $layer->getmetadata("classessimbolo");
  35 + $retorno["classestamanho"] = $layer->getmetadata("classestamanho");
  36 + $retorno["palletefile"] = $layer->getmetadata("palletefile");
  37 + $retorno["palletestep"] = $layer->getmetadata("palletestep");
  38 + $sopen = $layer->open();
  39 + if ($sopen != MS_FAILURE) {
  40 + $items = $layer->getItems();
  41 + } else {
  42 + $items = array();
  43 + }
  44 + $retorno["colunas"] = implode(",", $items);
  45 + ob_clean();
  46 + header("Content-type: application/json");
  47 + echo json_encode($retorno);
  48 + exit();
  49 + break;
  50 + case "APLICARCLUSTER":
  51 + include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
  52 + $m = new Temas($_SESSION["map_file"], $_POST["tema"]);
  53 + $retorno = $m->criaCluster($_POST["group"], $_POST["filter"], $_POST["maxdistance"], $_POST["region"], $_POST["buffer"]);
  54 + $m->salva();
  55 + ob_clean();
  56 + if (! $retorno) {
  57 + header("HTTP/1.1 500 erro legenda nao disponivel");
  58 + } else {
  59 + header("Content-type: application/json");
  60 + echo json_encode($retorno);
  61 + }
  62 + exit();
  63 + break;
  64 + case "REMOVERCLUSTER":
  65 + include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
  66 + $m = new Temas($_SESSION["map_file"], $_POST["tema"]);
  67 + $l = $m->mapa->getlayerbyname($_POST["tema"]);
  68 + $retorno = $m->removeCluster();
  69 + $m->salva();
10 70 ob_clean();
11 71 if (! $retorno) {
12   - header ( "HTTP/1.1 500 erro legenda nao disponivel" );
  72 + header("HTTP/1.1 500 erro legenda nao disponivel");
13 73 } else {
14 74 header("Content-type: application/json");
15 75 echo json_encode($retorno);
16 76 }
17 77 exit();
18 78 break;
19   - /*
20   - * Valor: CONTAGEMCLASSE
21   - *
22   - * Acrescenta a contagem de elementos em cada classe.
23   - *
24   - * <Legenda->tabelaLegenda>
25   - */
26 79 case "CONTAGEMCLASSE":
27 80 // apresenta erro com palavras acentuadas
28 81 include_once (dirname(__FILE__) . "/../../classesphp/classe_legenda.php");
... ... @@ -31,21 +84,68 @@ switch (strtoupper($_GET[&quot;funcao&quot;])) {
31 84 $m->salva();
32 85 ob_clean();
33 86 if (! $retorno) {
34   - header ( "HTTP/1.1 500 erro legenda nao disponivel" );
  87 + header("HTTP/1.1 500 erro legenda nao disponivel");
  88 + } else {
  89 + header("Content-type: application/json");
  90 + echo json_encode($retorno);
  91 + }
  92 + exit();
  93 + break;
  94 + case "REMOVELABELCLASSE":
  95 + include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
  96 + $m = new Temas($_SESSION["map_file"], $_POST["tema"]);
  97 + $retorno = $m->removeLabel($_POST["classe"]);
  98 + $m->salva();
  99 + ob_clean();
  100 + if (! $retorno) {
  101 + header("HTTP/1.1 500 erro legenda nao disponivel");
  102 + } else {
  103 + header("Content-type: application/json");
  104 + echo json_encode($retorno);
  105 + }
  106 + exit();
  107 + break;
  108 + case "ADICIONALABELCLASSE":
  109 + include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
  110 + $m = new Temas($_SESSION["map_file"], $_POST["tema"]);
  111 + $l = $m->mapa->getlayerbyname($_POST["tema"]);
  112 + if (empty($_POST["item"])) {
  113 + $retorno = false;
  114 + } else {
  115 + $classe = $l->getclass($_POST["classe"]);
  116 + $retorno = $m->adicionaLabel($classe, $_POST["wrap"], $_POST["fonte"], $_POST["tamanho"], $_POST["angulo"], $_POST["fundo"], $_POST["sombra"], $_POST["cor"], $_POST["outlinecolor"], $_POST["shadowcolor"], $_POST["shadowsizex"], $_POST["shadowsizey"], $_POST["force"], $_POST["mindistance"], $_POST["minfeaturesize"], $_POST["offsetx"], $_POST["offsety"], $_POST["partials"], $_POST["position"], "[" . $_POST["item"] . "]");
  117 + $m->salva();
  118 + }
  119 + ob_clean();
  120 + if (! $retorno) {
  121 + header("HTTP/1.1 500 erro legenda nao disponivel");
35 122 } else {
36 123 header("Content-type: application/json");
37 124 echo json_encode($retorno);
38 125 }
39 126 exit();
40 127 break;
41   - case "ADICIONAOPACIDADE":
42   - include_once (dirname(__FILE__) . "/../../classesphp/classe_alteraclasse.php");
43   - $m = new Alteraclasse($_SESSION["map_file"], $_POST["tema"], "", $_POST["ext"]);
44   - $retorno = $m->adicionaopacidade();
  128 + case "ALTERAREPRESENTACAO":
  129 + include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
  130 + $m = new Temas($_SESSION["map_file"], $_POST["tema"]);
  131 + $retorno = $m->alteraRepresentacao();
45 132 $m->salva();
46 133 ob_clean();
47 134 if (! $retorno) {
48   - header ( "HTTP/1.1 500 erro legenda nao disponivel" );
  135 + header("HTTP/1.1 500 erro legenda nao disponivel");
  136 + } else {
  137 + header("Content-type: application/json");
  138 + echo json_encode($retorno);
  139 + }
  140 + exit();
  141 + break;
  142 + case "EDITALEGENDA":
  143 + include_once (dirname(__FILE__) . "/../../classesphp/classe_legenda.php");
  144 + $m = new Legenda($_SESSION["map_file"], $_SESSION["locaplic"], $_POST["tema"]);
  145 + $retorno = $m->tabelaLegenda();
  146 + ob_clean();
  147 + if (! $retorno) {
  148 + header("HTTP/1.1 500 erro legenda nao disponivel");
49 149 } else {
50 150 header("Content-type: application/json");
51 151 echo json_encode($retorno);
... ... @@ -59,7 +159,7 @@ switch (strtoupper($_GET[&quot;funcao&quot;])) {
59 159 $m->salva();
60 160 ob_clean();
61 161 if (! $retorno) {
62   - header ( "HTTP/1.1 500 erro legenda nao disponivel" );
  162 + header("HTTP/1.1 500 erro legenda nao disponivel");
63 163 } else {
64 164 header("Content-type: application/json");
65 165 echo json_encode($retorno);
... ... @@ -73,7 +173,7 @@ switch (strtoupper($_GET[&quot;funcao&quot;])) {
73 173 $m->salva();
74 174 ob_clean();
75 175 if (! $retorno) {
76   - header ( "HTTP/1.1 500 erro legenda nao disponivel" );
  176 + header("HTTP/1.1 500 erro legenda nao disponivel");
77 177 } else {
78 178 header("Content-type: application/json");
79 179 echo json_encode($retorno);
... ... @@ -81,48 +181,21 @@ switch (strtoupper($_GET[&quot;funcao&quot;])) {
81 181 exit();
82 182 break;
83 183  
84   -
85   -
86   -
87   -
88   - case "PARAMETROSAUTO":
89   - $map = ms_newMapObj($map_file);
90   - $layer = $map->getlayerbyname($tema);
91   - $retorno = array();
92   - $retorno["classesitem"] = $layer->getmetadata("classesitem");
93   - $retorno["classesnome"] = $layer->getmetadata("classesnome");
94   - $retorno["classescor"] = $layer->getmetadata("classescor");
95   - $retorno["classessimbolo"] = $layer->getmetadata("classessimbolo");
96   - $retorno["classestamanho"] = $layer->getmetadata("classestamanho");
97   - $retorno["palletefile"] = $layer->getmetadata("palletefile");
98   - $retorno["palletestep"] = $layer->getmetadata("palletestep");
99   - $sopen = $layer->open();
100   - if ($sopen != MS_FAILURE) {
101   - $items = $layer->getItems();
  184 + case "APLICAPROCESSOS":
  185 + include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
  186 + $m = new Temas($_SESSION["map_file"], $_POST["tema"]);
  187 + $retorno = $m->aplicaProcessos($_POST["lista"]);
  188 + $m->salva();
  189 + ob_clean();
  190 + if (! $retorno) {
  191 + header("HTTP/1.1 500 erro legenda nao disponivel");
102 192 } else {
103   - $items = array();
  193 + header("Content-type: application/json");
  194 + echo json_encode($retorno);
104 195 }
105   - $retorno["colunas"] = implode(",", $items);
  196 + exit();
106 197 break;
107   - case "SALVAPARAMETROSAUTO":
108   - $map = ms_newMapObj($map_file);
109   - $layer = $map->getlayerbyname($tema);
110   - $layer->setmetadata("classesitem", $_GET["classesitem"]);
111   - $layer->setmetadata("classesnome", $_GET["classesnome"]);
112   - $layer->setmetadata("classescor", $_GET["classescor"]);
113   - $layer->setmetadata("classessimbolo", $_GET["classessimbolo"]);
114   - $layer->setmetadata("classestamanho", $_GET["classestamanho"]);
115   - $layer->setmetadata("palletefile", $_GET["palletefile"]);
116   - $layer->setmetadata("palletestep", $_GET["palletestep"]);
117   - $layer->setmetadata("cache", "nao");
118   - $layer->setmetadata("TILES", "nao");
119 198  
120   - autoClasses($layer, $map, $locaplic);
121   - $layer->setmetadata("classesnome", "");
122   - $layer->setmetadata("palletefile", "");
123   - $map->save($map_file);
124   - $retorno = "ok";
125   - break;
126 199 /*
127 200 * Valor: TEMA2SLD
128 201 *
... ... @@ -139,76 +212,5 @@ switch (strtoupper($_GET[&quot;funcao&quot;])) {
139 212 echo $m->sld();
140 213 exit();
141 214 break;
142   - /*
143   - * function: ADICIONALABELCLASSE
144   - *
145   - * Adiciona LABEL em uma classe de um layer
146   - *
147   - * <Temas->adicionaLabel>
148   - */
149   - case "ADICIONALABELCLASSE":
150   - include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
151   - $m = new Temas($map_file, $tema);
152   - $l = $m->mapa->getlayerbyname($tema);
153   - if (empty($_GET["item"])) {
154   - $retorno = "erro";
155   - } else {
156   - // $l->set("labelitem",$item);
157   - $novac = $l->getclass($_GET["classe"]);
158   - $m->adicionaLabel($novac, $_GET["wrap"], $_GET["fonte"], $_GET["tamanho"], $_GET["angulo"], $_GET["fundo"], $_GET["sombra"], $_GET["cor"], $_GET["outlinecolor"], $_GET["shadowcolor"], $_GET["shadowsizex"], $_GET["shadowsizey"], $_GET["force"], $_GET["mindistance"], $_GET["minfeaturesize"], $_GET["offsetx"], $_GET["offsety"], $_GET["partials"], $_GET["position"], "[" . $_GET["item"] . "]");
159   - $m->salva();
160   - $retorno = "ok";
161   - }
162   - break;
163   - /*
164   - * function: REMOVELABELCLASSE
165   - *
166   - * Remove LABEL em uma classe de um layer
167   - */
168   - case "REMOVELABELCLASSE":
169   - include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
170   - $m = new Temas($map_file, $tema);
171   - $m->removeLabel($_GET["classe"]);
172   - $m->salva();
173   - $retorno = "ok";
174   - break;
175   -
176   -
177   - /*
178   - * Valor: APLICATODASCLASSES
179   - *
180   - * Aplica um parametro a todas as classes
181   - */
182   - case "APLICATODASCLASSES":
183   - include_once (dirname(__FILE__) . "/../../classesphp/classe_legenda.php");
184   - $m = new Legenda($map_file, $locaplic, $tema);
185   - $r = $m->aplicaTodasClasses($_GET["parametro"], $_GET["valor"]);
186   - $m->salva();
187   - if (! $r) {
188   - $r = "erro.Erro legenda nao disponivel";
189   - }
190   - $retorno = $r;
191   - break;
192   - case "APLICARCLUSTER":
193   - include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
194   - $m = new Temas($map_file, $tema);
195   - $l = $m->mapa->getlayerbyname($tema);
196   - if ($filter != "") {
197   - // $filter = base64decode($filter);
198   - }
199   - $m->criaCluster($_GET["group"], $_GET["filter"], $_GET["maxdistance"], $_GET["region"], $_GET["buffer"]);
200   - $m->salva();
201   - $retorno = "ok";
202   - break;
203   - case "REMOVERCLUSTER":
204   - include_once (dirname(__FILE__) . "/../../classesphp/classe_temas.php");
205   - $m = new Temas($map_file, $tema);
206   - $l = $m->mapa->getlayerbyname($tema);
207   - $m->removeCluster();
208   - $m->salva();
209   - $retorno = "ok";
210   - break;
211   -
212   -
213 215 }
214 216 ?>
215 217 \ No newline at end of file
... ...
ferramentas/legenda/execclasses.php 0 → 100644
... ... @@ -0,0 +1,98 @@
  1 +<?php
  2 +include_once (dirname(__FILE__) . "/../safe2.php");
  3 +verificaBlFerramentas(basename(dirname(__FILE__)), $_SESSION["i3geoBlFerramentas"], false);
  4 +$retorno = "";
  5 +include_once (dirname(__FILE__) . "/../../classesphp/classe_alteraclasse.php");
  6 +if(!isset($_POST["ext"])){
  7 + $_POST["ext"] = "";
  8 +}
  9 +$m = new Alteraclasse($_SESSION["map_file"], $_POST["tema"], "", $_POST["ext"]);
  10 +switch (strtoupper($_GET["funcao"])) {
  11 + case "ADICIONAOPACIDADE":
  12 + $retorno = $m->adicionaopacidade();
  13 + $m->salva();
  14 + break;
  15 + case "ALTERACORESCLASSES":
  16 + $retorno = $m->alteraCoresClasses($_POST["cori"], $_POST["corf"]);
  17 + $m->salva();
  18 + break;
  19 + case "ALTERACLASSES":
  20 + $retorno = $m->alteraclasses($_POST["ids"], $_POST["nomes"], $_POST["exps"], $_POST["base64"], $_POST["minScales"], $_POST["maxScales"], $_POST["separador"]);
  21 + $m->salva();
  22 + break;
  23 + case "ADICIONACLASSE":
  24 + $retorno = $m->adicionaclasse();
  25 + $m->salva();
  26 + break;
  27 + case "INVERTECORESCLASSES":
  28 + $retorno = $m->inverteCoresClasses();
  29 + $m->salva();
  30 + break;
  31 + case "CALCULATAMANHOCLASSES":
  32 + $retorno = $m->calculaTamanhoClasses($_POST["size"]);
  33 + $m->salva();
  34 + break;
  35 + case "ORDENACLASSES":
  36 + $retorno = $m->ordenaClasses();
  37 + $m->salva();
  38 + break;
  39 + case "SOBECLASSE":
  40 + $retorno = $m->sobeclasse($_POST["idclasse"]);
  41 + $m->salva();
  42 + break;
  43 + case "DESCECLASSE":
  44 + $retorno = $m->desceclasse($_POST["idclasse"]);
  45 + $m->salva();
  46 + break;
  47 + case "APLICACORESRGB":
  48 + $cores = str_replace("rgb", "", $_POST["cores"]);
  49 + $cores = str_replace(")", "", $cores);
  50 + $cores = str_replace("(", "", $cores);
  51 + $retorno = $m->aplicacoresrgb(explode("|", $cores));
  52 + $m->salva();
  53 + break;
  54 + case "SIMBOLOUNICO":
  55 + $retorno = $m->simbolounico();
  56 + $m->salva();
  57 + break;
  58 + case "VALORUNICO":
  59 + $retorno = $m->valorunico($_POST["item"], $_POST["ignorar"], $_POST["itemNome"]);
  60 + $m->salva();
  61 + break;
  62 + case "NCLASSES":
  63 + $retorno = $m->intervalosiguais($_POST["item"], $_POST["nclasses"], $_POST["ignorar"]);
  64 + $m->salva();
  65 + break;
  66 + case "QUEBRASNATURAIS":
  67 + $retorno = $m->quebrasnaturais($_POST["item"], $_POST["nclasses"], $_POST["ignorar"]);
  68 + $m->salva();
  69 + break;
  70 + case "QUANTIL":
  71 + $retorno = $m->quantil($_POST["item"], $_POST["nclasses"], $_POST["ignorar"]);
  72 + $m->salva();
  73 + break;
  74 + case "METADE":
  75 + $retorno = $m->metade($_POST["item"], $_POST["itemid"], $_POST["ignorar"]);
  76 + $m->salva();
  77 + break;
  78 + case "MEDIA":
  79 + $retorno = $m->classemedia($_POST["item"], $_POST["ignorar"]);
  80 + $m->salva();
  81 + break;
  82 + case "QUARTIL":
  83 + $retorno = $m->quartis($_POST["item"], $_POST["ignorar"], $_POST["tipoLegenda"]);
  84 + $m->salva();
  85 + break;
  86 + case "ALTERAGEOMETRIA":
  87 + $retorno = $m->alterageometria($_POST["tipo"]);
  88 + $m->salva();
  89 + break;
  90 +}
  91 +ob_clean();
  92 +if (! $retorno) {
  93 + header("HTTP/1.1 500 erro legenda nao disponivel");
  94 +} else {
  95 + header("Content-type: application/json");
  96 + echo json_encode($retorno);
  97 +}
  98 +?>
0 99 \ No newline at end of file
... ...
ferramentas/legenda/execsymbol.php 0 → 100644
... ... @@ -0,0 +1,50 @@
  1 +<?php
  2 +include_once (dirname(__FILE__) . "/../safe2.php");
  3 +verificaBlFerramentas(basename(dirname(__FILE__)), $_SESSION["i3geoBlFerramentas"], false);
  4 +$retorno = "";
  5 +include_once (dirname(__FILE__) . "/../../classesphp/classe_legenda.php");
  6 +$m = new Legenda($_SESSION["map_file"], $_SESSION["locaplic"], $_POST["tema"]);
  7 +switch (strtoupper($_GET["funcao"])) {
  8 + case "APLICATODASCLASSES":
  9 + $retorno = $m->aplicaTodasClasses($_POST["parametro"], $_POST["valor"]);
  10 + $m->salva();
  11 + break;
  12 + case "APLICAPARAMETRO":
  13 + $retorno = $m->aplicaParametro($_POST["classe"], $_POST["estilo"], $_POST["outlinecolor"], $_POST["backgroundcolor"], $_POST["color"], $_POST["symbolname"], $_POST["size"], $_POST["opacidade"], $_POST["width"], $_POST["pattern"], $_POST["angle"], $_POST["minsize"], $_POST["maxsize"], $_POST["offsetx"], $_POST["offsety"]);
  14 + $m->salva();
  15 + break;
  16 + case "PARAMETROS":
  17 + $retorno = $m->pegaParametros($_POST["classe"]);
  18 + break;
  19 + case "SOBEESTILO":
  20 + $retorno = $m->sobeEstilo($_POST["classe"], $_POST["estilo"]);
  21 + $m->salva();
  22 + break;
  23 + case "DESCEESTILO":
  24 + $retorno = $m->desceEstilo($_POST["classe"], $_POST["estilo"]);
  25 + $m->salva();
  26 + break;
  27 + case "ADICIONAESTILO":
  28 + $retorno = $m->adicionaEstilo($_POST["classe"], $_POST["estilo"]);
  29 + $m->salva();
  30 + break;
  31 + case "EXCLUIESTILO":
  32 + $retorno = $m->excluiEstilo($_POST["classe"], $_POST["estilo"]);
  33 + $m->salva();
  34 + break;
  35 + case "LISTASIMBOLOS":
  36 + $retorno = $m->listaSimbolos($_POST["tipo"], $_SESSION["dir_tmp"], $_SESSION["imgdir"], $_POST["onclick"]);
  37 + if ($retorno == "") {
  38 + $retorno = $m->listaSimbolos($_POST["tipo"], $_SESSION["dir_tmp"], $_SESSION["imgdir"], $_POST["onclick"], 8, 1, true);
  39 + }
  40 + break;
  41 +}
  42 +ob_clean();
  43 +if (! $retorno) {
  44 + header("HTTP/1.1 500 erro legenda nao disponivel");
  45 +} else {
  46 + header("Content-type: application/json");
  47 + echo json_encode($retorno);
  48 +}
  49 +exit();
  50 +?>
0 51 \ No newline at end of file
... ...
ferramentas/legenda/index.js
... ... @@ -3,7 +3,7 @@ if (typeof (i3GEOF) === &#39;undefined&#39;) {
3 3 }
4 4 i3GEOF.legenda =
5 5 {
6   - parDefault : "&position=MS_UR&partials=1&offsetx=0&offsety=0&minfeaturesize=auto&mindistance=auto&force=0&shadowsizex=1&shadowsizey=1&cor=0 0 0&sombray=1&sombrax=1&angulo=0&tamanho=8&fonte=bitmap&fundo=off&sombra=off&outlinecolor=off&shadowcolor=off&wrap=",
  6 + parDefault : {position: "MS_UR", partials: 1, offsetx: 0, offsety: 0, minfeaturesize: "auto", mindistance: "auto", force: 0, shadowsizex: 1, shadowsizey: 1, cor: "0 0 0", sombray: 1, sombrax: 1, angulo: 0, tamanho: 8, fonte: "bitmap", fundo: "off", sombra: "off", outlinecolor: "off", shadowcolor: "off", wrap: "" },
7 7 aguarde : "",
8 8 templateDir : "../ferramentas/legenda",
9 9 aposIniciar : function(){
... ... @@ -98,7 +98,7 @@ i3GEOF.legenda =
98 98 };
99 99 $i("i3GEOlegendaguia8").onclick = function() {
100 100 i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia8", "i3GEOlegendaguia");
101   - i3GEOF.legenda.parametrosAuto();
  101 + i3GEOF.legenda.getParametrosAuto();
102 102 };
103 103  
104 104 $i("i3GEOlegendaguia6").onclick = function() {
... ... @@ -120,7 +120,6 @@ i3GEOF.legenda =
120 120 i3GEOF.legenda.mostralegenda();
121 121 i3GEOF.legenda.montaCombosItens();
122 122  
123   - i3GEO.janela.snackBar({content: $trad("clicaSimbolo",i3GEOF.legenda.dicionario)});
124 123 i3GEO.util.aplicaAquarela(p.idContainer);
125 124 i3GEOF.legenda.aposIniciar.call();
126 125 },
... ... @@ -133,59 +132,7 @@ i3GEOF.legenda =
133 132 + "&g_sid="
134 133 + i3GEO.configura.sid);
135 134 },
136   - propriedadesLabels: function() {
137   - i3GEO.util.scriptTag(
138   - i3GEO.configura.locaplic + "/ferramentas/opcoes_label/dependencias.php",
139   - "i3GEOF.proplabel.iniciaJanelaFlutuante(false)",
140   - "i3GEOFproplabel",
141   - false);
142   - },
143   - incluirLabels: function() {
144   - var par, p, temp, cp;
145   - try {
146   - par = i3GEOF.proplabel.pegaPar();
147   - i3GEOF.legenda.parDefault = par;
148   - } catch (e) {
149   - par = i3GEOF.legenda.parDefault;
150   - }
151   - i3GEOF.legenda.aguarde.visibility = "visible";
152   - temp = function() {
153   - i3GEOF.legenda.aguarde.visibility = "hidden";
154   - i3GEOF.legenda.aposAlterarLegenda();
155   - i3GEOF.legenda.aguarde.visibility = "hidden";
156   - };
157   - p =
158   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
159   - + i3GEO.configura.sid
160   - + "&funcao=adicionaLabelClasse&tema="
161   - + i3GEOF.legenda._parameters.tema
162   - + "&classe="
163   - + i3GEOF.legenda.classe
164   - + par;
165   - p += "&item=" + $i("i3GEOlegendaSelItemLabel").value;
166   - cp = new cpaint();
167   - cp.set_response_type("JSON");
168   - cp.call(p, "foo", temp);
169   - },
170   - excluiLabels: function() {
171   - var p, temp, cp;
172   - i3GEOF.legenda.aguarde.visibility = "visible";
173   - temp = function() {
174   - i3GEOF.legenda.aguarde.visibility = "hidden";
175   - i3GEOF.legenda.aposAlterarLegenda();
176   - i3GEOF.legenda.aguarde.visibility = "hidden";
177   - };
178   - p =
179   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
180   - + i3GEO.configura.sid
181   - + "&funcao=removeLabelClasse&tema="
182   - + i3GEOF.legenda._parameters.tema
183   - + "&classe="
184   - + i3GEOF.legenda.classe;
185   - cp = new cpaint();
186   - cp.set_response_type("JSON");
187   - cp.call(p, "foo", temp);
188   - },
  135 +
189 136 janelaCorRamp: function(){
190 137 i3GEO.util.abreColourRamp("", "listaColourRamp", i3GEO.arvoreDeCamadas.CAMADASINDEXADAS[i3GEOF.legenda._parameters.tema].numclasses, i3GEOF.legenda._parameters.tema);
191 138 },
... ... @@ -246,7 +193,7 @@ i3GEOF.legenda =
246 193 cliqueExclui: $trad('cliqueExclui', i3f.dicionario),
247 194 cliqueAltera: $trad('cliqueAltera', i3f.dicionario),
248 195 imagem: data[i].imagem,
249   - id: data[i].tema + "-" + data[i].idclasse,
  196 + id: data[i].idclasse,
250 197 idclasse: data[i].idclasse,
251 198 novoNome: $trad('digitaNovoNome', i3f.dicionario),
252 199 nome: data[i].nomeclasse,
... ... @@ -310,50 +257,57 @@ i3GEOF.legenda =
310 257 i3GEO.janela.snackBar({content: "erro", style:'red'});
311 258 }
312 259 },
313   - /*
314   - * Function: adicionaConta
315   - *
316   - * Adiciona ao nome de cada classe o n&uacute;mero de ocorr&ecirc;ncias em cada uma
317   - *
318   - */
319   - adicionaConta : function(btn) {
  260 + post: function({btn = false, par = {}, refresh = false, prog = "exec", fn = false} = {}){
320 261 var p = this._parameters,
321   - i3f = this,
322   - par = {
323   - funcao: "contagemclasse",
324   - g_sid: i3GEO.configura.sid,
325   - tema: p.tema
326   - };
  262 + i3f = this;
327 263 i3GEO.janela.abreAguarde();
328   - btn = $(btn);
329   - btn.prop("disabled",true).find("span").removeClass("hidden");
  264 + if(btn){
  265 + btn = $(btn);
  266 + btn.prop("disabled",true).find("span .glyphicon").removeClass("hidden");
  267 + }
330 268 i3GEO.janela._formModal.block();
331 269 $.post(
332   - i3GEO.configura.locaplic+"/ferramentas/" + i3f._parameters.namespace + "/exec.php",
  270 + i3GEO.configura.locaplic+"/ferramentas/" + i3f._parameters.namespace + "/" + prog + ".php",
333 271 par
334 272 )
335 273 .done(
336 274 function(data, status){
337 275 i3GEO.janela._formModal.unblock();
338 276 i3GEO.janela.fechaAguarde();
339   - btn.prop("disabled",false).find("span").addClass("hidden");
  277 + if(btn){
  278 + btn.prop("disabled",false).find("span .glyphicon").addClass("hidden");
  279 + }
340 280 i3GEO.janela.snackBar({content: $trad('feito')});
  281 + if(refresh){
  282 + i3GEOF.legenda.aposAlterarLegenda();
  283 + i3GEOF.legenda.mostralegenda();
  284 + }
  285 + if(fn){
  286 + fn(data);
  287 + }
341 288 }
342 289 )
343 290 .fail(
344 291 function(data){
345 292 i3GEO.janela._formModal.unblock();
346 293 i3GEO.janela.fechaAguarde();
347   - btn.prop("disabled",false).find("span").addClass("hidden");
  294 + if(btn){
  295 + btn.prop("disabled",false).find("span .glyphicon").addClass("hidden");
  296 + }
348 297 i3GEO.janela.snackBar({content: data.statusText, style:'red'});
349 298 }
350 299 );
351 300 },
352   - /*
353   - * Function: adicionaOpacidade
354   - *
355   - * Adiciona opacidade vari&aacute;vel em cada classe
356   - */
  301 + adicionaConta : function(btn) {
  302 + var p = this._parameters,
  303 + i3f = this,
  304 + par = {
  305 + funcao: "contagemclasse",
  306 + g_sid: i3GEO.configura.sid,
  307 + tema: p.tema
  308 + };
  309 + i3f.post({btn: btn, par: par, refresh: false, prog: "exec"});
  310 + },
357 311 adicionaOpacidade : function(btn) {
358 312 var p = this._parameters,
359 313 i3f = this,
... ... @@ -363,32 +317,7 @@ i3GEOF.legenda =
363 317 tema: p.tema,
364 318 ext: i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten)
365 319 };
366   - i3GEO.janela.abreAguarde();
367   - btn = $(btn);
368   - btn.prop("disabled",true).find("span").removeClass("hidden");
369   - i3GEO.janela._formModal.block();
370   - $.post(
371   - i3GEO.configura.locaplic+"/ferramentas/" + i3f._parameters.namespace + "/exec.php",
372   - par
373   - )
374   - .done(
375   - function(data, status){
376   - i3GEO.janela._formModal.unblock();
377   - i3GEO.janela.fechaAguarde();
378   - btn.prop("disabled",false).find("span").addClass("hidden");
379   - i3GEO.janela.snackBar({content: $trad('feito')});
380   - i3GEOF.legenda.aposAlterarLegenda();
381   - i3GEOF.legenda.mostralegenda();
382   - }
383   - )
384   - .fail(
385   - function(data){
386   - i3GEO.janela._formModal.unblock();
387   - i3GEO.janela.fechaAguarde();
388   - btn.prop("disabled",false).find("span").addClass("hidden");
389   - i3GEO.janela.snackBar({content: data.statusText, style:'red'});
390   - }
391   - );
  320 + i3f.post({btn: btn, par: par, refresh: true, prog: "execclasses"});
392 321 },
393 322 aplicaLegendaImg : function(btn) {
394 323 var p = this._parameters,
... ... @@ -399,32 +328,7 @@ i3GEOF.legenda =
399 328 tema: p.tema,
400 329 imagem: $i("i3GEOlegendaImg").value
401 330 };
402   - i3GEO.janela.abreAguarde();
403   - btn = $(btn);
404   - btn.prop("disabled",true);
405   - i3GEO.janela._formModal.block();
406   - $.post(
407   - i3GEO.configura.locaplic+"/ferramentas/" + i3f._parameters.namespace + "/exec.php",
408   - par
409   - )
410   - .done(
411   - function(data, status){
412   - i3GEO.janela._formModal.unblock();
413   - i3GEO.janela.fechaAguarde();
414   - btn.prop("disabled",false);
415   - i3GEO.janela.snackBar({content: $trad('feito')});
416   - i3GEOF.legenda.aposAlterarLegenda();
417   - i3GEOF.legenda.mostralegenda();
418   - }
419   - )
420   - .fail(
421   - function(data){
422   - i3GEO.janela._formModal.unblock();
423   - i3GEO.janela.fechaAguarde();
424   - btn.prop("disabled",false);
425   - i3GEO.janela.snackBar({content: data.statusText, style:'red'});
426   - }
427   - );
  331 + i3f.post({btn: btn, par: par, refresh: true, prog: "exec"});
428 332 },
429 333 aplicarOffsite : function(btn) {
430 334 var p = this._parameters,
... ... @@ -435,122 +339,124 @@ i3GEOF.legenda =
435 339 tema: p.tema,
436 340 offsite: $i("i3GEOoffsite").value
437 341 };
438   - i3GEO.janela.abreAguarde();
439   - btn = $(btn);
440   - btn.prop("disabled",true);
441   - i3GEO.janela._formModal.block();
442   - $.post(
443   - i3GEO.configura.locaplic+"/ferramentas/" + i3f._parameters.namespace + "/exec.php",
444   - par
445   - )
446   - .done(
447   - function(data, status){
448   - i3GEO.janela._formModal.unblock();
449   - i3GEO.janela.fechaAguarde();
450   - btn.prop("disabled",false);
451   - i3GEO.janela.snackBar({content: $trad('feito')});
452   - i3GEOF.legenda.aposAlterarLegenda();
453   - i3GEOF.legenda.mostralegenda();
454   - }
455   - )
456   - .fail(
457   - function(data){
458   - i3GEO.janela._formModal.unblock();
459   - i3GEO.janela.fechaAguarde();
460   - btn.prop("disabled",false);
461   - i3GEO.janela.snackBar({content: data.statusText, style:'red'});
462   - }
463   - );
  342 + i3f.post({btn: btn, par: par, refresh: true, prog: "exec"});
464 343 },
465 344 paleta : function(btn) {
466   - try {
467   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
468   - return;
  345 + var p = this._parameters,
  346 + i3f = this,
  347 + par = {
  348 + funcao: "alteraCoresClasses",
  349 + g_sid: i3GEO.configura.sid,
  350 + tema: p.tema,
  351 + cori: $i("i3GEOlegendaacori").value,
  352 + corf: $i("i3GEOlegendaacorf").value
  353 + };
  354 + i3f.post({btn: btn, par: par, refresh: true, prog: "execclasses"});
  355 + },
  356 + getLegendParameters: function(){
  357 + var par = {},tabela = $i("i3GEOlegendalegenda"),
  358 + trs = tabela.getElementsByTagName("tr"),
  359 + minScales = [],
  360 + maxScales = [],
  361 + nomes = [],
  362 + exps = [],
  363 + ids = [],
  364 + t, nn, n, p, cp, temp;
  365 + for (t = 1; t < trs.length; t++) {
  366 + if (trs[t].childNodes) {
  367 + nn = trs[t].childNodes;
  368 + for (n = 0; n < nn.length; n++) {
  369 + if (nn && nn[n] && nn[n].childNodes && nn[n].getElementsByTagName) {
  370 + var isn = nn[n].getElementsByTagName("input");
  371 + if (isn && isn[0] != undefined) {
  372 + if (isn[0].name == "nome") {
  373 + nomes.push(isn[0].value);
  374 + temp = (isn[0].id).split("i3GEOlegendaid_");
  375 + ids.push(temp[1]);
  376 + }
  377 + if (isn[0].name == "expressao") {
  378 + exps.push(isn[0].value);
  379 + }
  380 + if (isn[0].name == "minScale") {
  381 + minScales.push(parseInt(isn[0].value, 10));
  382 + }
  383 + if (isn[0].name == "maxScale") {
  384 + maxScales.push(parseInt(isn[0].value, 10));
  385 + }
  386 + }
  387 + }
  388 + }
469 389 }
470   - i3GEOF.legenda.aguarde.visibility = "visible";
471   - var retornapaleta = function() {
472   - i3GEOF.legenda.aposAlterarLegenda();
473   - i3GEOF.legenda.aguarde.visibility = "hidden";
474   - i3GEOF.legenda.mostralegenda();
475   - }, ci = $i("i3GEOlegendaacori").value, cf = $i("i3GEOlegendaacorf").value, cp = new cpaint(), p =
476   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
477   - + i3GEO.configura.sid
478   - + "&funcao=alteraCoresClasses&tema="
479   - + i3GEOF.legenda._parameters.tema
480   - + "&cori="
481   - + ci
482   - + "&corf="
483   - + cf;
484   - cp.set_response_type("JSON");
485   - cp.call(p, "alteraCoresClasses", retornapaleta);
486   - } catch (e) {
487   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
488   - i3GEOF.legenda.aguarde.visibility = "hidden";
489 390 }
  391 + par = {
  392 + ids: ids.join("|"),
  393 + nomes: nomes.join("|"),
  394 + exps: exps.join("|"),
  395 + minScales: minScales.join(";"),
  396 + maxScales: maxScales.join("|"),
  397 + g_sid: i3GEO.configura.sid,
  398 + ext: i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten),
  399 + separador: "|"
  400 + };
  401 + return par;
490 402 },
491   -
492   -
493   -
494   -
495   -
496   -
497   - filtro : function(idRetorno) {
498   - i3GEO.tema.dialogo.filtro(i3GEOF.legenda._parameters.tema, true, idRetorno);
  403 + mudaLegenda : function(btn) {
  404 + var p = this._parameters,
  405 + i3f = this,
  406 + par = i3f.getLegendParameters();
  407 + par.funcao = "alteraclasses";
  408 + par.tema = p.tema;
  409 + i3f.post({btn: btn, par: par, refresh: true, prog: "execclasses"});
499 410 },
500   - /*
501   - * Function: aviso
502   - *
503   - * Mostra um i3GEO.janela.tempoMsga ao usu&aacute;rio quando um campo da tabela que cont&eacute;m os dados da legenda &eacute;
504   - * alterado
505   - *
506   - * O aviso &eacute; mostrado apenas uma vez
507   - */
508   - aviso : function() {
509   - if (i3GEOF.legenda._parameters.aviso == true) {
510   - i3GEO.janela.snackBar({content: $trad("msgAplicaAlteracao",i3GEOF.legenda.dicionario),style: "red"});
511   - i3GEOF.legenda._parameters.aviso == false;
512   - }
  411 + adicionaClasse : function(btn) {
  412 + var p = this._parameters,
  413 + i3f = this,
  414 + par = {
  415 + funcao: "adicionaclasse",
  416 + tema: p.tema,
  417 + g_sid: i3GEO.configura.sid
  418 + };
  419 + i3f.post({btn: btn, par: par, refresh: true, prog: "execclasses"});
513 420 },
514   - /*
515   - * Function: aplicaColourRamp
516   - *
517   - * Aplica nas classes da legenda as cores escolhidas no seletor de cores
518   - */
519   - aplicaColourRamp : function() {
520   - if ($i("listaColourRamp").value != "") {
521   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
522   - return;
523   - }
524   - i3GEOF.legenda.aguarde.visibility = "visible";
525   - var cores = $i("listaColourRamp").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), temp = function() {
526   - i3GEOF.legenda.aguarde.visibility = "hidden";
527   - i3GEOF.legenda.mostralegenda();
528   - i3GEOF.legenda.aposAlterarLegenda();
529   - }, p =
530   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
531   - + i3GEO.configura.sid
532   - + "&funcao=alteraclasse&opcao=aplicacoresrgb&ext="
533   - + ext
534   - + "&tema="
535   - + i3GEOF.legenda._parameters.tema, cp = new cpaint();
536   - cp.set_transfer_mode('POST');
537   - cp.set_response_type("JSON");
538   - cp.call(p, "foo", temp, "cores=" + cores);
539   - }
  421 + inverteCores : function() {
  422 + var p = this._parameters,
  423 + i3f = this,
  424 + par = {
  425 + funcao: "inverteCoresClasses",
  426 + tema: p.tema,
  427 + g_sid: i3GEO.configura.sid
  428 + };
  429 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
540 430 },
541   - /*
542   - * Function: corj
543   - *
544   - * Abre a janela para o usu&aacute;rio selecionar uma cor interativamente
545   - */
546   - corj : function(obj) {
547   - i3GEO.util.abreCor("", obj);
  431 + calculaTamanho : function() {
  432 + var p = this._parameters,
  433 + i3f = this,
  434 + par = {
  435 + funcao: "calculaTamanhoClasses",
  436 + tema: p.tema,
  437 + g_sid: i3GEO.configura.sid,
  438 + size: $i("i3GEOlegendaAutoSize").value
  439 + };
  440 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
  441 + },
  442 + ordenaClasses : function() {
  443 + var p = this._parameters,
  444 + i3f = this,
  445 + par = {
  446 + funcao: "ordenaClasses",
  447 + tema: p.tema,
  448 + g_sid: i3GEO.configura.sid
  449 + };
  450 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
  451 + },
  452 + excluilinhaf : function(id) {
  453 + var p = $i(id);
  454 + do {
  455 + p.removeChild(p.childNodes[0]);
  456 + } while (p.childNodes.length > 0);
  457 + p.parentNode.removeChild(p);
  458 + i3GEOF.legenda.mudaLegenda();
548 459 },
549   - /*
550   - * Function: modificaCor
551   - *
552   - * Modifica a cor de uma classe
553   - */
554 460 modificaCor : function(id) {
555 461 var obj = $i("tempCorLegenda");
556 462 if (!obj) {
... ... @@ -568,1209 +474,578 @@ i3GEOF.legenda =
568 474 i3GEO.util.abreCor("", "tempCorLegenda");
569 475 },
570 476 aplicaNovaCor : function(id) {
571   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
572   - return;
573   - }
574   - i3GEOF.legenda.aguarde.visibility = "visible";
  477 + i3GEO.janela.abreAguarde();
  478 + i3GEO.janela._formModal.block();
575 479 var retorna = function() {
  480 + i3GEO.janela.snackBar({content: $trad('feito')});
  481 + i3GEO.janela.fechaAguarde();
  482 + i3GEO.janela._formModal.unblock();
576 483 i3GEOF.legenda.aposAlterarLegenda();
577   - i3GEOF.legenda.aguarde.visibility = "hidden";
578 484 i3GEOF.legenda.mostralegenda();
579 485 };
580 486 i3GEO.php.aplicaCorClasseTema(retorna, i3GEOF.legenda._parameters.tema, id, $i("tempCorLegenda").value);
581 487 },
582   -
583   - /*
584   - * Function: mudaLegenda
585   - *
586   - * Altera a legenda conforme os valores existentes na tabela de propriedades (express&atilde;o e nome da classe)
587   - */
588   - mudaLegenda : function(btn) {
589   - i3GEOF.legenda._parameters.aviso = false;
590   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
591   - return;
592   - }
593   - i3GEOF.legenda.aguarde.visibility = "visible";
594   - try {
595   - var tabela = $i("i3GEOlegendalegenda"),
596   - trs = tabela.getElementsByTagName("tr"),
597   - minScales = [],
598   - maxScales = [],
599   - nomes = [],
600   - exps = [],
601   - ids = [],
602   - t, nn, n, p, cp, temp;
603   - for (t = 1; t < trs.length; t++) {
604   - if (trs[t].childNodes) {
605   - nn = trs[t].childNodes;
606   - for (n = 0; n < nn.length; n++) {
607   - if (nn && nn[n] && nn[n].childNodes && nn[n].getElementsByTagName) {
608   - var isn = nn[n].getElementsByTagName("input");
609   - if (isn && isn[0] != undefined) {
610   - if (isn[0].name == "nome") {
611   - nomes.push(isn[0].value);
612   - temp = (isn[0].id).split("i3GEOlegendaid_");
613   - ids.push(temp[1]);
614   - }
615   - if (isn[0].name == "expressao") {
616   - exps.push(isn[0].value);
617   - }
618   - if (isn[0].name == "minScale") {
619   - minScales.push(parseInt(isn[0].value, 10));
620   - }
621   - if (isn[0].name == "maxScale") {
622   - maxScales.push(parseInt(isn[0].value, 10));
623   - }
624   - }
625   - }
626   - }
  488 + filtro : function(idRetorno) {
  489 + i3GEO.tema.dialogo.filtro(i3GEOF.legenda._parameters.tema, true, idRetorno);
  490 + },
  491 + sobelinhaf : function(idclasse) {
  492 + var p = this._parameters,
  493 + i3f = this,
  494 + par = {
  495 + funcao: "sobeclasse",
  496 + tema: p.tema,
  497 + g_sid: i3GEO.configura.sid,
  498 + idclasse: idclasse
  499 + };
  500 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
  501 + },
  502 + descelinhaf : function(idclasse) {
  503 + var p = this._parameters,
  504 + i3f = this,
  505 + par = {
  506 + funcao: "desceclasse",
  507 + tema: p.tema,
  508 + g_sid: i3GEO.configura.sid,
  509 + idclasse: idclasse
  510 + };
  511 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
  512 + },
  513 + aplicaProcessos : function(btn) {
  514 + var p = this._parameters,
  515 + i3f = this,
  516 + par = {
  517 + funcao: "aplicaProcessos",
  518 + tema: p.tema,
  519 + g_sid: i3GEO.configura.sid,
  520 + idclasse: idclasse
  521 + },
  522 + lista = [], ipt, i;
  523 + if ($i("i3GEOlegendaprocessos").innerHTML != "") {
  524 + ipt = $i("i3GEOlegendaprocessos").getElementsByTagName("input");
  525 + for (i = 0; i < ipt.length; i++) {
  526 + if (ipt[i].value != "") {
  527 + lista.push(ipt[i].value);
627 528 }
628 529 }
629   - ids = ids.join(";");
630   - nomes = nomes.join(";");
631   - exps = exps.join(";");
632   - minScales = minScales.join(";");
633   - maxScales = maxScales.join(";");
634   - temp = function() {
635   - i3GEOF.legenda.aguarde.visibility = "hidden";
636   - i3GEOF.legenda.mostralegenda();
637   - i3GEOF.legenda.aposAlterarLegenda();
638   - i3GEOF.legenda.aguarde.visibility = "hidden";
  530 + }
  531 + par.lista = lista.join("|");
  532 + i3f.post({btn: btn, par: par, refresh: true, prog: "exec"});
  533 + },
  534 + corj : function(obj) {
  535 + i3GEO.util.abreCor("", obj);
  536 + },
  537 + aplicaColourRamp : function() {
  538 + if ($i("listaColourRamp").value != "") {
  539 + var p = this._parameters,
  540 + i3f = this,
  541 + par = {
  542 + funcao: "aplicacoresrgb",
  543 + tema: p.tema,
  544 + g_sid: i3GEO.configura.sid,
  545 + cores: $i("listaColourRamp").value,
  546 + ext: i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten)
639 547 };
640   - var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
641   - p =
642   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?"
643   - + "base64=sim"
644   - + "&g_sid="
645   - + i3GEO.configura.sid
646   - + "&funcao=alteraclasse"
647   - + "&opcao=alteraclasses"
648   - + "&ext="
649   - + ext;
650   - cp = new cpaint();
651   - cp.set_transfer_mode('POST');
652   - cp.set_response_type("JSON");
653   - cp.call(p, "alteraclassesPost", temp, "ids=" + ids
654   - + "&nomes="
655   - + i3GEO.util.base64encode(nomes)
656   - //+ nomes
657   - + "&exps="
658   - + i3GEO.util.base64encode(exps)
659   - //+ exps
660   - + "&minScales="
661   - + minScales
662   - + "&maxScales="
663   - + maxScales);
664   - } catch (e) {
665   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
666   - i3GEOF.legenda.aguarde.visibility = "hidden";
  548 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
  549 + }
  550 + },
  551 + aviso : function() {
  552 + if (i3GEOF.legenda._parameters.aviso == true) {
  553 + i3GEO.janela.snackBar({content: $trad("msgAplicaAlteracao",i3GEOF.legenda.dicionario),style: "red"});
  554 + i3GEOF.legenda._parameters.aviso == false;
667 555 }
668 556 },
669 557 /*
670   - * Function: alteraGeometria
  558 + * Function: simbolounico
671 559 *
672   - * Altera o tipo de representa&ccedil;&atilde;o geom&eacute;trica dos elementos de um layer
673   - *
674   - * Veja:
  560 + * Altera a leganda do tema para o tipo s&iacute;mbolo &uacute;nico
675 561 *
676   - * <ALTERACLASSE>
677 562 */
678   - alteraGeometriaTema : function() {
679   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
680   - return;
681   - }
682   - i3GEOF.legenda.aguarde.visibility = "visible";
683   - var retorna = function() {
684   - i3GEOF.legenda.aposAlterarLegenda();
685   - i3GEOF.legenda.aguarde.visibility = "hidden";
686   - i3GEOF.legenda.mostralegenda();
  563 + simbolounico : function() {
  564 + var p = this._parameters,
  565 + i3f = this,
  566 + par = {
  567 + funcao: "simbolounico",
  568 + tema: p.tema,
  569 + g_sid: i3GEO.configura.sid
687 570 };
688   - var p =
689   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
690   - + i3GEO.configura.sid
691   - + "&funcao=alteraclasse&opcao=alterageometria&tema="
692   - + i3GEOF.legenda._parameters.tema
693   - + "&tipo="
694   - + $i("i3GEOlegentaTipoGeo").value, cp = new cpaint();
695   - cp.set_response_type("JSON");
696   - cp.call(p, "", retorna);
  571 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
697 572 },
698 573 /*
699   - * Function: adicionaClasse
  574 + * Function: valorunico
700 575 *
701   - * Adiciona uma nova classe ao tema
702   - *
703   - * Veja:
  576 + * Altera a leganda do tema para o tipo valor &uacute;nico
704 577 *
705   - * <ALTERACLASSE>
706 578 */
707   - adicionaClasse : function() {
708   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
709   - return;
710   - }
711   - var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
712   - var p =
713   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
714   - + i3GEO.configura.sid
715   - + "&funcao=alteraclasse&opcao=adicionaclasse"
716   - + "&tema="
717   - + i3GEOF.legenda._parameters.tema
718   - + "&ext="
719   - + ext, cp = new cpaint();
720   - cp.set_response_type("JSON");
721   - cp.call(p, "alteraclasse", i3GEOF.legenda.mostralegenda);
722   - },
723   -
724   -
725   - /*
726   - * Function: inverteCores
727   - *
728   - * Inverte as cores utilizadas nos s&iacute;mbolos das classes
729   - *
730   - * Veja:
731   - *
732   - * <INVERTECORESCLASSES>
733   - */
734   - inverteCores : function() {
735   - try {
736   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
737   - return;
738   - }
739   - i3GEOF.legenda.aguarde.visibility = "visible";
740   - var retornapaleta = function() {
741   - i3GEOF.legenda.aposAlterarLegenda();
742   - i3GEOF.legenda.aguarde.visibility = "hidden";
743   - i3GEOF.legenda.mostralegenda();
744   - }, cp = new cpaint(), p =
745   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
746   - + i3GEO.configura.sid
747   - + "&funcao=inverteCoresClasses&tema="
748   - + i3GEOF.legenda._parameters.tema;
749   - cp.set_response_type("JSON");
750   - cp.call(p, "alteraCoresClasses", retornapaleta);
751   - } catch (e) {
752   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
753   - i3GEOF.legenda.aguarde.visibility = "hidden";
754   - }
755   - },
756   - /*
757   - * Function: calculaTamanho
758   - *
759   - * Muda o s&iacute;mbolo de cada classe aplicando tamanhos diferentes e lineares
760   - *
761   - * Veja:
762   - *
763   - * <CALCULATAMANHOCLASSES>
764   - */
765   - calculaTamanho : function() {
766   - try {
767   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
768   - return;
769   - }
770   - i3GEOF.legenda.aguarde.visibility = "visible";
771   - var retornapaleta = function() {
772   - i3GEOF.legenda.aposAlterarLegenda();
773   - i3GEOF.legenda.aguarde.visibility = "hidden";
774   - i3GEOF.legenda.mostralegenda();
775   - }, cp = new cpaint(), p =
776   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
777   - + i3GEO.configura.sid
778   - + "&funcao=calculaTamanhoClasses&tema="
779   - + i3GEOF.legenda._parameters.tema;
780   - cp.set_response_type("JSON");
781   - cp.call(p, "calculaTamanhoClasses", retornapaleta);
782   - } catch (e) {
783   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
784   - i3GEOF.legenda.aguarde.visibility = "hidden";
785   - }
786   - },
787   - /*
788   - * Function: ordenaClasses
789   - *
790   - * Ordena as classes pelo nome
791   - *
792   - */
793   - ordenaClasses : function() {
794   - try {
795   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
796   - return;
797   - }
798   - i3GEOF.legenda.aguarde.visibility = "visible";
799   - var retornapaleta = function() {
800   - i3GEOF.legenda.aposAlterarLegenda();
801   - i3GEOF.legenda.aguarde.visibility = "hidden";
802   - i3GEOF.legenda.mostralegenda();
803   - }, cp = new cpaint(), p =
804   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
805   - + i3GEO.configura.sid
806   - + "&funcao=ordenaClasses&tema="
807   - + i3GEOF.legenda._parameters.tema;
808   - cp.set_response_type("JSON");
809   - cp.call(p, "foo", retornapaleta);
810   - } catch (e) {
811   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
812   - i3GEOF.legenda.aguarde.visibility = "hidden";
813   - }
814   - },
815   - /*
816   - * Function: excluilinhaf
817   - *
818   - * Exclui uma linha da tabela de edi&ccedil;&atilde;o de classes da legendda
819   - */
820   - excluilinhaf : function(id) {
821   - var p = $i(id);
822   - do {
823   - p.removeChild(p.childNodes[0]);
824   - } while (p.childNodes.length > 0);
825   - p.parentNode.removeChild(p);
826   - i3GEOF.legenda.mudaLegenda();
827   - },
828   - /*
829   - * Function: sobelinhaf
830   - *
831   - * Sobe uma linha na tabela de edi&ccedil;&atilde;o de classes da legendda
832   - */
833   - sobelinhaf : function(idclasse) {
834   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
835   - return;
836   - }
837   - i3GEOF.legenda.aguarde.visibility = "visible";
838   - var p =
839   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
840   - + i3GEO.configura.sid
841   - + "&funcao=ALTERACLASSE&opcao=sobeclasse&tema="
842   - + i3GEOF.legenda._parameters.tema
843   - + "&idclasse="
844   - + idclasse, cp = new cpaint(), temp = function() {
845   - i3GEOF.legenda.aguarde.visibility = "hidden";
846   - i3GEOF.legenda.mostralegenda();
847   - };
848   - cp.set_response_type("JSON");
849   - cp.call(p, "foo", temp);
850   - },
851   - /*
852   - * Function: descelinhaf
853   - *
854   - * Desce uma linha na tabela de edi&ccedil;&atilde;o de classes da legendda
855   - */
856   - descelinhaf : function(idclasse) {
857   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
858   - return;
859   - }
860   - i3GEOF.legenda.aguarde.visibility = "visible";
861   - var p =
862   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
863   - + i3GEO.configura.sid
864   - + "&funcao=ALTERACLASSE&opcao=desceclasse&tema="
865   - + i3GEOF.legenda._parameters.tema
866   - + "&idclasse="
867   - + idclasse, cp = new cpaint(), temp = function() {
868   - i3GEOF.legenda.aguarde.visibility = "hidden";
869   - i3GEOF.legenda.mostralegenda();
  579 + valorunico : function() {
  580 + var p = this._parameters,
  581 + i3f = this,
  582 + par = {
  583 + funcao: "valorunico",
  584 + tema: p.tema,
  585 + g_sid: i3GEO.configura.sid,
  586 + ignorar: $i("i3GEOlegendaignorar").value,
  587 + item: $i("i3GEOlegendaitensValorUnico").getElementsByTagName("select")[0].value,
  588 + itemNome: $i("i3GEOlegendaClassesValorUnico").getElementsByTagName("select")[0].value,
  589 + ext: $i("i3GEOFlegendaaplicaextent").checked ? i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten) : i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal)
870 590 };
871   - ;
872   - cp.set_response_type("JSON");
873   - cp.call(p, "foo", temp);
  591 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
874 592 },
875 593 /*
876   - * Function: editaSimbolo
877   - *
878   - * Abre o editor de s&iacute;mbolos
  594 + * Function: nclasses
879 595 *
880   - * Veja:
  596 + * Altera a legenda do tema com um n&uacute;mero espec&iacute;fico de classes
881 597 *
882   - * <EDITASIMBOLO>
883 598 */
884   - editaSimbolo : function(id) {
885   - try {
886   - $i("i3GEOlegendaguia1obj").style.display = "none";
887   - $i("i3GEOlegendaguia3obj").style.display = "block";
888   - id = id.split("-");
889   - i3GEOF.legenda.classe = id[1];
890   - i3GEOF.legenda.formEditorSimbolo();
891   - i3GEOF.legenda.aguarde.visibility = "hidden";
892   - } catch (e) {
893   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
894   - i3GEOF.legenda.aguarde.visibility = "hidden";
895   - }
896   - },
897   - formEditorSimbolo : function() {
898   - var p =
899   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
900   - + i3GEO.configura.sid
901   - + "&funcao=editasimbolo&opcao=pegaparametros&tema="
902   - + i3GEOF.legenda._parameters.tema
903   - + "&classe="
904   - + i3GEOF.legenda.classe, cp = new cpaint();
905   - cp.set_response_type("JSON");
906   - cp.call(p, "pegaParametrosMapa", i3GEOF.legenda.montaEditor);
907   - },
908   - /*
909   - * Function: simbU
910   - *
911   - * Altera a leganda do tema para o tipo s&iacute;mbolo &uacute;nico
912   - *
913   - * Veja:
914   - *
915   - * <ALTERACLASSE>
916   - */
917   - simbU : function() {
918   - try {
919   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
920   - return;
921   - }
922   - i3GEOF.legenda.aguarde.visibility = "visible";
923   - var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
924   - var p =
925   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
926   - + i3GEO.configura.sid
927   - + "&funcao=alteraclasse&tema="
928   - + i3GEOF.legenda._parameters.tema
929   - + "&opcao=simbolounico&ext="
930   - + ext, cp = new cpaint(), fim = function() {
931   - i3GEOF.legenda.aposAlterarLegenda();
932   - i3GEOF.legenda.aguarde.visibility = "hidden";
933   - };
934   - cp.set_response_type("JSON");
935   - cp.call(p, "alteraclasse", fim);
936   - } catch (e) {
937   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
938   - i3GEOF.legenda.aguarde.visibility = "hidden";
  599 + nclasses : function(btn) {
  600 + var p = this._parameters,
  601 + i3f = this,
  602 + par = {
  603 + funcao: "nclasses",
  604 + tema: p.tema,
  605 + g_sid: i3GEO.configura.sid,
  606 + ignorar: $i("i3GEOlegendaignorar").value,
  607 + item: $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value,
  608 + nclasses: $i("i3GEOlegendanclasses").value,
  609 + ext: $i("i3GEOFlegendaaplicaextent").checked ? i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten) : i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal)
  610 + };
  611 + if(par.item == ""){
  612 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  613 + } else {
  614 + i3f.post({btn: true, par: par, refresh: true, prog: "execclasses"});
939 615 }
940 616 },
941 617 /*
942   - * Function: valorU
  618 + * Function: quebrasnaturais
943 619 *
944   - * Altera a leganda do tema para o tipo valor &uacute;nico
945   - *
946   - * Veja:
  620 + * Altera a legenda do tema por meio do calculo de quebras naturais
947 621 *
948   - * <ALTERACLASSE>
949 622 */
950   - valorU : function() {
951   - try {
952   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
953   - return;
954   - }
955   - var item = $i("i3GEOlegendaitensValorUnico").getElementsByTagName("select")[0].value, itemNome =
956   - $i("i3GEOlegendaClassesValorUnico").getElementsByTagName("select")[0].value, p =
957   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
958   - + i3GEO.configura.sid
959   - + "&funcao=alteraclasse&tema="
960   - + i3GEOF.legenda._parameters.tema
961   - + "&item="
962   - + item
963   - + "&itemNome="
964   - + itemNome
965   - + "&opcao=valorunico"
966   - + "&ignorar="
967   - + $i("i3GEOlegendaignorar").value, cp = new cpaint(), fim = function() {
968   - i3GEOF.legenda.aposAlterarLegenda();
969   - i3GEOF.legenda.aguarde.visibility = "hidden";
970   - };
971   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
972   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
973   - } else {
974   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
975   - }
976   -
977   - if (item == "") {
978   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
979   - return;
980   - }
981   - i3GEOF.legenda.aguarde.visibility = "visible";
982   - cp.set_response_type("JSON");
983   - cp.call(p, "alteraclasse", fim);
984   - } catch (e) {
985   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
986   - i3GEOF.legenda.aguarde.visibility = "hidden";
  623 + quebrasnaturais : function() {
  624 + var p = this._parameters,
  625 + i3f = this,
  626 + par = {
  627 + funcao: "quebrasnaturais",
  628 + tema: p.tema,
  629 + g_sid: i3GEO.configura.sid,
  630 + ignorar: $i("i3GEOlegendaignorar").value,
  631 + item: $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value,
  632 + nclasses: $i("i3GEOlegendanclasses").value,
  633 + ext: $i("i3GEOFlegendaaplicaextent").checked ? i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten) : i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal)
  634 + };
  635 + if(par.item == ""){
  636 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  637 + } else {
  638 + i3f.post({btn: true, par: par, refresh: true, prog: "execclasses"});
987 639 }
988 640 },
989 641 /*
990   - * Function: valorC
991   - *
992   - * Altera a leganda do tema com um n&uacute;mero espec&iacute;fico de classes
  642 + * Function: quantis
993 643 *
994   - * Veja:
  644 + * Altera a leganda do tema por meio do calculo de quantis
995 645 *
996   - * <ALTERACLASSE>
997 646 */
998   - valorC : function() {
999   - try {
1000   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1001   - return;
1002   - }
1003   - var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses =
1004   - $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1005   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1006   - + i3GEO.configura.sid
1007   - + "&funcao=alteraclasse&nclasses="
1008   - + nclasses
1009   - + "&tema="
1010   - + i3GEOF.legenda._parameters.tema
1011   - + "&item="
1012   - + item
1013   - + "&opcao=intervalosiguais&ignorar="
1014   - + $i("i3GEOlegendaignorar").value
1015   - + "&ext="
1016   - + ext, cp = new cpaint(), fim = function() {
1017   - i3GEOF.legenda.aposAlterarLegenda();
1018   - i3GEOF.legenda.aguarde.visibility = "hidden";
1019   - };
1020   - if (item == "") {
1021   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
1022   - return;
1023   - }
1024   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
1025   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1026   - } else {
1027   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
1028   - }
1029   - i3GEOF.legenda.aguarde.visibility = "visible";
1030   - cp.set_response_type("JSON");
1031   - cp.call(p, "alteraclasse", fim);
1032   - } catch (e) {
1033   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1034   - i3GEOF.legenda.aguarde.visibility = "hidden";
  647 + quantil : function() {
  648 + var p = this._parameters,
  649 + i3f = this,
  650 + par = {
  651 + funcao: "quantil",
  652 + tema: p.tema,
  653 + g_sid: i3GEO.configura.sid,
  654 + ignorar: $i("i3GEOlegendaignorar").value,
  655 + item: $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value,
  656 + nclasses: $i("i3GEOlegendanclasses").value,
  657 + ext: $i("i3GEOFlegendaaplicaextent").checked ? i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten) : i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal)
  658 + };
  659 + if(par.item == ""){
  660 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  661 + } else {
  662 + i3f.post({btn: true, par: par, refresh: true, prog: "execclasses"});
1035 663 }
1036 664 },
1037 665 /*
1038 666 * Function: metade
1039 667 *
1040 668 * Duas classes concentrando a soma das metades
1041   - *
1042   - * Veja:
1043   - *
1044   - * <ALTERACLASSE>
1045 669 */
1046 670 metade : function() {
1047   - try {
1048   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1049   - return;
1050   - }
1051   - var item = $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value,
1052   - itemid = $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value,
1053   - p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1054   - + i3GEO.configura.sid
1055   - + "&funcao=alteraclasse"
1056   - + "&tema="
1057   - + i3GEOF.legenda._parameters.tema
1058   - + "&item="
1059   - + item
1060   - + "&itemid="
1061   - + itemid
1062   - + "&opcao=metade&ignorar="
1063   - + $i("i3GEOlegendaignorar").value,
1064   - cp = new cpaint(),
1065   - fim = function() {
1066   - i3GEOF.legenda.aposAlterarLegenda();
1067   - i3GEOF.legenda.aguarde.visibility = "hidden";
1068   - };
1069   - if (item == "") {
1070   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
1071   - return;
1072   - }
1073   - if (itemid == "") {
1074   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
1075   - return;
1076   - }
1077   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
1078   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1079   - } else {
1080   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
1081   - }
1082   - i3GEOF.legenda.aguarde.visibility = "visible";
1083   - cp.set_response_type("JSON");
1084   - cp.call(p, "alteraclasse", fim);
1085   - } catch (e) {
1086   -
1087   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1088   - i3GEOF.legenda.aguarde.visibility = "hidden";
  671 + var p = this._parameters,
  672 + i3f = this,
  673 + par = {
  674 + funcao: "metade",
  675 + tema: p.tema,
  676 + g_sid: i3GEO.configura.sid,
  677 + ignorar: $i("i3GEOlegendaignorar").value,
  678 + item: $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value,
  679 + itemid: $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value,
  680 + ext: $i("i3GEOFlegendaaplicaextent").checked ? i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten) : i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal)
  681 + };
  682 + if(par.item == "" || par.itemid == ""){
  683 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  684 + } else {
  685 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
1089 686 }
1090 687 },
1091 688 /*
1092 689 * Function: media
1093 690 *
1094 691 * Duas classes considerando a media
1095   - *
1096   - * Veja:
1097   - *
1098   - * <ALTERACLASSE>
1099 692 */
1100 693 media : function() {
1101   - try {
1102   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1103   - return;
1104   - }
1105   - var item = $i("i3GEOlegendaitensMedia").getElementsByTagName("select")[0].value,
1106   - p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1107   - + i3GEO.configura.sid
1108   - + "&funcao=alteraclasse"
1109   - + "&tema="
1110   - + i3GEOF.legenda._parameters.tema
1111   - + "&item="
1112   - + item
1113   - + "&opcao=media&ignorar="
1114   - + $i("i3GEOlegendaignorar").value,
1115   - cp = new cpaint(),
1116   - fim = function() {
1117   - i3GEOF.legenda.aposAlterarLegenda();
1118   - i3GEOF.legenda.aguarde.visibility = "hidden";
1119   - };
1120   - if (item == "") {
1121   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
1122   - return;
1123   - }
1124   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
1125   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1126   - } else {
1127   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
1128   - }
1129   - i3GEOF.legenda.aguarde.visibility = "visible";
1130   - cp.set_response_type("JSON");
1131   - cp.call(p, "alteraclasse", fim);
1132   - } catch (e) {
1133   -
1134   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1135   - i3GEOF.legenda.aguarde.visibility = "hidden";
  694 + var p = this._parameters,
  695 + i3f = this,
  696 + par = {
  697 + funcao: "media",
  698 + tema: p.tema,
  699 + g_sid: i3GEO.configura.sid,
  700 + ignorar: $i("i3GEOlegendaignorar").value,
  701 + item: $i("i3GEOlegendaitensMedia").getElementsByTagName("select")[0].value,
  702 + ext: $i("i3GEOFlegendaaplicaextent").checked ? i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten) : i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal)
  703 + };
  704 + if(par.item == ""){
  705 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  706 + } else {
  707 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
1136 708 }
1137 709 },
1138 710 /*
1139   - * Function: valorQ
  711 + * Function: quartil
1140 712 *
1141 713 * Altera a leganda do tema claculando as classes pelo m&eacute;todo quartil
1142   - *
1143   - * Veja:
1144   - *
1145   - * <ALTERACLASSE>
1146   - */
1147   - valorQ : function() {
1148   - try {
1149   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1150   - return;
1151   - }
1152   - var item = $i("i3GEOlegendaitensValorQuartil").getElementsByTagName("select")[0].value, ext =
1153   - i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1154   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1155   - + i3GEO.configura.sid
1156   - + "&funcao=alteraclasse&tema="
1157   - + i3GEOF.legenda._parameters.tema
1158   - + "&item="
1159   - + item
1160   - + "&opcao=quartis&ignorar="
1161   - + $i("i3GEOlegendaignorar").value
1162   - + "&ext="
1163   - + ext
1164   - + "&tipoLegenda="
1165   - + $i("estiloClassesQuartis").value, cp = new cpaint(), fim = function() {
1166   - i3GEOF.legenda.aposAlterarLegenda();
1167   - i3GEOF.legenda.aguarde.visibility = "hidden";
1168   - };
1169   - if (item == "") {
1170   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
1171   - return;
1172   - }
1173   - i3GEOF.legenda.aguarde.visibility = "visible";
1174   - cp.set_response_type("JSON");
1175   - cp.call(p, "alteraclasse", fim);
1176   - } catch (e) {
1177   -
1178   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1179   - i3GEOF.legenda.aguarde.visibility = "hidden";
1180   - }
1181   - },
1182   - /*
1183   - * Function: valorQu
1184   - *
1185   - * Altera a leganda do tema por meio do calculo de quantis
1186   - *
1187   - * Veja:
1188   - *
1189   - * <ALTERACLASSE>
1190 714 */
1191   - valorQu : function() {
1192   - try {
1193   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1194   - return;
1195   - }
1196   - var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses =
1197   - $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1198   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1199   - + i3GEO.configura.sid
1200   - + "&funcao=alteraclasse&nclasses="
1201   - + nclasses
1202   - + "&tema="
1203   - + i3GEOF.legenda._parameters.tema
1204   - + "&item="
1205   - + item
1206   - + "&opcao=quantil&ignorar="
1207   - + $i("i3GEOlegendaignorar").value
1208   - + "&ext="
1209   - + ext, cp = new cpaint(), fim = function() {
1210   - i3GEOF.legenda.aposAlterarLegenda();
1211   - i3GEOF.legenda.aguarde.visibility = "hidden";
1212   - };
1213   - if (item == "") {
1214   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
1215   - return;
1216   - }
1217   - i3GEOF.legenda.aguarde.visibility = "visible";
1218   - cp.set_response_type("JSON");
1219   - cp.call(p, "alteraclasse", fim);
1220   - } catch (e) {
1221   -
1222   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1223   - i3GEOF.legenda.aguarde.visibility = "hidden";
  715 + quartil : function() {
  716 + var p = this._parameters,
  717 + i3f = this,
  718 + par = {
  719 + funcao: "quartil",
  720 + tema: p.tema,
  721 + g_sid: i3GEO.configura.sid,
  722 + tipoLegenda: $i("estiloClassesQuartis").value,
  723 + ignorar: $i("i3GEOlegendaignorar").value,
  724 + item: $i("i3GEOlegendaitensValorQuartil").getElementsByTagName("select")[0].value,
  725 + ext: $i("i3GEOFlegendaaplicaextent").checked ? i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten) : i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal)
  726 + };
  727 + if(par.item == ""){
  728 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  729 + } else {
  730 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
1224 731 }
1225 732 },
1226   - /*
1227   - * Function: valorQN
1228   - *
1229   - * Altera a legenda do tema por meio do calculo de quebras naturais
1230   - *
1231   - * Veja:
1232   - *
1233   - * <ALTERACLASSE>
1234   - */
1235   - valorQN : function() {
1236   - try {
1237   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1238   - return;
1239   - }
1240   - var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses =
1241   - $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1242   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1243   - + i3GEO.configura.sid
1244   - + "&funcao=alteraclasse&nclasses="
1245   - + nclasses
1246   - + "&tema="
1247   - + i3GEOF.legenda._parameters.tema
1248   - + "&item="
1249   - + item
1250   - + "&opcao=quebrasnaturais&ignorar="
1251   - + $i("i3GEOlegendaignorar").value
1252   - + "&ext="
1253   - + ext, cp = new cpaint(), fim = function() {
1254   - i3GEOF.legenda.aposAlterarLegenda();
1255   - i3GEOF.legenda.aguarde.visibility = "hidden";
1256   - };
1257   - if (item == "") {
1258   - i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
1259   - return;
1260   - }
1261   - i3GEOF.legenda.aguarde.visibility = "visible";
1262   - cp.set_response_type("JSON");
1263   - cp.call(p, "alteraclasse", fim);
1264   - } catch (e) {
1265   -
1266   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1267   - i3GEOF.legenda.aguarde.visibility = "hidden";
  733 + alteraGeometria : function() {
  734 + var p = this._parameters,
  735 + i3f = this,
  736 + par = {
  737 + funcao: "alteraGeometria",
  738 + tema: p.tema,
  739 + g_sid: i3GEO.configura.sid,
  740 + tipo: $i("i3GEOlegentaTipoGeo").value
  741 + };
  742 + if(par.item == ""){
  743 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  744 + } else {
  745 + i3f.post({btn: false, par: par, refresh: true, prog: "execclasses"});
1268 746 }
1269 747 },
1270   -
1271 748 /*
1272 749 * Function: representacao
1273 750 *
1274 751 * Altera o tipo de representa&ccedil;&atilde;o do tema (linear ou poligonoal)
1275 752 *
1276   - * Veja:
1277   - *
1278   - * <ALTERAREPRESENTACAO>
1279   - *
1280 753 */
1281 754 representacao : function() {
1282   - try {
1283   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1284   - return;
1285   - }
1286   - var p =
1287   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1288   - + i3GEO.configura.sid
1289   - + "&funcao=alterarepresentacao&tema="
1290   - + i3GEOF.legenda._parameters.tema, cp = new cpaint(), fim = function() {
1291   - i3GEOF.legenda.aposAlterarLegenda();
1292   - i3GEOF.legenda.aguarde.visibility = "hidden";
1293   - };
1294   - i3GEOF.legenda.aguarde.visibility = "visible";
1295   - cp.set_response_type("JSON");
1296   - cp.call(p, "alteraRepresentacao", fim);
1297   - } catch (e) {
1298   -
1299   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1300   - i3GEOF.legenda.aguarde.visibility = "hidden";
  755 + var p = this._parameters,
  756 + i3f = this,
  757 + par = {
  758 + funcao: "alterarepresentacao",
  759 + tema: p.tema,
  760 + g_sid: i3GEO.configura.sid
  761 + };
  762 + if(par.item == ""){
  763 + i3GEO.janela.snackBar({content: $trad("selecionaUmItem",i3GEOF.legenda.dicionario),style: "red"});
  764 + } else {
  765 + i3f.post({btn: false, par: par, refresh: true, prog: "exec"});
1301 766 }
1302 767 },
1303   - /*
1304   - * Function: montaEditor
1305   - *
1306   - * Monta o editor de s&iacute;mbolos quando o usu&aacute;rio clica em um s&iacute;mbolo na legenda
1307   - */
1308   - montaEditor : function(retorno) {
1309   - try {
1310   - i3GEO.util.comboItens(
1311   - "i3GEOlegendaSelItemLabel",
1312   - i3GEOF.legenda._parameters.tema,
1313   - function(retorno) {
1314   - if ($i("i3GEOlegendaitensLabel")) {
1315   - $i("i3GEOlegendaitensLabel").innerHTML = retorno.dados ;
1316   - }
1317   - },
1318   - "i3GEOlegendaitensLabel",
1319   - "",
1320   - "",
1321   - "",
1322   - "form-control"
1323   - );
1324   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1325   - return;
1326   - }
1327   - i3GEOF.legenda.aguarde.visibility = "visible";
1328   - if (retorno.data != undefined) {
1329   - var b, l, i, sct, combo, n;
1330   - retorno = retorno.data;
1331   - i3GEOF.legenda._parameters.estilos = retorno.split("|");
1332   - combo =
1333   - "<select id='i3GEOlegendaestilos' class='form-control' onchange=i3GEOF.legenda._parameters.estilo=this.value;i3GEOF.legenda.mostraEstilo(this.value)>";
1334   - n = i3GEOF.legenda._parameters.estilos.length;
1335   - for (i = 0; i < n; i++) {
1336   - l = i3GEOF.legenda._parameters.estilos[i].split("#");
1337   - sct = "<option value=" + l[1] + " />" + l[1] + "</option>";
1338   - combo += sct;
1339   - }
1340   - combo += "</select></div>";
1341   - $i("i3GEOlegendacomboestilos").innerHTML = combo;
1342   - $i("i3GEOlegendaestilos").value = i3GEOF.legenda._parameters.estilo;
1343   -
  768 + aplicaTodasClasses : function(parametro, id) {
  769 + var p = this._parameters,
  770 + i3f = this,
  771 + par = {
  772 + funcao: "aplicaTodasClasses",
  773 + tema: p.tema,
  774 + g_sid: i3GEO.configura.sid,
  775 + parametro: parametro,
  776 + valor: $i(id).value
1344 777  
1345   - i3GEOF.legenda.aguarde.visibility = "hidden";
1346   - i3GEOF.legenda.mostraEstilo(0);
1347   - } else {
1348   - $i("i3GEOlegendacomboestilos").innerHTML = "<p style=color:red >Erro<br>";
1349   - i3GEOF.legenda.aguarde.visibility = "hidden";
1350   - }
1351   - } catch (e) {
  778 + };
  779 + i3f.post({btn: false, par: par, refresh: true, prog: "execsymbol"});
  780 + },
  781 + aplicaEstilo : function() {
  782 + var p = this._parameters,
  783 + i3f = this,
  784 + par = {
  785 + funcao: "aplicaParametro",
  786 + tema: p.tema,
  787 + g_sid: i3GEO.configura.sid,
  788 + outlinecolor: $i("i3GEOlegendaoutlinecolor").value,
  789 + backgroundcolor: $i("i3GEOlegendabackgroundcolor").value,
  790 + color: $i("i3GEOlegendacolor").value,
  791 + symbolname: $i("i3GEOlegendasymbolname").value,
  792 + //simbolos: $i("i3GEOlegendasimbolos").getElementsByTagName("img"),
  793 + size: $i("i3GEOlegendasizes").value,
  794 + width: $i("i3GEOlegendawidth").value,
  795 + pattern: $i("i3GEOlegendapattern").value,
  796 + opacidade: $i("i3GEOlegendaopacidade").value,
  797 + angle: $i("i3GEOlegendaangulo").value,
  798 + symbolscale: $i("i3GEOlegendasymbolscale").value != "" ? parseInt($i("i3GEOlegendasymbolscale").value, 10) : -1,
  799 + minsize: $i("i3GEOlegendaminsize").value,
  800 + maxsize: $i("i3GEOlegendamaxsize").value,
  801 + offsetx: $i("i3GEOlegendaoffsetx").value,
  802 + offsety: $i("i3GEOlegendaoffsety").value,
  803 + classe: p.classe,
  804 + estilo: p.estilo
1352 805  
1353   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1354   - i3GEOF.legenda.aguarde.visibility = "hidden";
  806 + };
  807 + i3f.post({btn: false, par: par, refresh: true, prog: "execsymbol"});
  808 + },
  809 + editaSimbolo : function(id) {
  810 + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia3", "i3GEOlegendaguia");
  811 + i3GEOF.legenda._parameters.classe = id;
  812 + i3GEOF.legenda.formEditorSimbolo(id);
  813 + },
  814 + formEditorSimbolo : function(id) {
  815 + var p = this._parameters,
  816 + i3f = this,
  817 + par = {
  818 + funcao: "parametros",
  819 + tema: p.tema,
  820 + g_sid: i3GEO.configura.sid,
  821 + classe: id
  822 + };
  823 + i3f.post({fn: i3GEOF.legenda.montaEditor, btn: false, par: par, refresh: false, prog: "execsymbol"});
  824 + },
  825 + montaEditor : function(data) {
  826 + i3GEO.util.comboItens(
  827 + "i3GEOlegendaSelItemLabel",
  828 + i3GEOF.legenda._parameters.tema,
  829 + function(retorno) {
  830 + if ($i("i3GEOlegendaitensLabel")) {
  831 + $i("i3GEOlegendaitensLabel").innerHTML = retorno.dados ;
  832 + }
  833 + },
  834 + "i3GEOlegendaitensLabel",
  835 + "",
  836 + "",
  837 + "",
  838 + "form-control"
  839 + );
  840 + var b, l, i, sct, combo, n;
  841 + i3GEOF.legenda._parameters.estilos = data.split("|");
  842 + combo =
  843 + "<select id='i3GEOlegendaestilos' class='form-control' onchange=i3GEOF.legenda._parameters.estilo=this.value;i3GEOF.legenda.mostraEstilo(this.value)>";
  844 + n = i3GEOF.legenda._parameters.estilos.length;
  845 + for (i = 0; i < n; i++) {
  846 + l = i3GEOF.legenda._parameters.estilos[i].split("#");
  847 + sct = "<option value=" + l[1] + " />" + l[1] + "</option>";
  848 + combo += sct;
1355 849 }
  850 + combo += "</select></div>";
  851 + $i("i3GEOlegendacomboestilos").innerHTML = combo;
  852 + $i("i3GEOlegendaestilos").value = i3GEOF.legenda._parameters.estilo;
  853 + i3GEOF.legenda.mostraEstilo(0);
1356 854 },
1357 855 desceEstilo: function() {
1358   - try {
1359   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1360   - return;
1361   - }
1362   - i3GEOF.legenda.aguarde.visibility = "visible";
1363   - var p =
1364   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1365   - + i3GEO.configura.sid
1366   - + "&funcao=editasimbolo&opcao=desceestilo&tema="
1367   - + i3GEOF.legenda._parameters.tema
1368   - + "&classe="
1369   - + i3GEOF.legenda.classe
1370   - + "&estilo="
1371   - + i3GEOF.legenda._parameters.estilo, cp = new cpaint();
1372   - cp.set_response_type("JSON");
1373   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1374   - } catch (e) {
  856 + var p = this._parameters,
  857 + i3f = this,
  858 + par = {
  859 + funcao: "desceestilo",
  860 + tema: p.tema,
  861 + g_sid: i3GEO.configura.sid,
  862 + classe: p.classe,
  863 + estilo: p.estilo
1375 864  
1376   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1377   - i3GEOF.legenda.aguarde.visibility = "hidden";
1378   - }
  865 + };
  866 + i3f.post({fn: i3f.reMontaEditor, btn: true, par: par, refresh: false, prog: "execsymbol"});
1379 867 },
1380 868 sobeEstilo: function() {
1381   - try {
1382   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1383   - return;
1384   - }
1385   - i3GEOF.legenda.aguarde.visibility = "visible";
1386   - var p =
1387   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1388   - + i3GEO.configura.sid
1389   - + "&funcao=editasimbolo&opcao=sobeestilo&tema="
1390   - + i3GEOF.legenda._parameters.tema
1391   - + "&classe="
1392   - + i3GEOF.legenda.classe
1393   - + "&estilo="
1394   - + i3GEOF.legenda._parameters.estilo, cp = new cpaint();
1395   - cp.set_response_type("JSON");
1396   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1397   - } catch (e) {
  869 + var p = this._parameters,
  870 + i3f = this,
  871 + par = {
  872 + funcao: "sobeestilo",
  873 + tema: p.tema,
  874 + g_sid: i3GEO.configura.sid,
  875 + classe: p.classe,
  876 + estilo: p.estilo
1398 877  
1399   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1400   - i3GEOF.legenda.aguarde.visibility = "hidden";
1401   - }
  878 + };
  879 + i3f.post({fn: i3f.reMontaEditor, btn: true, par: par, refresh: false, prog: "execsymbol"});
1402 880 },
1403 881 adicionaEstilo: function() {
1404   - try {
1405   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1406   - return;
1407   - }
1408   - i3GEOF.legenda.aguarde.visibility = "visible";
1409   - var p =
1410   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1411   - + i3GEO.configura.sid
1412   - + "&funcao=editasimbolo&opcao=adicionaestilo&tema="
1413   - + i3GEOF.legenda._parameters.tema
1414   - + "&classe="
1415   - + i3GEOF.legenda.classe
1416   - + "&estilo="
1417   - + i3GEOF.legenda._parameters.estilo, cp = new cpaint();
1418   - cp.set_response_type("JSON");
1419   - i3GEOF.legenda._parameters.estilo = i3GEOF.legenda._parameters.estilo + 1;
1420   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1421   - } catch (e) {
1422   -
1423   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1424   - i3GEOF.legenda.aguarde.visibility = "hidden";
1425   - }
  882 + var p = this._parameters,
  883 + i3f = this,
  884 + par = {
  885 + funcao: "adicionaestilo",
  886 + tema: p.tema,
  887 + g_sid: i3GEO.configura.sid,
  888 + classe: p.classe,
  889 + estilo: p.estilo
  890 + };
  891 + p.estilo = p.estilo + 1;
  892 + i3f.post({fn: i3f.reMontaEditor, btn: true, par: par, refresh: false, prog: "execsymbol"});
1426 893 },
1427 894 excluiEstilo: function() {
1428   - try {
1429   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1430   - return;
1431   - }
1432   - i3GEOF.legenda.aguarde.visibility = "visible";
1433   - i3GEOF.legenda._parameters.estilo = 0;
1434   - var p =
1435   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1436   - + i3GEO.configura.sid
1437   - + "&funcao=editasimbolo&opcao=excluiestilo&tema="
1438   - + i3GEOF.legenda._parameters.tema
1439   - + "&classe="
1440   - + i3GEOF.legenda.classe
1441   - + "&estilo="
1442   - + i3GEOF.legenda._parameters.estilo, cp = new cpaint();
1443   - cp.set_response_type("JSON");
1444   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1445   - } catch (e) {
  895 + var p = this._parameters,
  896 + i3f = this,
  897 + par = {
  898 + funcao: "excluiestilo",
  899 + tema: p.tema,
  900 + g_sid: i3GEO.configura.sid,
  901 + classe: p.classe,
  902 + estilo: p.estilo
  903 + };
  904 + p.estilo = 0;
  905 + i3f.post({fn: i3f.reMontaEditor, btn: true, par: par, refresh: false, prog: "execsymbol"});
  906 + },
  907 + propriedadesLabels: function() {
  908 + i3GEO.util.scriptTag(
  909 + i3GEO.configura.locaplic + "/ferramentas/opcoes_label/dependencias.php",
  910 + "i3GEOF.proplabel.iniciaJanelaFlutuante(false)",
  911 + "i3GEOFproplabel",
  912 + false);
  913 + },
  914 + incluirLabels: function(btn) {
  915 + var p = this._parameters,
  916 + i3f = this,
  917 + par = i3f.parDefault;
1446 918  
1447   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1448   - i3GEOF.legenda.aguarde.visibility = "hidden";
  919 + if(i3GEOF.proplabel){
  920 + par = i3GEOF.proplabel.getParameters();
  921 + i3f.parDefault = par;
1449 922 }
  923 + par.funcao = "adicionaLabelClasse";
  924 + par.tema = p.tema;
  925 + par.g_sid = i3GEO.configura.sid;
  926 + par.classe = p.classe;
  927 + par.item = $i("i3GEOlegendaSelItemLabel").value;
  928 + i3f.post({btn: btn, par: par, refresh: true, prog: "exec"});
  929 + },
  930 + excluiLabels: function(btn) {
  931 + var p = this._parameters,
  932 + i3f = this,
  933 + par = {
  934 + funcao: "removeLabelClasse",
  935 + tema: p.tema,
  936 + g_sid: i3GEO.configura.sid,
  937 + classe: p.classe
  938 + };
  939 + i3f.post({btn: true, par: par, refresh: true, prog: "exec"});
1450 940 },
1451   - /*
1452   - * Function: mostraEstilo
1453   - *
1454   - * Mostra as propriedades de um estilo de um s&iacute;mbolo
1455   - */
1456 941 mostraEstilo : function() {
1457   - i3GEOF.legenda.aguarde.visibility = "visible";
1458   - try {
1459   - var linha, tipoLayer, d, p, cp, mustache = {};
1460   - //i3GEOF.legenda._parameters.estilo = e; // esta e uma variavel global
1461   - linha = i3GEOF.legenda._parameters.estilos[i3GEOF.legenda._parameters.estilo];
1462   - linha = linha.split("#");
1463   - tipoLayer = linha[0];
1464   - mustache = {
1465   - "voutlinecolor": linha[2],
1466   - "vcolor": linha[4],
1467   - "vbackgroundcolor": linha[3],
1468   - "vsize": linha[6],
1469   - "vwidth": linha[8],
1470   - "vpattern": linha[9],
1471   - "vopacity": linha[7],
1472   - "vangle": linha[10],
1473   - "vsymbolscale": linha[11],
1474   - "vminsize": linha[12],
1475   - "vmaxsize": linha[13],
1476   - "voffsetx": linha[14],
1477   - "voffsety": linha[15],
1478   - "vsymbolname": linha[5],
1479   - };
1480   -
1481   - ins = Mustache.render(
1482   - i3GEOF.legenda._parameters.mustacheestilo,
1483   - $.extend(
1484   - {},
1485   - mustache,
1486   - i3GEOF.legenda._parameters.objdicionario
1487   - )
1488   - );
1489   - $i("i3GEOlegendaParametrosEstilos").innerHTML = ins;
1490   -
1491   -
1492   - //preenche as listas de itens
1493   - i3GEO.util.comboItens(
1494   - "",
1495   - i3GEOF.legenda._parameters.tema, function(retorno) {
1496   - if ($i("i3GEOlegendaComboSize")) {
1497   - $i("i3GEOlegendaComboSize").innerHTML = retorno.dados.replace("id=''"," onchange='$i(\"i3GEOlegendasizes\").value = this.value'");
1498   - }
1499   - },
1500   - "",
1501   - "",
1502   - "",
1503   - "",
1504   - "form-control"
1505   - );
1506   -
1507   - i3GEO.util.aplicaAquarela("i3GEOlegendaParametrosEstilos");
1508   -
1509   - p =
1510   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1511   - + i3GEO.configura.sid
1512   - + "&funcao=editasimbolo&tipo="
1513   - + tipoLayer
1514   - + "&opcao=listaSimbolos&onclick=i3GEOF.legenda.aplicaSimbolo(this)";
1515   - cp = new cpaint();
1516   - cp.set_response_type("JSON");
1517   - cp.call(p, "editasimbolo", i3GEOF.legenda.listaSimbolos);
1518   - i3GEOF.legenda.aguarde.visibility = "hidden";
1519   - } catch (e) {
1520   - i3GEO.janela.snackBar({content: "Erro: " + i3GEOF.legenda._parameters.estilo, style: "red"});
1521   - i3GEOF.legenda.aguarde.visibility = "hidden";
1522   - }
  942 + var linha, tipoLayer, d, p, cp, mustache = {};
  943 + //i3GEOF.legenda._parameters.estilo = e; // esta e uma variavel global
  944 + linha = i3GEOF.legenda._parameters.estilos[i3GEOF.legenda._parameters.estilo];
  945 + linha = linha.split("#");
  946 + tipoLayer = linha[0];
  947 + mustache = {
  948 + "voutlinecolor": linha[2],
  949 + "vcolor": linha[4],
  950 + "vbackgroundcolor": linha[3],
  951 + "vsize": linha[6],
  952 + "vwidth": linha[8],
  953 + "vpattern": linha[9],
  954 + "vopacity": linha[7],
  955 + "vangle": linha[10],
  956 + "vsymbolscale": linha[11],
  957 + "vminsize": linha[12],
  958 + "vmaxsize": linha[13],
  959 + "voffsetx": linha[14],
  960 + "voffsety": linha[15],
  961 + "vsymbolname": linha[5],
  962 + };
  963 + ins = Mustache.render(
  964 + i3GEOF.legenda._parameters.mustacheestilo,
  965 + $.extend(
  966 + {},
  967 + mustache,
  968 + i3GEOF.legenda._parameters.objdicionario
  969 + )
  970 + );
  971 + $i("i3GEOlegendaParametrosEstilos").innerHTML = ins;
  972 + //preenche as listas de itens
  973 + i3GEO.util.comboItens(
  974 + "",
  975 + i3GEOF.legenda._parameters.tema, function(retorno) {
  976 + if ($i("i3GEOlegendaComboSize")) {
  977 + $i("i3GEOlegendaComboSize").innerHTML = retorno.dados.replace("id=''"," onchange='$i(\"i3GEOlegendasizes\").value = this.value'");
  978 + }
  979 + },
  980 + "",
  981 + "",
  982 + "",
  983 + "",
  984 + "form-control"
  985 + );
  986 + i3GEO.util.aplicaAquarela("i3GEOlegendaParametrosEstilos");
  987 + i3GEOF.legenda.post({btn: false, par: {
  988 + funcao: "listaSimbolos",
  989 + g_sid: i3GEO.configura.sid,
  990 + onclick: 'i3GEOF.legenda.aplicaSimbolo(this)',
  991 + tipo: tipoLayer
  992 + }, refresh: false, prog: "execsymbol", fn: i3GEOF.legenda.listaSimbolos});
1523 993 },
1524   - /*
1525   - * Function: listaSimbolos
1526   - *
1527   - * Monta a lista de s&iacute;mbolos com imagem
1528   - */
1529   - listaSimbolos : function(retorno) {
1530   - i3GEOF.legenda.aguarde.visibility = "visible";
1531   - try {
1532   - if (retorno.data != undefined) {
1533   - retorno = retorno.data;
1534   - $i("i3GEOlegendasimbolos").innerHTML = retorno;
1535   - } else {
1536   - $i("i3GEOlegendasimbolos").innerHTML = "<p style=color:red >Erro<br>";
1537   - }
1538   - i3GEOF.legenda.aguarde.visibility = "hidden";
1539   - } catch (e) {
1540   -
1541   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1542   - i3GEOF.legenda.aguarde.visibility = "hidden";
1543   - }
  994 + listaSimbolos : function(data) {
  995 + $i("i3GEOlegendasimbolos").innerHTML = data;
1544 996 },
1545   - /*
1546   - * Function: aplicaSimbolo
1547   - *
1548   - * Muda o valor do campo com o c&oacute;digo do s&iacute;mbolo escolhido
1549   - */
1550 997 aplicaSimbolo : function(s) {
1551 998 $i("i3GEOlegendasymbolname").value = s.title;
1552 999 },
1553   - /*
1554   - * Function: aplicaEstilo
1555   - *
1556   - * Aplica ao estilo as propriedades definidas
1557   - *
1558   - * Veja:
1559   - *
1560   - * <EDITASIMBOLO>
1561   - */
1562   - aplicaEstilo : function() {
1563   - try {
1564   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1565   - return;
1566   - }
1567   - i3GEOF.legenda.aguarde.visibility = "visible";
1568   - var i, p, cp, fim, outlinecolor = $i("i3GEOlegendaoutlinecolor").value, backgroundcolor =
1569   - $i("i3GEOlegendabackgroundcolor").value, color = $i("i3GEOlegendacolor").value, symbolname =
1570   - $i("i3GEOlegendasymbolname").value, simbolos = $i("i3GEOlegendasimbolos").getElementsByTagName("img"), valido = "nao", n =
1571   - simbolos.length, size = $i("i3GEOlegendasizes").value, width = $i("i3GEOlegendawidth").value, pattern =
1572   - $i("i3GEOlegendapattern").value, opacidade = $i("i3GEOlegendaopacidade").value, angle = $i("i3GEOlegendaangulo").value, symbolscale =
1573   - $i("i3GEOlegendasymbolscale").value, minsize = $i("i3GEOlegendaminsize").value, maxsize =
1574   - $i("i3GEOlegendamaxsize").value, offsetx = $i("i3GEOlegendaoffsetx").value, offsety = $i("i3GEOlegendaoffsety").value;
1575   - if (symbolscale != "") {
1576   - symbolscale = parseInt(symbolscale, 10);
1577   - } else {
1578   - symbolscale = -1;
1579   - }
1580   - for (i = 0; i < n; i++) {
1581   - if (simbolos[i].title == symbolname || symbolname == i) {
1582   - valido = "sim";
1583   - }
1584   - }
1585   - if (valido === "nao") {
1586   - // i3GEO.janela.tempoMsg("Nome do simbolo nao encontrado");
1587   - // i3GEOF.legenda.aguarde.visibility = "hidden";
1588   - // return;
1589   - }
1590   - p =
1591   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1592   - + i3GEO.configura.sid
1593   - + "&funcao=editasimbolo&opcao=aplica&tema="
1594   - + i3GEOF.legenda._parameters.tema
1595   - + "&classe="
1596   - + i3GEOF.legenda.classe
1597   - + "&estilo="
1598   - + i3GEOF.legenda._parameters.estilo
1599   - + "&outlinecolor="
1600   - + outlinecolor
1601   - + "&backgroundcolor="
1602   - + backgroundcolor
1603   - + "&color="
1604   - + color
1605   - + "&symbolname="
1606   - + symbolname
1607   - + "&width="
1608   - + width
1609   - + "&pattern="
1610   - + pattern
1611   - + "&size="
1612   - + size
1613   - + "&opacidade="
1614   - + opacidade
1615   - + "&angle="
1616   - + angle
1617   - + "&symbolscale="
1618   - + symbolscale
1619   - + "&minsize="
1620   - + minsize
1621   - + "&maxsize="
1622   - + maxsize
1623   - + "&offsetx="
1624   - + offsetx
1625   - + "&offsety="
1626   - + offsety;
1627   - cp = new cpaint();
1628   - fim = function() {
1629   - i3GEOF.legenda.aposAlterarLegenda();
1630   - i3GEOF.legenda.aguarde.visibility = "hidden";
1631   - i3GEOF.legenda.reMontaEditor();
1632   - };
1633   - // cp.set_debug(2)
1634   - cp.set_response_type("JSON");
1635   - cp.call(p, "editasimbolo", fim);
1636   - } catch (e) {
1637   -
1638   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1639   - i3GEOF.legenda.aguarde.visibility = "hidden";
1640   - }
1641   - },
1642   - /*
1643   - * Function: reMontaEditor
1644   - *
1645   - * Gera novamente o editor de s&iacute;mbolo ap&oacute;s ter sido feita alguma altera&ccedil;&atilde;o nos estilos
1646   - */
1647 1000 reMontaEditor : function() {
1648   - var id = i3GEOF.legenda._parameters.tema + "-" + i3GEOF.legenda.classe;
1649   - i3GEOF.legenda.editaSimbolo(id);
  1001 + i3GEOF.legenda.editaSimbolo(i3GEOF.legenda._parameters.classe);
  1002 + i3GEOF.legenda.aposAlterarLegenda();
1650 1003 },
1651   - /*
1652   - * Function: mostraGrafico
1653   - *
1654   - * Mostra um gr&aacute;fico com a contegem de elementos em caada classe
1655   - *
1656   - * Veja:
1657   - *
1658   - * <CONTAGEMCLASSE>
1659   - */
1660 1004 mostraGrafico : function() {
1661   - try {
1662   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1663   - return;
1664   - }
1665   - i3GEOF.legenda.aguarde.visibility = "visible";
1666   - var monta =
1667   - function(retorno) {
1668   - if (retorno.data && retorno.data[0].proc == "") {
1669   - var b, ins = [], i, re, t;
1670   - ins.push("<h4>" + $trad('numeroOcorrenciasClasses', i3GEOF.legenda.dicionario) + "</h4>");
1671   - ins.push("<table width=100% >");
1672   - i3GEOF.legenda._parameters.dadosGrafico = [
1673   - "n;x"
1674   - ];
1675   - if (retorno.data.length < 2) {
1676   - i3GEO.janela.snackBar({content: $trad("msgNumeroClasses",i3GEOF.legenda.dicionario),style: "red"});
1677   - i3GEOF.legenda.aguarde.visibility = "hidden";
1678   - return;
1679   - } else {
1680   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia4", "i3GEOlegendaguia");
1681   - }
1682   - for (i = 0; i < retorno.data.length; i++) {
1683   - id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; // layer+indice da classe
1684   - re = new RegExp("'", "g");
1685   - exp = (retorno.data[i].expressao).replace(re, '"');
1686   - ins.push("<tr><td style='text-align:left;border-bottom:0 none white' >" + retorno.data[i].nomeclasse
1687   - + "</td></tr>");
1688   - t = (retorno.data[i].nreg * 100) / retorno.data[i].totalreg;
1689   - ins.push("<tr><td style=text-align:left ><img height=15px width=" + t
1690   - + "% src='"
1691   - + retorno.data[i].imagem
1692   - + "' /></td></tr>");
1693   - i3GEOF.legenda._parameters.dadosGrafico.push(retorno.data[i].nomeclasse + ";" + retorno.data[i].nreg);
1694   - }
1695   - ins.push("</table><br>");
1696   - $i("i3GEOlegendaguia4obj").innerHTML = ins.join("");
1697   - } else {
1698   - $i("i3GEOlegendaguia4obj").innerHTML = "<p style=color:red >Erro<br>";
  1005 + var monta =
  1006 + function(data) {
  1007 + if (data && data[0].proc == "") {
  1008 + var b, ins = [], i, re, t;
  1009 + ins.push("<h4>" + $trad('numeroOcorrenciasClasses', i3GEOF.legenda.dicionario) + "</h4>");
  1010 + ins.push("<table width=100% >");
  1011 + i3GEOF.legenda._parameters.dadosGrafico = [
  1012 + "n;x"
  1013 + ];
  1014 + if (data.length < 2) {
  1015 + i3GEO.janela.snackBar({content: $trad("msgNumeroClasses",i3GEOF.legenda.dicionario),style: "red"});
  1016 + i3GEOF.legenda.aguarde.visibility = "hidden";
1699 1017 return;
  1018 + } else {
  1019 + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia4", "i3GEOlegendaguia");
1700 1020 }
1701   - i3GEOF.legenda.aguarde.visibility = "hidden";
1702   -
1703   - }, p =
1704   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1705   - + i3GEO.configura.sid
1706   - + "&funcao=contagemclasse&tema="
1707   - + i3GEOF.legenda._parameters.tema, cp = new cpaint();
1708   - // cp.set_debug(2)
1709   - cp.set_response_type("JSON");
1710   - cp.call(p, "cocontagemclasse", monta);
1711   - } catch (e) {
1712   -
1713   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1714   - i3GEOF.legenda.aguarde.visibility = "hidden";
1715   - }
1716   - },
1717   - iniciaGraficoPizza : function() {
1718   - var dados = {
1719   - "attributes" : {
1720   - "id" : ""
1721   - },
1722   - "data" : {
1723   - "dados" : i3GEOF.legenda._parameters.dadosGrafico
1724   - }
1725   - };
1726   - i3GEOF.graficointerativo1.tipo = "pizza_1";
1727   - i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados);
1728   - },
1729   - /*
1730   - * Function: aplicaProcessos
1731   - *
1732   - * Aplica processos de ajuste em imagens de sat&eacute;lite
1733   - *
1734   - * Veja:
1735   - *
1736   - * <APLICAPROCESSOS>
1737   - */
1738   - aplicaProcessos : function() {
1739   - try {
1740   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1741   - return;
1742   - }
1743   - i3GEOF.legenda.aguarde.visibility = "visible";
1744   - var lista = [], ipt, i, p, cp, temp;
1745   - if ($i("i3GEOlegendaprocessos").innerHTML != "") {
1746   - ipt = $i("i3GEOlegendaprocessos").getElementsByTagName("input");
1747   - for (i = 0; i < ipt.length; i++) {
1748   - if (ipt[i].value != "") {
1749   - lista.push(ipt[i].value);
1750   - }
  1021 + for (i = 0; i < data.length; i++) {
  1022 + id = data[i].tema + "-" + data[i].idclasse; // layer+indice da classe
  1023 + re = new RegExp("'", "g");
  1024 + exp = (data[i].expressao).replace(re, '"');
  1025 + ins.push("<tr><td style='text-align:left;border-bottom:0 none white' >" + data[i].nomeclasse
  1026 + + "</td></tr>");
  1027 + t = (data[i].nreg * 100) / data[i].totalreg;
  1028 + ins.push("<tr><td style=text-align:left ><img height=15px width=" + t
  1029 + + "% src='"
  1030 + + data[i].imagem
  1031 + + "' /></td></tr>");
  1032 + i3GEOF.legenda._parameters.dadosGrafico.push(data[i].nomeclasse + ";" + data[i].nreg);
1751 1033 }
  1034 + ins.push("</table><br>");
  1035 + $i("i3GEOlegendaguia4obj").innerHTML = ins.join("");
1752 1036 }
1753   - lista = lista.join("|");
1754   - temp = function() {
1755   - i3GEOF.legenda.aguarde.visibility = "hidden";
1756   - i3GEOF.legenda.mostralegenda();
1757   - i3GEOF.legenda.aposAlterarLegenda();
1758   - };
1759   - p =
1760   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1761   - + i3GEO.configura.sid
1762   - + "&funcao=aplicaProcessos&lista="
1763   - + lista
1764   - + "&tema="
1765   - + i3GEOF.legenda._parameters.tema;
1766   - cp = new cpaint();
1767   - cp.set_response_type("JSON");
1768   - cp.call(p, "aplicaProcessos", temp);
1769   - } catch (e) {
1770   -
1771   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1772   - i3GEOF.legenda.aguarde.visibility = "hidden";
1773   - }
  1037 + };
  1038 + i3GEOF.legenda.post({
  1039 + btn: false,
  1040 + par: {
  1041 + funcao: "contagemclasse",
  1042 + g_sid: i3GEO.configura.sid,
  1043 + tema: i3GEOF.legenda._parameters.tema,
  1044 + },
  1045 + refresh: false,
  1046 + prog: "exec",
  1047 + fn: monta
  1048 + });
1774 1049 },
1775 1050 /*
1776 1051 * Function: adicionaProcesso
... ... @@ -1780,68 +1055,41 @@ i3GEOF.legenda =
1780 1055 adicionaProcesso : function(s) {
1781 1056 $i("i3GEOlegendaprocessos").innerHTML += "<div class='form-group label-fixed condensed'><input value='" + s.value + "' class='form-control input-lg' type='text' /></div>";
1782 1057 },
1783   - aplicaTodasClasses : function(parametro, id) {
1784   - var valor = $i(id).value;
1785   - i3GEO.janela.confirma("Aplica " + parametro + " = " + valor + " ?", 300, $trad("x14"), "", function() {
1786   - var temp = function() {
1787   - // i3GEOF.legenda.mostralegenda();
  1058 + aplicarCluster : function(btn){
  1059 + var p = this._parameters,
  1060 + i3f = this,
  1061 + par = {
  1062 + funcao: "aplicarCluster",
  1063 + tema: p.tema,
  1064 + g_sid: i3GEO.configura.sid,
  1065 + maxdistance: $i("i3GEOlegendaClusterMaxdistance").value,
  1066 + buffer: $i("i3GEOlegendaClusterBuffer").value,
  1067 + filter: $i("i3GEOlegendaClusterFilter").value,
  1068 + region: $i("i3GEOlegendaClusterRegion").value,
  1069 + group: $i("i3GEOlegendaitensCluster").getElementsByTagName("select")[0].value,
  1070 +
  1071 + };
  1072 + i3f.post({
  1073 + fn: function() {
1788 1074 i3GEOF.legenda.aposAlterarLegenda();
1789   - }, p, cp;
1790   - p =
1791   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1792   - + i3GEO.configura.sid
1793   - + "&funcao=aplicaTodasClasses"
1794   - + "&parametro="
1795   - + parametro
1796   - + "&valor="
1797   - + valor
1798   - + "&tema="
1799   - + i3GEOF.legenda._parameters.tema;
1800   - cp = new cpaint();
1801   - cp.set_response_type("JSON");
1802   - cp.call(p, "foo", temp);
  1075 + i3GEOF.legenda.montaCombosItens();
  1076 + },btn: true, par: par, refresh: false, prog: "exec"
1803 1077 });
1804 1078 },
1805   - aplicarCluster : function(){
1806   - var temp = function() {
1807   - i3GEOF.legenda.aposAlterarLegenda();
1808   - i3GEOF.legenda.montaCombosItens();
1809   - }, p, cp;
1810   - p =
1811   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1812   - + i3GEO.configura.sid
1813   - + "&funcao=aplicarCluster"
1814   - + "&maxdistance="
1815   - + $i("i3GEOlegendaClusterMaxdistance").value
1816   - + "&buffer="
1817   - + $i("i3GEOlegendaClusterBuffer").value
1818   - + "&filter="
1819   - //+ i3GEO.util.base64encode($i("i3GEOlegendaClusterFilter").value)
1820   - + $i("i3GEOlegendaClusterFilter").value
1821   - + "&region="
1822   - + $i("i3GEOlegendaClusterRegion").value
1823   - + "&group="
1824   - + $i("i3GEOlegendaitensCluster").getElementsByTagName("select")[0].value
1825   - + "&tema="
1826   - + i3GEOF.legenda._parameters.tema;
1827   - cp = new cpaint();
1828   - cp.set_response_type("JSON");
1829   - cp.call(p, "foo", temp);
1830   - },
1831   - removerCluster : function(){
1832   - var temp = function() {
1833   - i3GEOF.legenda.montaCombosItens();
1834   - i3GEOF.legenda.aposAlterarLegenda();
1835   - }, p, cp;
1836   - p =
1837   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1838   - + i3GEO.configura.sid
1839   - + "&funcao=removerCluster"
1840   - + "&tema="
1841   - + i3GEOF.legenda._parameters.tema;
1842   - cp = new cpaint();
1843   - cp.set_response_type("JSON");
1844   - cp.call(p, "foo", temp);
  1079 + removerCluster : function(btn){
  1080 + var p = this._parameters,
  1081 + i3f = this,
  1082 + par = {
  1083 + funcao: "removerCluster",
  1084 + tema: p.tema,
  1085 + g_sid: i3GEO.configura.sid
  1086 + };
  1087 + i3f.post({
  1088 + fn: function() {
  1089 + i3GEOF.legenda.aposAlterarLegenda();
  1090 + i3GEOF.legenda.montaCombosItens();
  1091 + },btn: true, par: par, refresh: false, prog: "exec"
  1092 + });
1845 1093 },
1846 1094 montaCombosItens : function(){
1847 1095 i3GEO.util.comboItens(
... ... @@ -1880,56 +1128,43 @@ i3GEOF.legenda =
1880 1128 "form-control"
1881 1129 );
1882 1130 },
1883   - parametrosAuto : function() {
1884   - i3GEOF.legenda.aguarde.visibility = "visible";
1885   - var p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=parametrosauto&tema=" + i3GEOF.legenda._parameters.tema,
1886   - cp = new cpaint(),
1887   - temp = function(retorno){
1888   - try{
1889   - if(retorno.data !== ""){
1890   - $i("i3GEOlegendaAutocolunas").innerHTML = retorno.data.colunas.replace(/,/gi,', ');
1891   - $i("i3GEOlegendaAutoclassesitem").value = retorno.data.classesitem;
1892   - $i("i3GEOlegendaAutoclassesnome").value = retorno.data.classesnome;
1893   - $i("i3GEOlegendaAutoclassescor").value = retorno.data.classescor;
1894   - $i("i3GEOlegendaAutoclassessimbolo").value = retorno.data.classessimbolo;
1895   - $i("i3GEOlegendaAutoclassestamanho").value = retorno.data.classestamanho;
1896   - $i("i3GEOlegendaAutopalletefile").value = retorno.data.palletefile;
1897   - $i("i3GEOlegendaAutopalletestep").value = retorno.data.palletestep;
1898   - }
1899   - i3GEOF.legenda.aguarde.visibility = "hidden";
1900   - }catch(e){
1901   -
1902   - i3GEO.janela.snackBar({content: "Erro: " + e, style: "red"});
1903   - i3GEOF.legenda.aguarde.visibility = "hidden";
1904   - }
  1131 + getParametrosAuto : function() {
  1132 + var p = this._parameters,
  1133 + i3f = this,
  1134 + par = {
  1135 + funcao: "parametrosauto",
  1136 + tema: p.tema,
  1137 + g_sid: i3GEO.configura.sid
1905 1138 };
1906   - cp.set_response_type("JSON");
1907   - cp.call(p,"foo",temp);
  1139 + i3f.post({
  1140 + fn: function(data) {
  1141 + $i("i3GEOlegendaAutocolunas").innerHTML = data.colunas.replace(/,/gi,', ');
  1142 + $i("i3GEOlegendaAutoclassesitem").value = data.classesitem;
  1143 + $i("i3GEOlegendaAutoclassesnome").value = data.classesnome;
  1144 + $i("i3GEOlegendaAutoclassescor").value = data.classescor;
  1145 + $i("i3GEOlegendaAutoclassessimbolo").value = data.classessimbolo;
  1146 + $i("i3GEOlegendaAutoclassestamanho").value = data.classestamanho;
  1147 + $i("i3GEOlegendaAutopalletefile").value = data.palletefile;
  1148 + $i("i3GEOlegendaAutopalletestep").value = data.palletestep;
  1149 + },btn: false, par: par, refresh: false, prog: "exec"
  1150 + });
1908 1151 },
1909   - salvaParametrosAuto: function(){
1910   - if(i3GEOF.legenda.aguarde.visibility === "visible"){
1911   - return;
1912   - }
1913   - i3GEOF.legenda.aguarde.visibility = "visible";
1914   - var temp,
1915   - p,
1916   - cp;
1917   - temp = function(){
1918   - i3GEOF.legenda.aguarde.visibility = "hidden";
1919   - i3GEOF.legenda.aposAlterarLegenda();
  1152 + salvaParametrosAuto: function(btn){
  1153 + var p = this._parameters,
  1154 + i3f = this,
  1155 + par = {
  1156 + funcao: "salvaparametrosauto",
  1157 + tema: p.tema,
  1158 + g_sid: i3GEO.configura.sid,
  1159 + classesitem: $i("i3GEOlegendaAutoclassesitem").value,
  1160 + classesnome: $i("i3GEOlegendaAutoclassesnome").value,
  1161 + classescor: $i("i3GEOlegendaAutoclassescor").value,
  1162 + classessimbolo: $i("i3GEOlegendaAutoclassessimbolo").value,
  1163 + classestamanho: $i("i3GEOlegendaAutoclassestamanho").value,
  1164 + palletefile: $i("i3GEOlegendaAutopalletefile").value,
  1165 + palletestep: $i("i3GEOlegendaAutopalletestep").value
1920 1166 };
1921   - p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=salvaparametrosauto&tema=" + i3GEOF.legenda._parameters.tema
1922   - + "&classesitem=" + $i("i3GEOlegendaAutoclassesitem").value
1923   - + "&classesnome=" + $i("i3GEOlegendaAutoclassesnome").value
1924   - + "&classescor=" + $i("i3GEOlegendaAutoclassescor").value
1925   - + "&classessimbolo=" + $i("i3GEOlegendaAutoclassessimbolo").value
1926   - + "&classestamanho=" + $i("i3GEOlegendaAutoclassestamanho").value
1927   - + "&palletefile=" + $i("i3GEOlegendaAutopalletefile").value
1928   - + "&palletestep=" + $i("i3GEOlegendaAutopalletestep").value;
1929   -
1930   - cp = new cpaint();
1931   - cp.set_response_type("JSON");
1932   - cp.call(p,"foo",temp);
  1167 + i3f.post({btn: true, par: par, refresh: true, prog: "exec"});
1933 1168 }
1934 1169 };
1935 1170 //aplica ao codigo i3GEOF definicoes feitas na interface do mapa
... ...
ferramentas/legenda/templateLista_mst.html
1 1 <!-- para o caso de vetores -->
2 2 <div class="{{{hidden2}}}">
3   - <button onclick="i3GEOF.legenda.mudaLegenda(this)" class='btn btn-primary btn-sm btn-raised'>{{{aplicaAlteracao}}}</button>
4   - <button id="botaoAdicionaClasse" onclick="i3GEOF.legenda.adicionaClasse(this)" title='{{{adicionaNovaClasse}}}' class='btn btn-primary btn-sm btn-raised'>{{{adicionaClasse}}}</button>
  3 + <button onclick="i3GEOF.legenda.mudaLegenda(this)" class='btn btn-primary btn-sm btn-raised'>
  4 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{aplicaAlteracao}}}
  5 + </button>
  6 + <button onclick="i3GEOF.legenda.adicionaClasse(this)" title='{{{adicionaNovaClasse}}}' class='btn btn-primary btn-sm btn-raised'>
  7 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{adicionaClasse}}}
  8 + </button>
5 9 <table id="i3GEOlegendalegenda" class="table-striped table-condensed">
6 10 <tr>
7   - <td>
8   - <button title='{{{inverte}}}' onclick='i3GEOF.legenda.inverteCores()' class="btn btn-xs" style="margin: 2px; padding: 2px;">
9   - <span class="material-icons">invert_colors</span>
10   - </button>
11   - </td>
  11 + <td></td>
12 12 <td style="background-color: white">
13 13 <button title='{{{calculaTamanho}}}' onclick='i3GEOF.legenda.calculaTamanho()' class="btn btn-xs" style="margin: 2px; padding: 2px;">
14 14 <span class="material-icons">texture</span>
15 15 </button>
16 16 </td>
17 17 <td></td>
  18 + <td>
  19 + <button title='{{{inverte}}}' onclick='i3GEOF.legenda.inverteCores()' class="btn btn-xs" style="margin: 2px; padding: 2px;">
  20 + <span class="material-icons">invert_colors</span>
  21 + </button>
  22 + </td>
18 23 <td style="background-color: yellow">
19 24 <button onclick='i3GEOF.legenda.ordenaClasses()' class="btn btn-xs" style="margin: 2px; padding: 2px;">
20 25 <span class="material-icons">sort</span>
... ... @@ -34,7 +39,12 @@
34 39 <span class="material-icons">clear</span>
35 40 </button>
36 41 </td>
37   - <td><img style="cursor: pointer; width: 30px; height: 25px" title="{{{cliqueAltera}}}" src="{{{imagem}}}" onclick="i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_{{{id}}}')"></td>
  42 + <td><img style="cursor: pointer; max-width: 80px;" title="{{{cliqueAltera}}}" src="{{{imagem}}}" onclick="i3GEOF.legenda.editaSimbolo('{{{id}}}')"></td>
  43 + <td>
  44 + <button onclick="i3GEOF.legenda.editaSimbolo('{{{id}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;">
  45 + <span class="material-icons">edit</span>
  46 + </button>
  47 + </td>
38 48 <td>
39 49 <button onclick="i3GEOF.legenda.modificaCor('{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;">
40 50 <span class="material-icons">palette</span>
... ... @@ -84,17 +94,20 @@
84 94 </div>
85 95 <!-- para o caso de imagens -->
86 96 <div class="{{{hidden1}}}">
87   - <button onclick="i3GEOF.legenda.aplicaProcessos()" class='btn btn-primary btn-sm btn-raised'>{{{aplicaProcesso}}}</button>
  97 + <button onclick="i3GEOF.legenda.aplicaProcessos(this)" class='btn btn-primary btn-sm btn-raised'><span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{aplicaProcesso}}}</button>
  98 +
88 99 <div class='form-group condensed'>
89 100 <label class="control-label">{{{selecionaProcesso}}}</label>
90   - <select class="form-control" onchange="i3GEOF.legenda.adicionaProcesso(this)">
  101 + <div style="width: 50%;" class="input-group">
  102 + <select class="form-control" onchange="i3GEOF.legenda.adicionaProcesso(this)">
91 103 <option value=''></option>
92 104 <option value='SCALE='>{{{escalaCores}}}</option>
93 105 <option value='RESAMPLE='>{{{reamostragem}}}</option>
94 106 <option value='BANDS='>{{{bandas}}}</option>
95 107 <option value='COLOR_MATCH_THRESHOLD='>Threshold</option>
96 108 <option value='NODATA='>Nodata</option>
97   - </select><b class="caret careti"></b> <b class="caret careti"></b>
  109 + </select> <b class="caret careti"></b>
  110 + </div>
98 111 </div>
99 112 <br>
100 113 <h5>{{{existentes}}}</h5>
... ...
ferramentas/legenda/template_mst.html
... ... @@ -51,9 +51,15 @@
51 51 <div id='{{idContainer}}' class='container-fluid' style='text-align: left; display: block; overflow: auto; height: calc(100% - 50px);'>
52 52 <!--- Propriedades -->
53 53 <div id='i3GEOlegendaguia6obj' class='container-fluid '>
54   - <button onclick="i3GEOF.legenda.adicionaConta(this)" class='btn btn-primary btn-sm btn-raised'><span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{incluiNumeroOcorrencia}}}</button>
55   - <button onclick="i3GEOF.legenda.adicionaOpacidade(this)" title='{{{aplicaOpacidade}}}' class='btn btn-primary btn-sm btn-raised'><span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{aplicaOpacidadeVariavel}}}</button>
56   - <button onclick="i3GEOF.legenda.janelaCorRamp(this)" title='{{{variaCoresExtremos}}}' class='btn btn-primary btn-sm btn-raised'><span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{escolhePaletaCores}}}</button>
  54 + <button onclick="i3GEOF.legenda.adicionaConta(this)" class='btn btn-primary btn-sm btn-raised'>
  55 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{incluiNumeroOcorrencia}}}
  56 + </button>
  57 + <button onclick="i3GEOF.legenda.adicionaOpacidade(this)" title='{{{aplicaOpacidade}}}' class='btn btn-primary btn-sm btn-raised'>
  58 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{aplicaOpacidadeVariavel}}}
  59 + </button>
  60 + <button onclick="i3GEOF.legenda.janelaCorRamp(this)" title='{{{variaCoresExtremos}}}' class='btn btn-primary btn-sm btn-raised'>
  61 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{escolhePaletaCores}}}
  62 + </button>
57 63 <div class="checkbox text-left">
58 64 <label>
59 65 <input {{{values.mostra}}} type="checkbox" id="i3GEOFlegendamostra" onclick="i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema);">
... ... @@ -64,6 +70,20 @@
64 70 <div class="row">
65 71 <div class="col-md-4">
66 72 <div class="panel panel-default legenda">
  73 + <div class="panel-heading legenda">{{{autoSizeSymbol}}}</div>
  74 + <div class="panel-body">
  75 + <div class="form-group condensed">
  76 + <div class="input-group">
  77 + <div style="display: contents;" class="form-group label-fixed">
  78 + <input id="i3GEOlegendaAutoSize" class="form-control" type="text" value="5">
  79 + </div>
  80 + </div>
  81 + </div>
  82 + </div>
  83 + </div>
  84 + </div>
  85 + <div class="col-md-4">
  86 + <div class="panel panel-default legenda">
67 87 <div class="panel-heading legenda">{{{legendaImg}}}</div>
68 88 <div class="panel-body">
69 89 <div class="form-group condensed">
... ... @@ -90,8 +110,8 @@
90 110 <div style="display: contents;" class="form-group label-fixed">
91 111 <input id="i3GEOoffsite" class="form-control i3geoFormIconeAquarela" type="text" value="{{{values.offsite}}}">
92 112 </div>
93   - <span class="input-group-btn"> <a onclick="i3GEOF.legenda.aplicarOffsite(this);return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max"
94   - href="javascript:void(0)">
  113 + <span class="input-group-btn"> <a onclick="i3GEOF.legenda.aplicarOffsite(this);return false;" role="button" type="button"
  114 + class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
95 115 <span class="material-icons ">send</span>
96 116 </a>
97 117 </span>
... ... @@ -100,6 +120,8 @@
100 120 </div>
101 121 </div>
102 122 </div>
  123 + </div>
  124 + <div class="row">
103 125 <div class="col-md-4">
104 126 <div class="panel panel-default legenda">
105 127 <div class="panel-heading legenda">{{{geraCores}}}</div>
... ... @@ -148,8 +170,8 @@
148 170 <div class='form-group condensed'>
149 171 <div class="input-group">
150 172 <label class="control-label">{{{todosElementosUnicoSimbolo}}}</label>
151   - <span class="input-group-btn"> <a onclick="i3GEOF.legenda.simbU();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max"
152   - href="javascript:void(0)">
  173 + <span class="input-group-btn"> <a onclick="i3GEOF.legenda.simbolounico();return false;" role="button" type="button"
  174 + class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
153 175 <span class="material-icons ">send</span>
154 176 </a>
155 177 </span>
... ... @@ -183,8 +205,8 @@
183 205 <div class='form-group condensed'>
184 206 <div class="input-group">
185 207 <label class="control-label">&nbsp;</label>
186   - <span class="input-group-btn"> <a onclick="i3GEOF.legenda.valorU();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max"
187   - href="javascript:void(0)">
  208 + <span class="input-group-btn"> <a onclick="i3GEOF.legenda.valorunico();return false;" role="button" type="button"
  209 + class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
188 210 <span class="material-icons ">send</span>
189 211 </a>
190 212 </span>
... ... @@ -213,9 +235,15 @@
213 235 <input class="form-control input-lg" type='number' id='i3GEOlegendanclasses' value='5' />
214 236 </div>
215 237 <h5>{{{tipoCalculo}}}</h5>
216   - <button onclick="i3GEOF.legenda.valorC()" class='btn btn-primary btn-sm btn-raised'>{{{intervalosIguais}}}</button>
217   - <button onclick="i3GEOF.legenda.valorQN()" class='btn btn-primary btn-sm btn-raised'>{{{quebrasNaturais}}}</button>
218   - <button onclick="i3GEOF.legenda.valorQu()" class='btn btn-primary btn-sm btn-raised'>{{{calcularQuantil}}}</button>
  238 + <button onclick="i3GEOF.legenda.nclasses(this)" class='btn btn-primary btn-sm btn-raised'>
  239 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{intervalosIguais}}}
  240 + </button>
  241 + <button onclick="i3GEOF.legenda.quebrasnaturais(this)" class='btn btn-primary btn-sm btn-raised'>
  242 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{quebrasNaturais}}}
  243 + </button>
  244 + <button onclick="i3GEOF.legenda.quantil(this)" class='btn btn-primary btn-sm btn-raised'>
  245 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{calcularQuantil}}}
  246 + </button>
219 247 </div>
220 248 </div>
221 249 </div>
... ... @@ -310,8 +338,8 @@
310 338 <div class='form-group condensed'>
311 339 <div class="input-group">
312 340 <label class="control-label">&nbsp;</label>
313   - <span class="input-group-btn"> <a onclick="i3GEOF.legenda.valorQ();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max"
314   - href="javascript:void(0)">
  341 + <span class="input-group-btn"> <a onclick="i3GEOF.legenda.quartil();return false;" role="button" type="button"
  342 + class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
315 343 <span class="material-icons ">send</span>
316 344 </a>
317 345 </span>
... ... @@ -343,7 +371,7 @@
343 371 </div>
344 372 <div class='form-group label-fixed condensed'>
345 373 <label class="control-label" for="{{{idjanela}}}i3GEOtabelaexcestat">{{{ignoraValores}}}</label>
346   - <input class="form-control input-lg" type='number' id='i3GEOlegendaignorar' value='' />
  374 + <input class="form-control input-lg" type='text' id='i3GEOlegendaignorar' value='' />
347 375 </div>
348 376 </div>
349 377 </div>
... ... @@ -370,11 +398,16 @@
370 398 </select> <b class="caret careti"></b>
371 399 </div>
372 400 </div>
373   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn pull-right"> <a style="left: 80px;"
374   - onclick="i3GEOF.legenda.alteraGeometriaTema();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
375   - <span class="material-icons ">send</span>
376   - </a>
377   - </span>
  401 + <div class='form-group condensed'>
  402 + <div class="input-group">
  403 + <label class="control-label">&nbsp;</label>
  404 + <span class="input-group-btn"> <a onclick="i3GEOF.legenda.alteraGeometria();return false;" role="button" type="button"
  405 + class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
  406 + <span class="material-icons ">send</span>
  407 + </a>
  408 + </span>
  409 + </div>
  410 + </div>
378 411 </div>
379 412 </div>
380 413 </div>
... ... @@ -423,9 +456,15 @@
423 456 <div id='i3GEOlegendaitensLabel'></div>
424 457 </div>
425 458 </div>
426   - <button onclick="i3GEOF.legenda.excluiLabels()" class='btn btn-primary btn-sm btn-raised'>{{{removeLabels}}}</button>
427   - <button onclick="i3GEOF.legenda.incluirLabels()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button>
428   - <button onclick="i3GEOF.legenda.propriedadesLabels()" class='btn btn-primary btn-sm btn-raised'>{{{propriedades2}}}</button>
  459 + <button onclick="i3GEOF.legenda.excluiLabels(this)" class='btn btn-primary btn-sm btn-raised'>
  460 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{removeLabels}}}
  461 + </button>
  462 + <button onclick="i3GEOF.legenda.incluirLabels(this)" class='btn btn-primary btn-sm btn-raised'>
  463 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{aplicar}}}
  464 + </button>
  465 + <button onclick="i3GEOF.legenda.propriedadesLabels(this)" class='btn btn-primary btn-sm btn-raised'>
  466 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{propriedades2}}}
  467 + </button>
429 468 </div>
430 469 </div>
431 470 </div>
... ... @@ -445,10 +484,18 @@
445 484 <div id='i3GEOlegendacomboestilos'></div>
446 485 </div>
447 486 </div>
448   - <button onclick="i3GEOF.legenda.excluiEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{exclui}}}</button>
449   - <button onclick="i3GEOF.legenda.adicionaEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{adiciona}}}</button>
450   - <button onclick="i3GEOF.legenda.sobeEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{sobe}}}</button>
451   - <button onclick="i3GEOF.legenda.desceEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{desce}}}</button>
  487 + <button onclick="i3GEOF.legenda.excluiEstilo(this)" class='btn btn-primary btn-sm btn-raised'>
  488 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{exclui}}}
  489 + </button>
  490 + <button onclick="i3GEOF.legenda.adicionaEstilo(this)" class='btn btn-primary btn-sm btn-raised'>
  491 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{adiciona}}}
  492 + </button>
  493 + <button onclick="i3GEOF.legenda.sobeEstilo(this)" class='btn btn-primary btn-sm btn-raised'>
  494 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{sobe}}}
  495 + </button>
  496 + <button onclick="i3GEOF.legenda.desceEstilo(this)" class='btn btn-primary btn-sm btn-raised'>
  497 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{desce}}}
  498 + </button>
452 499 </div>
453 500 </div>
454 501 </div>
... ... @@ -488,7 +535,7 @@
488 535 <div class='form-group label-fixed condensed'>
489 536 <label class="col-md-6 control-label">{{{ClusterBuffer}}}</label>
490 537 <div class="col-md-6 ">
491   - <input class="form-control input-lg" type='number' id='i3GEOlegendaClusterBuffer' value='0' />
  538 + <input class="form-control input-lg" type='number' id='i3GEOlegendaClusterBuffer' value='10' />
492 539 </div>
493 540 </div>
494 541 <div class='form-group label-fixed condensed'>
... ... @@ -514,8 +561,12 @@
514 561 </div>
515 562 </form>
516 563 <div style="text-align: center;">
517   - <button onclick="i3GEOF.legenda.aplicarCluster()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button>
518   - <button onclick="i3GEOF.legenda.removerCluster()" class='btn btn-primary btn-sm btn-raised'>{{{remover}}}</button>
  564 + <button onclick="i3GEOF.legenda.aplicarCluster(this)" class='btn btn-primary btn-sm btn-raised'>
  565 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{aplicar}}}
  566 + </button>
  567 + <button onclick="i3GEOF.legenda.removerCluster(this)" class='btn btn-primary btn-sm btn-raised'>
  568 + <span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{remover}}}
  569 + </button>
519 570 </div>
520 571 </div>
521 572 <!--autoclasses-->
... ... @@ -568,7 +619,7 @@
568 619 </div>
569 620 </form>
570 621 <div style="text-align: center;">
571   - <button onclick="i3GEOF.legenda.salvaParametrosAuto()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button>
  622 + <button onclick="i3GEOF.legenda.salvaParametrosAuto(this)" class='btn btn-primary btn-sm btn-raised'><span class="glyphicon glyphicon-repeat normal-right-spinner hidden"></span> {{{aplicar}}}</button>
572 623 </div>
573 624 </div>
574 625 <input type='hidden' value='' id='listaColourRamp' onchange='javascript:i3GEOF.legenda.aplicaColourRamp()' />
... ...
ferramentas/legenda_old/dependencias.php
... ... @@ -1,24 +0,0 @@
1   -<?php
2   -include(dirname(__FILE__)."/../blacklist.php");
3   -verificaBlFerramentas(basename(dirname(__FILE__)));
4   -
5   -/**
6   - * Carrega os programas javascript necessarios para a ferramenta
7   - * Esse programa e usado na tag <script> ou com a funcao scripttag do i3Geo
8   - * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel
9   - * javascript i3GEOF.legenda.MUSTACHE
10   - * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta
11   - */
12   -
13   -if(extension_loaded('zlib')){
14   - ob_start('ob_gzhandler');
15   -}
16   -header("Content-type: text/javascript");
17   -include("index.js");
18   -include("dicionario.js");
19   -echo "\n";
20   -
21   -if(extension_loaded('zlib')){
22   - ob_end_flush();
23   -}
24   -?>
25 0 \ No newline at end of file
ferramentas/legenda_old/dicionario.js
... ... @@ -1,956 +0,0 @@
1   -//+$trad(1,i3GEOF.legenda.dicionario)+
2   -i3GEOF.legenda.dicionario =
3   - {
4   - 'ajuda' : [
5   - {
6   - pt : "Para acessar o editor, clique em um s&iacute;mbolo na guia <i>Legenda</i>",
7   - en : "Click on a symbol on the <i>Legend</i> tab to use the editor",
8   - es : "Para acceder al editor haga clic en alg&uacute;n s&iacute;mbolo en la pesta&ntilde;a <i>Leyenda</i>"
9   - }
10   - ],
11   - 'propriedades' : [
12   - {
13   - pt : "Propriedades",
14   - en : "Properties",
15   - es : "Propiedades"
16   - }
17   - ],
18   - "legenda" : [
19   - {
20   - pt : "Legenda",
21   - en : "Legend",
22   - es : "Leyenda"
23   - }
24   - ],
25   - "classes" : [
26   - {
27   - pt : "Classes",
28   - en : "Classes",
29   - es : "Clases"
30   - }
31   - ],
32   - 'editor' : [
33   - {
34   - pt : "Editor",
35   - en : "Editor",
36   - es : "Editor"
37   - }
38   - ],
39   - 'graficos' : [
40   - {
41   - pt : "Gr&aacute;ficos",
42   - en : "Chart",
43   - es : "Gr&aacute;ficos"
44   - }
45   - ],
46   - 'importaExportaSLD' : [
47   - {
48   - pt : "SLD",
49   - en : "SLD",
50   - es : "SLD"
51   - }
52   - ],
53   - 'mostraClassesLegenda' : [
54   - {
55   - pt : "Ao imprimir, mostra as classes desse tema na legenda do mapa ",
56   - en : "When printing, it shows the classes of this theme on the map legend ",
57   - es : "Al imprimir, muestra las clases de este tema en la leyenda del mapa "
58   - }
59   - ],
60   - 'incluiNumeroOcorrencia' : [
61   - {
62   - pt : "Inclui n&uacute;mero de ocorr&ecirc;ncias",
63   - en : "Includes number of occurrences",
64   - es : "Incluye el n&uacute;mero de ocurrencias"
65   - }
66   - ],
67   - 'incluiNumeroOcorrencia2' : [
68   - {
69   - pt : "incluir o n&uacute;mero de ocorr&ecirc;ncias no nome de cada classe",
70   - en : "include the number of occurrences in the class name",
71   - es : "incluir el n&uacute;mero de ocurrencias en el nombre de cada clase"
72   - }
73   - ],
74   - 'aplicaOpacidadeVariavel' : [
75   - {
76   - pt : "Aplica opacidade vari&aacute;vel",
77   - en : "Applies variable opacity",
78   - es : "Aplica opacidad variable"
79   - }
80   - ],
81   - 'aplicaOpacidade' : [
82   - {
83   - pt : "aplicar opacidade nas classes existente, variando de 10 at&eacute; 100",
84   - en : "apply opacity to existing classes. Opacity ranges from 10 to 100",
85   - es : "aplicar opacidad a las clases existentes. La opacidad a aplicar var&iacute;a entre 10 y 100"
86   - }
87   - ],
88   - 'escolhePaletaCores' : [
89   - {
90   - pt : "Escolher paleta de cores",
91   - en : "Choose color palette",
92   - es : "Elegir paleta de colores"
93   - }
94   - ],
95   - 'variaCoresExtremos' : [
96   - {
97   - pt : "escolher e aplicar as varia&ccedil;&otilde;es de cores, entre dois extremos, nas classes existentes",
98   - en : "select and apply color variations between two extremes to existing classes",
99   - es : "seleccionar y aplicar las variaciones de color entre dos extremos en las clases existentes"
100   - }
101   - ],
102   - 'geraCores' : [
103   - {
104   - pt : "Gerar cores",
105   - en : "Generate colors",
106   - es : "Generar colores"
107   - }
108   - ],
109   - 'ate' : [
110   - {
111   - pt : "at&eacute;",
112   - en : "until",
113   - es : "hasta"
114   - }
115   - ],
116   - 'de' : [
117   - {
118   - pt : "de",
119   - en : "of",
120   - es : "de"
121   - }
122   - ],
123   - 'aplica' : [
124   - {
125   - pt : "Aplicar",
126   - en : "Apply",
127   - es : "Aplicar"
128   - }
129   - ],
130   - 'aplicaVariaCores' : [
131   - {
132   - pt : "aplicar varia&ccedil;&otilde;es de cores, entre dois extremos, nas classes existentes",
133   - en : "apply color variations between two extremes to existing classes",
134   - es : "aplicar variaciones de color entre dos extremos en las clases existentes"
135   - }
136   - ],
137   - 'aplicaAlteracao' : [
138   - {
139   - pt : "Aplicar altera&ccedil;&otilde;es",
140   - en : "Apply changes",
141   - es : "Aplicar cambios"
142   - }
143   - ],
144   - 'adicionaClasse' : [
145   - {
146   - pt : "Adicionar classe",
147   - en : "Add class",
148   - es : "A&ntilde;adir clase"
149   - }
150   - ],
151   - 'adicionaNovaClasse' : [
152   - {
153   - pt : "adicionar uma nova classe na legenda",
154   - en : "add a new class on the legend",
155   - es : "a&ntilde;adir una clase nueva en la leyenda"
156   - }
157   - ],
158   - 'clicaSimbolo' : [
159   - {
160   - pt : "Clique no s&iacute;mbolo da classe para alterar",
161   - en : "Click on the class symbol to modify",
162   - es : "Haga clic en el s&iacute;mbolo de la clase para modificar"
163   - }
164   - ],
165   - 'consideraElementosVisisveis' : [
166   - {
167   - pt : "marque para considerar nos c&aacute;lculos apenas os elementos vis&iacute;veis na extens&atilde;o geogr&aacute;fica atual, caso contr&aacute;rio, ser&aacute; considerada a extens&atilde;o geogr&aacute;fica inicial do mapa",
168   - en : "check to take into account in the calculations only visible features in the current geographical extent, otherwise, the initial map extent will be considered",
169   - es : "marque para considerar en los c&aacute;lculos solo las entidades visibles en la extensi&oacute;n geogr&aacute;fica actual, de lo contrario, se considerar&aacute; la extensi&oacute;n geogr&aacute;fica inicial del mapa"
170   - }
171   - ],
172   - 'ignoraValores' : [
173   - {
174   - pt : "Ao obter os dados para gerar as classes, ignorar os valores listados abaixo (separe com v&iacute;rgula)",
175   - en : "When getting data to generate classes, ignore the values listed below (separate with comma)",
176   - es : "Al obtener los datos para generar las clases, omitir los valores enumerados a continuaci&oacute;n (separar con coma)"
177   - }
178   - ],
179   - 'transformaGeom' : [
180   - {
181   - pt : "Tipo de transforma&ccedil;&atilde;o",
182   - en : "Transformation type",
183   - es : "Tipo de transformaci&oacute;n"
184   - }
185   - ],
186   - 'alteraGeom' : [
187   - {
188   - pt : "Altera a geometria. Transforma a representa&ccedil;&atilde;o geom&eacute;trica dos elementos do tema. Ap&oacute;s alterar esse par&acirc;metro, pode ser necess&aacute;rio modificar as caracter&iacute;sticas do s&iacute;mbolo.",
189   - en : "Modifies geometry. It transforms the geometric representation of a feature. After changing this parameter, you may need to modify symbol properties.",
190   - es : "Modifica la geometr&iacute;a. Transforma la representaci&oacute;n geom&eacute;trica de las entidades del tema. Despu&eacute;s de cambiar este par&aacute;metro, puede que sea necesario modificar las caracter&iacute;sticas del s&iacute;mbolo."
191   - }
192   - ],
193   - 'semTransformacao' : [
194   - {
195   - pt : "nenhuma transforma&ccedil;&atilde;o",
196   - en : "no transformation",
197   - es : "ninguna transformaci&oacute;n"
198   - }
199   - ],
200   - 'centroide' : [
201   - {
202   - pt : "centr&oacute;ide",
203   - en : "centroid",
204   - es : "centroide "
205   - }
206   - ],
207   - 'vertices' : [
208   - {
209   - pt : "v&eacute;rtices",
210   - en : "vertices",
211   - es : "v&eacute;rtices"
212   - }
213   - ],
214   - 'verticeInicial' : [
215   - {
216   - pt : "v&eacute;rtice inicial",
217   - en : "first vertex",
218   - es : "v&eacute;rtice inicial"
219   - }
220   - ],
221   - 'verticeFinal' : [
222   - {
223   - pt : "v&eacute;rtice final",
224   - en : "last vertex",
225   - es : "v&eacute;rtice final"
226   - }
227   - ],
228   - 'alteraTipoGeom' : [
229   - {
230   - pt : "Altera o tipo de representa&ccedil;&atilde;o do tema. Se for poligonal, passa para linear e vice-versa.",
231   - en : "Changes theme geometry. If it a polygon it changes to a line and vice versa.",
232   - es : "Cambia el tipo de geometr&iacute;a del tema. Si es un pol&iacute;gono se transforma a l&iacute;nea y viceversa."
233   - }
234   - ],
235   - 'alteraTipo' : [
236   - {
237   - pt : "Altera tipo",
238   - en : "Changes type",
239   - es : "Modifica tipo"
240   - }
241   - ],
242   - 'todosElementosUnicoSimbolo' : [
243   - {
244   - pt : "Todos os elementos ser&atilde;o desenhados com um &uacute;nico s&iacute;mbolo",
245   - en : "All features will be drawn with a unique symbol",
246   - es : "Todas las entidades ser&aacute;n dibujadas con un s&iacute;mbolo &uacute;nico"
247   - }
248   - ],
249   - 'simboloUnico' : [
250   - {
251   - pt : "S&iacute;mbolo &uacute;nico",
252   - en : "Unique symbol",
253   - es : "S&iacute;mbolo &uacute;nico"
254   - }
255   - ],
256   - 'cadaOcorrenciaUnicoSimbolo' : [
257   - {
258   - pt : "Item utilizado para obter as ocorr&ecirc;ncias &uacute;nicas",
259   - en : "Field used to get unique occurrences",
260   - es : "Campo utilizado para obtener las ocurrencias &uacute;nicas"
261   - }
262   - ],
263   - 'valorUnico' : [
264   - {
265   - pt : "Calcular valor &uacute;nico. Cada ocorr&ecirc;ncia de um valor para o item selecionado, ser&aacute; desenhado com o mesmo s&iacute;mbolo.",
266   - en : "Calculate unique value. Each value occurrence of the selected field will be drawn with the same symbol.",
267   - es : "Calcular valor &uacute;nico. Cada ocurrencia de un valor para el campo seleccionado se dibujar&aacute; con el mismo s&iacute;mbolo."
268   - }
269   - ],
270   - 'classesFixas' : [
271   - {
272   - pt : "Cria classes para um item num&eacute;rico utilizando um n&uacute;mero fixo de classes",
273   - en : "Creates classes for a numeric field using a fixed number of classes",
274   - es : "Crea clases para un campo num&eacute;rico utilizando un n&uacute;mero fijo de clases"
275   - }
276   - ],
277   - 'criaClassesItemNumerico' : [
278   - {
279   - pt : "Item que ser&aacute; utilizado para obter os valores",
280   - en : "Filed that will be used to obtain values",
281   - es : "Campo que se utilizará para obtener los valores"
282   - }
283   - ],
284   - 'numeroClasses' : [
285   - {
286   - pt : "N&uacute;mero de classes",
287   - en : "Number of classes",
288   - es : "N&uacute;mero de clases"
289   - }
290   - ],
291   - 'tipoCalculo' : [
292   - {
293   - pt : "Tipo de c&aacute;lculo",
294   - en : "Calculation type",
295   - es : "Tipo de c&aacute;lculo"
296   - }
297   - ],
298   - 'intervalosIguais' : [
299   - {
300   - pt : "Intervalos iguais",
301   - en : "Equal intervals",
302   - es : "Intervalos iguales"
303   - }
304   - ],
305   - 'calcularQuartil' : [
306   - {
307   - pt : "Quartis. Cria classes para um item num&eacute;rico utilizando quartis",
308   - en : "Quartiles. It creates classes for a numeric field using quartiles",
309   - es : "Cuartiles. Crea clases para un campo num&eacute;rico utilizando cuartiles"
310   - }
311   - ],
312   - 'criaQuartis' : [
313   - {
314   - pt : "Item que ser&aacute; utilizado para obter os valores",
315   - en : "Field that will be used to obtain the values",
316   - es : "Campo que se utilizará para obtener los valores"
317   - }
318   - ],
319   - 'estiloNomeClasses' : [
320   - {
321   - pt : "Estilo dos nomes das classes",
322   - en : "Class name style",
323   - es : "Estilo de los nombres de las clases"
324   - }
325   - ],
326   - 'soValores' : [
327   - {
328   - pt : "s&oacute; os valores",
329   - en : "only values",
330   - es : "solo los valores"
331   - }
332   - ],
333   - 'quartilValores' : [
334   - {
335   - pt : "quartil e os valores",
336   - en : "quartile and values",
337   - es : "cuartil y valores"
338   - }
339   - ],
340   - 'expressaoCompleta' : [
341   - {
342   - pt : "express&atilde;o completa",
343   - en : "complete expression",
344   - es : "expresi&oacute;n completa"
345   - }
346   - ],
347   - "etiquetasClasse" : [
348   - {
349   - pt : "Defini&ccedil;&atilde;o do texto que ser&aacute; mostrado em cada elemento do mapa pertencente &agrave; classe escolhida",
350   - en : "Definition of the text that will be shown in each feature on the map belonging to the selected class",
351   - es : "Definici&oacute;n del texto que se mostrar&aacute; en cada entidad del mapa perteneciente a la clase elegida"
352   - }
353   - ],
354   - 'removeLabels' : [
355   - {
356   - pt : "Remove os textos",
357   - en : "Remove texts",
358   - es : "Elimina los textos"
359   - }
360   - ],
361   - 'itemComTexto' : [
362   - {
363   - pt : "Item que ser&aacute; utilizado como fonte para obten&ccedil;&atilde;o dos textos",
364   - en : "Field that will be used as source to obtain texts",
365   - es : "Campo que ser&aacute; utilizado como fuente para la obtenci&oacute;n de los textos"
366   - }
367   - ],
368   - 'exclui' : [
369   - {
370   - pt : "excluir",
371   - en : "delete",
372   - es : "eliminar"
373   - }
374   - ],
375   - 'adiciona' : [
376   - {
377   - pt : "adicionar",
378   - en : "add",
379   - es : "a&ntilde;adir"
380   - }
381   - ],
382   - 'propriedades2' : [
383   - {
384   - pt : "propriedades",
385   - en : "properties",
386   - es : "propriedades"
387   - }
388   - ],
389   - 'estilos' : [
390   - {
391   - pt : "Estilos. Cada s&iacute;mbolo pode ser formado por um ou mais estilos. Utilize as op&ccedil;&otilde;es abaixo para criar ou remover os estilos do s&iacute;mbolo utilizado na classe atual.",
392   - en : "Styles. Each symbol is made up of one or more styles. Use the following options to create or remove symbol styles used for the current class.",
393   - es : "Estilos. Cada s&iacute;mbolo puede estar formado por uno o m&aacute;s estilos. Utilice las siguientes opciones para crear o quitar los estilos del s&iacute;mbolo utilizado en la clase actual."
394   - }
395   - ],
396   - 'ajudaEstilo' : [
397   - {
398   - pt : "Utilize -1,-1,-1 para anular uma cor. A cor deve ser definida no formato vermelho,verde,azul. Para criar linhas tracejadas utilize o s&iacute;mbolo 0 ou vazio e digite um padr&atilde;o de repeti&ccedil;&atilde;o como por exemplo 2 10 2 10 ",
399   - en : "Use -1, -1, -1 to undo a color. A color should be set in red, green, blue. To create dashed lines, use the symbol 0 or empty and enter a repeat pattern such as 2 10 2 10",
400   - es : "Utilice -1, -1, -1 para anular un color. El color se debe definir en el formato rojo, verde, azul. Para crear l&iacute;neas discontinuas utilice el s&iacute;mbolo 0 o vac&iacute;o y escriba un patr&oacute;n de repetici&oacute;n como por ejemplo 2 10 2 10"
401   - }
402   - ],
403   - 'aplicaAlteracoes' : [
404   - {
405   - pt : "Aplicar todas as altera&ccedil;&otilde;es",
406   - en : "Apply all changes",
407   - es : "Aplicar todos los cambios"
408   - }
409   - ],
410   - 'geraSLD' : [
411   - {
412   - pt : "Gera um arquivo XML, no padr&atilde;o SLD, contendo a legenda atual da camada. Para maiores informa&ccedil;&otilde;es, veja",
413   - en : "Generates an XML file in the SLD standard that contains the current layer legend. For more information, see",
414   - es : "Genera un archivo XML en el est&aacute;ndar SLD que contiene la leyenda actual de la capa. Para m&aacute;s informaci&oacute;n vea"
415   - }
416   - ],
417   - 'ajudaSLD' : [
418   - {
419   - pt : "(O SLD s&oacute; &eacute; gerado ou aplicado corretamente em camadas que utilizam express&otilde;es simples e o elemento CLASSITEM)",
420   - en : "(SLD is only generated or applied correctly to layers that use simple expressions and the element CLASSITEM)",
421   - es : "(El SLD solo se genera o se aplica correctamente en capas que utilizan expresiones simples y el elemento CLASSITEM)"
422   - }
423   - ],
424   - 'exportaSLD' : [
425   - {
426   - pt : "Exportar SLD",
427   - en : "Export SLD",
428   - es : "Exportar SLD"
429   - }
430   - ],
431   - 'msgAplicaSLD' : [
432   - {
433   - pt : "Aplica um arquivo SLD &agrave; camada ativa",
434   - en : "Applies a SLD file to the active layer",
435   - es : "Aplica un archivo SLD a la capa activa"
436   - }
437   - ],
438   - 'aplicaSLD' : [
439   - {
440   - pt : "Aplicar SLD",
441   - en : "Apply SLD",
442   - es : "Aplicar SLD"
443   - }
444   - ],
445   - 'temaInexistente' : [
446   - {
447   - pt : "O tema ja nao existe mais no mapa",
448   - en : "The theme no longer exists on the map",
449   - es : "El tema ya no existe en el mapa"
450   - }
451   - ],
452   - 'cliqueAltera' : [
453   - {
454   - pt : "clique para alterar",
455   - en : "click to modify",
456   - es : "haga clic para cambiar"
457   - }
458   - ],
459   - 'cliqueExclui' : [
460   - {
461   - pt : "clique para excluir",
462   - en : "click to delete",
463   - es : "haga clic para eliminar"
464   - }
465   - ],
466   - 'digitaNovoNome' : [
467   - {
468   - pt : "digite o novo nome",
469   - en : "enter a new name",
470   - es : "introduzca un nombre nuevo"
471   - }
472   - ],
473   - 'digitaNovaExpressao' : [
474   - {
475   - pt : "digite a nova express&atilde;o",
476   - en : "type a new expression",
477   - es : "introduzca la expresi&oacute;n nueva"
478   - }
479   - ],
480   - 'sobe' : [
481   - {
482   - pt : "sobe",
483   - en : "up",
484   - es : "sube"
485   - }
486   - ],
487   - 'desce' : [
488   - {
489   - pt : "desce",
490   - en : "down",
491   - es : "baja"
492   - }
493   - ],
494   - 'ajudaEscalaCores' : [
495   - {
496   - pt : "Para aplicar um ajuste entre 0 e 255 cores, utilize a op&ccedil;&atilde;o <i>Escala de Cores</i>.",
497   - en : "Use the <i>Color Scale</i> option to apply a color setting between 0 and 255.",
498   - es : "Para aplicar un ajuste entre 0 y 255 colores utilice la opci&oacute;n <i>Escala de colores</i>."
499   - }
500   - ],
501   - 'msgEscalaCoresAuto' : [
502   - {
503   - pt : "O valor de SCALE= pode ser a palavra AUTO (SCALE=AUTO) ou um valor m&iacute;nimo e m&aacute;ximo (por exemplo SCALE=20,3000).",
504   - en : "The value of SCALE = can be the word AUTO (SCALE = AUTO) or a minimum and maximum value (for example SCALE = 20,3000).",
505   - es : "El valor de SCALE = puede ser la palabra AUTO (SCALE = AUTO) o un valor m&iacute;nimo y m&aacute;ximo (por ejemplo, SCALE = 20,3000)."
506   - }
507   - ],
508   - 'msgEscalaCoresIndividual' : [
509   - {
510   - pt : "Voc&ecirc; pode aplicar a escala em bandas individuais, para isso, utilize SCALE_n, por exemplo SCALE_1=AUTO SCALE_2=200,500.",
511   - en : "You can control the scaling of individual input bands by using SCALE_n, for example: SCALE_1 = AUTO SCALE_2 = 200,500.",
512   - es : "Usted puede aplicar la escala a bandas individuales, para ello utilice SCALE_n, por ejemplo SCALE_1 = AUTO SCALE_2 = 200,500."
513   - }
514   - ],
515   - 'msgBandas' : [
516   - {
517   - pt : "Para escolher quais bandas ser&atilde;o utilizadas e qual sua ordem, utilize a op&ccedil;&atilde;o BANDAS. Utilize, por exemplo, BANDS=1,2,3 BANDS=1.",
518   - en : "In order to select which bands will be used and their order, use the BANDS option. For example: BANDS = 1,2,3 BANDS = 1.",
519   - es : "Para seleccionar las bandas que se utilizar&aacute;n y cu&aacute;l es su orden, utilice la opci&oacute;n BANDAS. Por ejemplo, utilice BANDS = 1,2,3 BANDS = 1."
520   - }
521   - ],
522   - 'msgReamostragem' : [
523   - {
524   - pt : "Para alterar o modo de amostragem, utilize RESAMPLE com uma das op&ccedil;&otilde;es: AVERAGE,NEAREST ou BILINEAR.",
525   - en : "In order to change the sampling method, use RESAMPLE with one of the following options: AVERAGE, NEAREST or BILINEAR.",
526   - es : "Para cambiar el tipo de muestreo, utilice RESAMPLE con una de las opciones: AVERAGE, NEAREST o BILINEAR."
527   - }
528   - ],
529   - 'adicionaProcesso' : [
530   - {
531   - pt : "Voc&ecirc; pode incluir processos na imagem para modificar as caracter&iacute;sticas de visualiza&ccedil;&atilde;o<br><br>Adicionar processo",
532   - en : "You can add processes to the image to modify its display characteristics<br><br>Add process",
533   - es : "Usted puede incluir procesos en la imagen para modificar las caracter&iacute;sticas de la visualizaci&oacute;n<br><br>Agregar proceso"
534   - }
535   - ],
536   - 'selecionaProcesso' : [
537   - {
538   - pt : "Selecione um processo para adicionar",
539   - en : "Select a process to add",
540   - es : "Seleccione un proceso para agregar"
541   - }
542   - ],
543   - 'escalaCores' : [
544   - {
545   - pt : "Escala de cores",
546   - en : "Color scale",
547   - es : "Escala de colores"
548   - }
549   - ],
550   - 'reamostragem' : [
551   - {
552   - pt : "Reamostragem",
553   - en : "Resampling",
554   - es : "Remuestreo"
555   - }
556   - ],
557   - 'bandas' : [
558   - {
559   - pt : "Bandas",
560   - en : "Bands",
561   - es : "Bandas"
562   - }
563   - ],
564   - 'aplicaProcesso' : [
565   - {
566   - pt : "aplicar processos",
567   - en : "apply processes",
568   - es : "aplicar procesos"
569   - }
570   - ],
571   - 'msgNaoEditaLegenda' : [
572   - {
573   - pt : "N&atilde;o &eacute; poss&iacute;vel editar a legenda desse tema",
574   - en : "It is not possible to edit the legend of this theme",
575   - es : "No se puede editar el leyenda de este tema"
576   - }
577   - ],
578   - 'msgAplicaAlteracao' : [
579   - {
580   - pt : "Clique em <i>Aplicar</i> para que as altera&ccedil;&otilde;pes sejam salvas",
581   - en : "Click <i>Apply</i> to save changes",
582   - es : "Haga clic en <i>Aplicar</i> para que los cambios sean guardados"
583   - }
584   - ],
585   - 'consideraElementosVisiveis' : [
586   - {
587   - pt : "A contagem considera apenas os elementos vis&iacute;veis na abrang&ecirc;ncia do mapa",
588   - en : "Count only takes into account visible features in the map extent",
589   - es : "El recuento solo considera las entidades visibles en la extensi&oacute;n del mapa"
590   - }
591   - ],
592   - 'selecionaUmItem' : [
593   - {
594   - pt : "Selecione um item!",
595   - en : "Select a field!",
596   - es : "&iexcl;Seleccione un campo!"
597   - }
598   - ],
599   - 'estiloEdicao' : [
600   - {
601   - pt : "Estilo em edi&ccedil;&atilde;o (ap&oacute;s adicionar ou excluir um estilo, acione o bot&atilde;o de aplicar altera&ccedil;&otilde;es)",
602   - en : "Style editing (after adding or deleting a style click on apply changes button)",
603   - es : "Edici&oacute;n de estilo (despu&eacute;s de agregar o eliminar un estilo haga clic en el bot&oacute;n aplicar cambios)"
604   - }
605   - ],
606   - 'corFundo' : [
607   - {
608   - pt : "Cor do fundo",
609   - en : "Background color",
610   - es : "Color del fondo"
611   - }
612   - ],
613   - 'corFrente' : [
614   - {
615   - pt : "Cor da frente",
616   - en : "Front color",
617   - es : "Color frontal"
618   - }
619   - ],
620   - 'tamanhoEspacamento' : [
621   - {
622   - pt : "Tamanho / espa&ccedil;amento. Defina um valor ou um item da tabela de atributos que cont&eacute;m os valores para cada elemento.",
623   - en : "Size / spacing. Set a value or a field of the attribute table that contains the values for each feature.",
624   - es : "Tama&ntilde;o / espaciado. Defina un valor o un campo de la tabla de atributos que contiene los valores para cada entidad."
625   - }
626   - ],
627   - 'espessura' : [
628   - {
629   - pt : "Espessura",
630   - en : "Thickness",
631   - es : "Espesor"
632   - }
633   - ],
634   - 'padraoRepeticao' : [
635   - {
636   - pt : "Padr&atilde;o de repeti&ccedil;&atilde;o",
637   - en : "Repeated pattern",
638   - es : "Patr&oacute;n de repetici&oacute;n"
639   - }
640   - ],
641   - 'opacidade' : [
642   - {
643   - pt : "Opacidade",
644   - en : "Opacity",
645   - es : "Opacidad"
646   - }
647   - ],
648   - 'angulo' : [
649   - {
650   - pt : "&Acirc;ngulo",
651   - en : "Angle",
652   - es : "&Aacute;ngulo"
653   - }
654   - ],
655   - 'simbolo' : [
656   - {
657   - pt : "Nome do s&iacute;mbolo. Voc&ecirc; pode tamb&eacute;m usar o caminho absoluto de uma imagem PNG existente no servidor ou clicar em um dos s&iacute;mbolos mostrados abaixo.",
658   - en : "Symbol name. You can also use the absolute path of an existing PNG image on the server or click one of the symbols shown below.",
659   - es : "Nombre del s&iacute;mbolo. Usted puede tambi&eacute;n utilizar la ruta absoluta de una imagen PNG existente en el servidor o hacer clic en uno de los s&iacute;mbolos que se presentan a continuaci&oacute;n."
660   - }
661   - ],
662   - 'listaSimbolo' : [
663   - {
664   - pt : "Lista de s&iacute;mbolos. Clique para selecionar",
665   - en : "List of symbols. Click to select",
666   - es : "Lista de s&iacute;mbolos. Haga clic para seleccionar"
667   - }
668   - ],
669   - 'graficoPizza' : [
670   - {
671   - pt : "Gr&aacute;fico de pizza",
672   - en : "Pie chart",
673   - es : "Gr&aacute;fico de torta"
674   - }
675   - ],
676   - 'numeroOcorrenciasClasses' : [
677   - {
678   - pt : "N&uacute;mero de ocorr&ecirc;ncias em cada classe (n)",
679   - en : "Number of occurrences in each class (n)",
680   - es : "N&uacute;mero de ocurrencias en cada clase (n)"
681   - }
682   - ],
683   - 'msgNumeroClasses' : [
684   - {
685   - pt : "O tema deve conter pelo menos 2 classes",
686   - en : "The theme must contain at least 2 classes",
687   - es : "El tema debe contener al menos 2 clases"
688   - }
689   - ],
690   - 'quebrasNaturais' : [
691   - {
692   - pt : "Quebras naturais",
693   - en : "Natural breaks",
694   - es : "Cortes naturales"
695   - }
696   - ],
697   - 'calcularQuantil' : [
698   - {
699   - pt : "Quantis",
700   - en : "Quantiles",
701   - es : "Cuartiles"
702   - }
703   - ],
704   - 'minScale' : [
705   - {
706   - pt : "N&atilde;o desenha se escala for menor que",
707   - en : "Do not show if scale is less than",
708   - es : "No se visualiza si la escala es menor que"
709   - }
710   - ],
711   - 'maxScale' : [
712   - {
713   - pt : "N&atilde;o desenha se escala for maior que",
714   - en : "Do not show if scale is greater than",
715   - es : "No se visualiza si la escala es mayor que"
716   - }
717   - ],
718   - 'aplicatodos' : [
719   - {
720   - pt : "Aplicar esse par&acirc;metro em todas as classes",
721   - en : "Apply this parameter to all classes",
722   - es : "Aplicar este par&aacute;metro en todas las clases"
723   - }
724   - ],
725   - 'nomeClassesUnicoSimbolo' : [
726   - {
727   - pt : "(Opcional) Item que ser&aacute; utilizado para obter os nomes das classes",
728   - en : "(Optional) Field that will be used to get class names",
729   - es : "(Opcional) Campo que se utilizará para obtener los nombres de las clases"
730   - }
731   - ],
732   - 'aplicar' : [
733   - {
734   - pt : "aplicar",
735   - en : "apply",
736   - es : "aplicar"
737   - }
738   - ],
739   - 'symbolscale' : [
740   - {
741   - pt : "Denominador da escala na qual o s&iacute;mbolo ser&aacute; apresentado com o tamanho definido. Esse par&acirc;metro funciona em conjunto com MAXSCALE e MINSCALE e &eacute; v&aacute;lido para a camada como um todo e n&atilde;o para cada estilo (afeta pontos)",
742   - en : "Scale denominator at which a symbol will be displayed with a defined size. This parameter works in conjunction with MAXSCALE and MINSCALE and is valid for the layer as a whole and not for each style (it affects points)",
743   - es : "Denominador de escala en el que el s&iacute;mbolo se mostrar&aacute; con el tama&ntilde;o definido. Este par&aacute;metro funciona en conjunto con MAXSCALE y MINSCALE y es v&aacute;lido para la capa como un todo y no para cada estilo (afecta puntos)"
744   - }
745   - ],
746   - 'minsize' : [
747   - {
748   - pt : "Menor tamanho (pixels), que os s&iacute;mbolos ser&atilde;o desenhados, quando a escala de desenho de s&iacute;mbolos estiver ativo",
749   - en : "Smaller size (pixels) at which symbols will be drawn when the symbol drawing scale is active",
750   - es : "Tama&ntilde;o m&aacute;s peque&ntilde;o (p&iacute;xeles) en el que los s&iacute;mbolos se visualizan cuando la escala de visualizaci&oacute;n de s&iacute;mbolos est&aacute; activa"
751   - }
752   - ],
753   - 'maxsize' : [
754   - {
755   - pt : "Maior tamanho (pixels), que os s&iacute;mbolos ser&atilde;o desenhados, quando a escala de desenho de s&iacute;mbolos estiver ativo",
756   - en : "Larger size (pixels) at which symbols will be drawn when the symbol drawing scale is active",
757   - es : "Tama&ntilde;o mayor (p&iacute;xeles) en el que los s&iacute;mbolos se visualizan cuando la escala de visualizaci&oacute;n de s&iacute;mbolos est&aacute; activa"
758   - }
759   - ],
760   - "editorExp" : [
761   - {
762   - pt : "Editor de express&atilde;o",
763   - en : "Expression editor",
764   - es : "Editor de expresiones"
765   - }
766   - ],
767   - "offsetx" : [
768   - {
769   - pt : "Deslocamento em <b>X</b> com rela&ccedil;&atilde;o ao ponto de inser&ccedil;&atilde;o de s&iacute;mbolo",
770   - en : "<b>X</b> offset relative to the insertion point of the symbol",
771   - es : "Desplazamiento en <b>X</b> con respecto al punto de inserci&oacute;n del s&iacute;mbolo"
772   - }
773   - ],
774   - "offsety" : [
775   - {
776   - pt : "Deslocamento em <b>Y</b> com rela&ccedil;&atilde;o ao ponto de inser&ccedil;&atilde;o de s&iacute;mbolo",
777   - en : "<b>Y</b> offset relative to the insertion point of the symbol",
778   - es : "Desplazamiento en <b>Y</b> con respecto al punto de inserci&oacute;n del s&iacute;mbolo"
779   - }
780   - ],
781   - "metade" : [
782   - {
783   - pt : "Metade. Classifica os dados em duas classes, a primeira concentra os registros que somados correspondem &agrave; primeira metade do total e a segunda classe corresponde &agrave; segunda metade",
784   - en : "Half. It classifies data into two classes, the first gathers records that together correspond to the first half of the total and the second class corresponds to the second half",
785   - es : "La mitad. Clasifica los datos en dos clases, la primera concentra los registros que sumados corresponden a la primera mitad del total y la segunda clase corresponde a la segunda mitad"
786   - }
787   - ],
788   - "duasmetades" : [
789   - {
790   - pt : "Coluna utilizada para obter os valores",
791   - en : "Column used to obtain values",
792   - es : "Columna utilizada para obtener los valores"
793   - }
794   - ],
795   - "iunico" : [
796   - {
797   - pt : "Coluna que identifica cada registro de forma &uacute;nica",
798   - en : "Column that uniquely identifies each record",
799   - es : "Columna que identifica cada registro de forma &uacute;nica"
800   - }
801   - ],
802   - "media" : [
803   - {
804   - pt : "M&eacute;dia",
805   - en : "Average",
806   - es : "Promedio"
807   - }
808   - ],
809   - "duasmedias" : [
810   - {
811   - pt : "Classifica os dados em duas classes, a primeira concentra os registros que est&atilde;o abaixo da m&eacute;dia e a segunda aqueles que s&atilde;o iguais ou superiores a m&eacute;dia",
812   - en : "It classifies data into two classes, the first gathers records that are below the average and the second gathers those records that are equal to or higher than the average",
813   - es : "Clasifica los datos en dos clases, la primera concentra los registros que est&aacute;n por debajo del promedio y la segunda agrupa aquellos que son iguales o superiores al promedio"
814   - }
815   - ],
816   - "cluster" : [
817   - {
818   - pt : "Cluster",
819   - en : "Cluster",
820   - es : "Cl&uacute;ster"
821   - }
822   - ],
823   - "clusterAjuda" : [
824   - {
825   - pt : "Faz a representa&ccedil;&atilde;o dos dados na forma de clusters. Cada cluster agrupa elementos pr&oacute;ximos e mostra as quantidades existentes. A proximidade depende da escala do mapa.",
826   - en : "Display data in clusters. Each cluster groups nearby features and shows quantities. The proximity depends on the map scale.",
827   - es : "Representa los datos en forma de cl&uacute;steres. Cada cl&uacute;ster agrupa entidades cercanas y muestra las cantidades existentes. La proximidad depende de la escala del mapa."
828   - }
829   - ],
830   - "ClusterMaxdistance" : [
831   - {
832   - pt : "Dist&acirc;ncia (pixels) m&aacute;xima entre os pontos que ser&aacute; considerada para permitir o agrupamento",
833   - en : "Maximum distance (pixels) between points to allow grouping",
834   - es : "Distancia (p&iacute;xeles) m&aacute;xima entre los puntos que se considerar&aacute; para permitir el agrupamiento"
835   - }
836   - ],
837   - "ClusterBuffer" : [
838   - {
839   - pt : "Dist&acirc;ncia em pixel, no entorno da extens&atilde;o geogr&aacute;fica do mapa ou dos tiles, se for o caso, que extende a &aacute;rea de pesuisa dos pontos para forma&ccedil;&atilde;o do agrupamento",
840   - en : "Distance in pixel around the map extent or tiles (if applicable), which extends the area of points to create cluster",
841   - es : "Distancia en p&iacute;xel alrededor de la extensi&oacute;n geogr&aacute;fica del mapa o de las teselas (si es el caso), que ampl&iacute;a el &aacute;rea de los puntos para la creaci&oacute;n de la agrupaci&oacute;n"
842   - }
843   - ],
844   - "ClusterFilter" : [
845   - {
846   - pt : "Filtro que ser&aacute; aplicado para restringir os pontos que podem participar do agrupamento. A sintaxe do filtro &eacute; a mesma utilizada na defini&ccedil;&atilde;o das express&otilde;es que definem cada classe (ver o editor de classes)",
847   - en : "Filter that will be applied to allow certain points to participate in clustering. The filter syntax is the same as the syntax used for building expressions that define each class (see class editor)",
848   - es : "Filtro que se aplicar&aacute; para restringir los puntos que pueden participar en la agrupaci&oacute;n. La sintaxis del filtro es la misma utilizada en la construcci&oacute;n de las expresiones que definen cada clase (ver el editor de clases)"
849   - }
850   - ],
851   - "ClusterRegion" : [
852   - {
853   - pt : "Tipo de forma que ser&aacute; utilizada na defini&ccedil;&atilde;o da regi&atilde;o de busca dos pontos que formar&atilde;o o agrupamento",
854   - en : "Type of shape that will be used to define the area for searching points that will make up the cluster",
855   - es : "Tipo de figura que ser&aacute; utilizada en la definici&oacute;n del &aacute;rea de b&uacute;squeda de los puntos que formar&aacute;n la agrupaci&oacute;n"
856   - }
857   - ],
858   - "ClusterGroup" : [
859   - {
860   - pt : "Item que ser&aacute; utilizado para separar os diferentes agrupamentos",
861   - en : "Field that will be used to separate different clusters",
862   - es : "Campo que se utilizar&aacute; para separar las diferentes agrupaciones"
863   - }
864   - ],
865   - "remover" : [
866   - {
867   - pt : "Remover",
868   - en : "Remove",
869   - es : "Eliminar"
870   - }
871   - ],
872   - "legendaImg" : [
873   - {
874   - pt : "URL de uma imagem que ser&aacute; utilizada no lugar da montagem autom&aacute;tica da legenda",
875   - en : "URL of an image that will be used instead of automatic legend building",
876   - es : "URL de una imagen que se utilizar&aacute; en lugar de la creaci&oacute;n autom&aacute;tica de la leyenda"
877   - }
878   - ],
879   - "offsite" : [
880   - {
881   - pt : "Cor que ser&aacute; considerada como NODATA e renderizada como transparente no caso de camadas do tipo imagem (RGB separado por v&iacute;rgulas)",
882   - en : "Color that will be used as NODATA and rendered as transparent in the case of image layers (RGB separated by commas)",
883   - es : "Color que se considerar&aacute; como NODATA y transparente en el caso de capas de tipo imagen (RGB separado por comas)"
884   - }
885   - ],
886   - 'autoClasses' : [ {
887   - pt : "A gera&ccedil;&atilde;o de classes pode ser feita automaticamente por meio da defini&ccedil;&atilde;o de colunas, existentes na tabela de atributos do tema, e que armazenem as informa&ccedil;&otilde;es sobre cor, tamanho, etc.",
888   - en : "Class generation can be done automatically by defining columns of the attribute table that store information about color, size, etc.",
889   - es : "La generaci&oacute;n de clases se puede realizar autom&aacute;ticamente mediante la definici&oacute;n de columnas existentes en la tabla de atributos del tema que almacenan informaci&oacute;n sobre el color, tama&ntilde;o, etc."
890   - } ],
891   - 'classesitem' : [ {
892   - pt : "Qual a coluna da tabela que identifica unicamente cada classe. Para cada valor ser&aacute; criada uma classe. O tema que utiliza a gera&ccedil;&atilde;o de classes de forma autom&aacute;tica, deve ter definido apenas uma classe. Essa classe ser&aacute; utilizada como padr&atilde;o para gera&ccedil;&atilde;o das demais.",
893   - en : "Which is the column of the table that uniquely identifies each class? For each value a class will be created. The theme that will be used to generate classes automatically must have only one class. This class will be used as a template for the other classes.",
894   - es : "&iquest;Cu&aacute;l es la columna de la tabla que identifica exclusivamente a cada clase? Para cada valor se crear&aacute; una clase. En el tema que se utilizar&aacute; para la generaci&oacute;n autom&aacute;tica de las clases debe estar definida solo una clase. Esta clase se utilizar&aacute; como patr&oacute;n para la generaci&oacute;n de las dem&aacute;s."
895   - } ],
896   - 'classesnome' : [ {
897   - pt : "Nome da coluna que ser&aacute; utilizada para compor o nome das classes geradas automaticamente.",
898   - en : "Column names that will be used to name classes generated automatically.",
899   - es : "Nombre de la columna que se utilizar&aacute; para poner el nombre de las clases generadas autom&aacute;ticamente."
900   - } ],
901   - 'classescor' : [ {
902   - pt : "Nome da coluna que definir&aacute; a cor do s&iacute;mbolo utilizado em cada classe. As cores devem ser definidas em RGB.",
903   - en : "Column name that will define the symbol color used in each class. Colors must be set in RGB.",
904   - es : "Nombre de columna que definir&aacute; el color del s&iacute;mbolo utilizado en cada clase. Los colores se deben definir en RGB."
905   - } ],
906   - 'classessimbolo' : [ {
907   - pt : "Nome da coluna que definir&aacute; o s&iacute;mbolo utilizado em cada classe.",
908   - en : "Column name that will define the symbol used in each class.",
909   - es : "Nombre de la columna que definir&aacute; el s&iacute;mbolo utilizado en cada clase."
910   - } ],
911   - 'classestamanho' : [ {
912   - pt : "Nome da coluna que definir&aacute; o tamanho de cada s&iacute;mbolo.",
913   - en : "Column name that will define the size of each symbol.",
914   - es : "Nombre de la columna que definir&aacute; el tama&ntilde;o de cada s&iacute;mbolo."
915   - } ],
916   - 'palletefile' : [ {
917   - pt : "Palete de cores. Endere&ccedil;o do arquivo no servidor (opcional)",
918   - en : "Color palette. File address on the server (optional)",
919   - es : "Paleta de colores. Direcci&oacute;n del archivo en el servidor (opcional)"
920   - } ],
921   - 'palletestep' : [ {
922   - pt : "Quantas cores em cada n&iacute;vel da palete (opcional)",
923   - en : "How many colors on each palette level? (optional)",
924   - es : "&iquest;Cu&aacute;ntos colores en cada nivel de la paleta? (opcional)"
925   - } ],
926   - "colunasTxt" : [ {
927   - pt : "Colunas dispon&iacute;veis",
928   - en : "Available columns",
929   - es : "Columnas disponibles"
930   - } ],
931   - "inverte" : [ {
932   - pt : "Inverte as cores",
933   - en : "Reverses colors",
934   - es : "Invierte los colores"
935   - } ],
936   - "calculaTamanho" : [ {
937   - pt : "Varia a textura ou tamanho",
938   - en : "Changes texture or size",
939   - es : "Var&iacute;a la textura o el tama&ntilde;o"
940   - } ],
941   - "existentes" : [ {
942   - pt : "Processos existentes",
943   - en : "Existing processes",
944   - es : "Procesos existentes"
945   - } ],
946   - "edicaoEstilo" : [ {
947   - pt : "Edi&ccedil;&atilde;o do estilo escolhido",
948   - en : "Editing the selected style",
949   - es : "Edici&oacute;n del estilo seleccionado"
950   - } ],
951   - "corContorno" : [ {
952   - pt : "Cor do contorno",
953   - en : "Outline color",
954   - es : "Color del contorno"
955   - } ]
956   - };
957 0 \ No newline at end of file
ferramentas/legenda_old/exec.php
... ... @@ -1,182 +0,0 @@
1   -<?php
2   -include(dirname(__FILE__)."/../safe.php");
3   -verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false);
4   -//
5   -//faz a busca da fun&ccedil;&atilde;o que deve ser executada
6   -//
7   -$retorno = ""; //string que ser&aacute; retornada ao browser via JSON
8   -switch (strtoupper($funcao))
9   -{
10   - case "PARAMETROSAUTO":
11   - $map = ms_newMapObj($map_file);
12   - $layer = $map->getlayerbyname($tema);
13   - $retorno = array();
14   - $retorno["classesitem"] = $layer->getmetadata("classesitem");
15   - $retorno["classesnome"] = $layer->getmetadata("classesnome");
16   - $retorno["classescor"] = $layer->getmetadata("classescor");
17   - $retorno["classessimbolo"] = $layer->getmetadata("classessimbolo");
18   - $retorno["classestamanho"] = $layer->getmetadata("classestamanho");
19   - $retorno["palletefile"] = $layer->getmetadata("palletefile");
20   - $retorno["palletestep"] = $layer->getmetadata("palletestep");
21   - $sopen = $layer->open();
22   - if($sopen != MS_FAILURE){
23   - $items = $layer->getItems();
24   - }
25   - else{
26   - $items = array();
27   - }
28   - $retorno["colunas"] = implode(",",$items);
29   - break;
30   - case "SALVAPARAMETROSAUTO":
31   - $map = ms_newMapObj($map_file);
32   - $layer = $map->getlayerbyname($tema);
33   - $layer->setmetadata("classesitem",$_GET["classesitem"]);
34   - $layer->setmetadata("classesnome",$_GET["classesnome"]);
35   - $layer->setmetadata("classescor",$_GET["classescor"]);
36   - $layer->setmetadata("classessimbolo",$_GET["classessimbolo"]);
37   - $layer->setmetadata("classestamanho",$_GET["classestamanho"]);
38   - $layer->setmetadata("palletefile",$_GET["palletefile"]);
39   - $layer->setmetadata("palletestep",$_GET["palletestep"]);
40   - $layer->setmetadata("cache","nao");
41   - $layer->setmetadata("TILES","nao");
42   -
43   - autoClasses($layer,$map,$locaplic);
44   - $layer->setmetadata("classesnome","");
45   - $layer->setmetadata("palletefile","");
46   - $map->save($map_file);
47   - $retorno = "ok";
48   - break;
49   -/*
50   -Valor: TEMA2SLD
51   -
52   -Mostra na tela o SLD de um tema
53   -
54   -<Temas->sld>
55   -*/
56   - case "TEMA2SLD":
57   - include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php");
58   - $m = new Temas($map_file,$tema);
59   - $sld = $m->sld();
60   - echo header('Content-Disposition: attachment; filename="'.$tema.'.sld"');
61   - echo header("Content-type: application/xml");
62   - echo $m->sld();
63   - exit;
64   - break;
65   -/*
66   -function: ADICIONALABELCLASSE
67   -
68   -Adiciona LABEL em uma classe de um layer
69   -
70   -<Temas->adicionaLabel>
71   -*/
72   - case "ADICIONALABELCLASSE":
73   - include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php");
74   - $m = new Temas($map_file,$tema);
75   - $l = $m->mapa->getlayerbyname($tema);
76   - if(empty($_GET["item"]))
77   - {$retorno = "erro";}
78   - else{
79   - //$l->set("labelitem",$item);
80   - $novac = $l->getclass($_GET["classe"]);
81   - $m->adicionaLabel($novac,$_GET["wrap"],$_GET["fonte"],$_GET["tamanho"],$_GET["angulo"],$_GET["fundo"],$_GET["sombra"],$_GET["cor"],$_GET["outlinecolor"],$_GET["shadowcolor"],$_GET["shadowsizex"],$_GET["shadowsizey"],$_GET["force"],$_GET["mindistance"],$_GET["minfeaturesize"],$_GET["offsetx"],$_GET["offsety"],$_GET["partials"],$_GET["position"],"[".$_GET["item"]."]");
82   - $m->salva();
83   - $retorno = "ok";
84   - }
85   - break;
86   -/*
87   -function: REMOVELABELCLASSE
88   -
89   -Remove LABEL em uma classe de um layer
90   -*/
91   - case "REMOVELABELCLASSE":
92   - include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php");
93   - $m = new Temas($map_file,$tema);
94   - $m->removeLabel($_GET["classe"]);
95   - $m->salva();
96   - $retorno = "ok";
97   - break;
98   -/*
99   -Valor: EDITALEGENDA
100   -
101   -Cria elementos para construir uma legenda no formato de tabela em HTML.
102   -
103   -<Legenda->tabelaLegenda>
104   -*/
105   - case "EDITALEGENDA":
106   - include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php");
107   -
108   - $m = new Legenda($map_file,$locaplic,$tema);
109   - $r = $m->tabelaLegenda();
110   - if (!$r){
111   - $r = "erro.Erro legenda nao disponivel";
112   - }
113   - $retorno = $r;
114   - break;
115   -/*
116   -Valor: CONTAGEMCLASSE
117   -
118   -Acrescenta a contagem de elementos em cada classe.
119   -
120   -<Legenda->tabelaLegenda>
121   -*/
122   - case "CONTAGEMCLASSE":
123   - //apresenta erro com palavras acentuadas
124   - include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php");
125   - $m = new Legenda($map_file,$locaplic,$tema);
126   - $r = $m->tabelaLegenda("sim");
127   - $m->salva();
128   - if (!$r){$r = "erro.Erro legenda nao disponivel";}
129   - $retorno = $r;
130   - break;
131   - /*
132   - Valor: APLICATODASCLASSES
133   -
134   - Aplica um parametro a todas as classes
135   - */
136   - case "APLICATODASCLASSES":
137   - include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php");
138   - $m = new Legenda($map_file,$locaplic,$tema);
139   - $r = $m->aplicaTodasClasses($_GET["parametro"],$_GET["valor"]);
140   - $m->salva();
141   - if (!$r){$r = "erro.Erro legenda nao disponivel";}
142   - $retorno = $r;
143   - break;
144   - case "APLICARCLUSTER":
145   - include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php");
146   - $m = new Temas($map_file,$tema);
147   - $l = $m->mapa->getlayerbyname($tema);
148   - if($filter != ""){
149   - //$filter = base64decode($filter);
150   - }
151   - $m->criaCluster($_GET["group"],$_GET["filter"],$_GET["maxdistance"],$_GET["region"],$_GET["buffer"]);
152   - $m->salva();
153   - $retorno = "ok";
154   - break;
155   - case "REMOVERCLUSTER":
156   - include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php");
157   - $m = new Temas($map_file,$tema);
158   - $l = $m->mapa->getlayerbyname($tema);
159   - $m->removeCluster();
160   - $m->salva();
161   - $retorno = "ok";
162   - break;
163   - case "APLICALEGENDAIMG":
164   - include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php");
165   - $m = new Legenda($map_file,$locaplic,$tema);
166   - $m->aplicaLegendaImg($_GET["imagem"]);
167   - $m->salva();
168   - $retorno = "ok";
169   - break;
170   - case "APLICAOFFSITE":
171   - include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php");
172   - $m = new Temas($map_file,$tema);
173   - $m->mudaOffsite($_GET["offsite"]);
174   - $m->salva();
175   - $retorno = "ok";
176   - break;
177   -}
178   -if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){
179   - restauraCon($map_file,$postgis_mapa);
180   -}
181   -cpjson($retorno);
182   -?>
183 0 \ No newline at end of file
ferramentas/legenda_old/index.js
... ... @@ -1,2052 +0,0 @@
1   -/*
2   - Title: Editor de legenda
3   -
4   - Define a forma de representa&ccedil;&atilde;o de um tema, modificando o tipo de classifica&ccedil;&atilde;o e os s&iacute;mbolos utilizados em cada classe
5   -
6   - Veja:
7   -
8   - <i3GEO.tema.dialogo.editaLegenda>
9   -
10   - Arquivo:
11   -
12   - i3geo/ferramentas/legenda/index.js.php
13   -
14   - Licenca:
15   -
16   - GPL2
17   -
18   - i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
19   -
20   - Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
21   - Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
22   -
23   - Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
24   - e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
25   - GNU conforme publicada pela Free Software Foundation;
26   -
27   - Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
28   - por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
29   - de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
30   - Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
31   - Voc&ecirc; deve ter recebido uma c&oacute;pia da Licen&ccedil;a P&uacute;blica Geral do
32   - GNU junto com este programa; se n&atilde;o, escreva para a
33   - Free Software Foundation, Inc., no endere&ccedil;o
34   - 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35   - */
36   -
37   -if (typeof (i3GEOF) === 'undefined') {
38   - var i3GEOF = {};
39   -}
40   -/*
41   - * Classe: i3GEOF.legenda
42   - */
43   -//incuir opcao para inserir o nome de uma imagem da legenda
44   -i3GEOF.legenda =
45   -{
46   - /*
47   - * Variavel: parDefault
48   - *
49   - * Parametros padr&atilde;o utilizados para formatar os labels
50   - */
51   - parDefault : "&position=MS_UR&partials=1&offsetx=0&offsety=0&minfeaturesize=auto&mindistance=auto&force=0&shadowsizex=1&shadowsizey=1&cor=0 0 0&sombray=1&sombrax=1&angulo=0&tamanho=8&fonte=bitmap&fundo=off&sombra=off&outlinecolor=off&shadowcolor=off&wrap=",
52   - /*
53   - * Variavel: aviso
54   - *
55   - * Indica que uma altera&ccedil;&atilde;o ainda n&atilde;o foi salva
56   - *
57   - * Type: {boolean}
58   - */
59   - aviso : false,
60   - /*
61   - * Variavel: tema
62   - *
63   - * Tema que ser&aacute; utilizado
64   - *
65   - * Type: {string}
66   - */
67   - tema : i3GEO.temaAtivo,
68   - /*
69   - * Variavel: dadosGrafico
70   - *
71   - * Dados utilizados no gr&aacute;fico no formato da ferramenta graficointerativo
72   - */
73   - dadosGrafico : "",
74   - /*
75   - * Variavel: aguarde
76   - *
77   - * Estilo do objeto DOM com a imagem de aguarde existente no cabe&ccedil;alho da janela.
78   - */
79   - aguarde : "",
80   - /*
81   - * Variavel: estilos
82   - *
83   - * Estilos existentes em um s&iacute;mbolo de uma classe
84   - */
85   - estilos : "",
86   - /*
87   - * Variavel: estilo
88   - *
89   - * Ultimo estilo selecionado
90   - */
91   - estilo : 0,
92   - /*
93   - * Variavel: classe
94   - *
95   - * Ultima classe selecionado
96   - */
97   - classe : "",
98   - templateDir : "../ferramentas/legenda",
99   - /**
100   - * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php
101   - */
102   - MUSTACHE : "",
103   - MUSTACHELISTA : "",
104   - MUSTACHEESTILO : "",
105   - DICIONARIO: "",
106   - /**
107   - * Funcao do usuario que e executada apos iniciar a ferramenta
108   - */
109   - aposIniciar : function(){
110   -
111   - },
112   - /**
113   - * Susbtitutos para o template
114   - */
115   - mustacheHash : function() {
116   - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.legenda.dicionario);
117   - dicionario["locaplic"] = i3GEO.configura.locaplic;
118   - dicionario["asp"] = '"';
119   - dicionario["aplicar"] = $trad("p14");
120   - //para reaproveitamento
121   - i3GEOF.legenda.DICIONARIO = dicionario;
122   - return dicionario;
123   - },
124   - /*
125   - * Function: inicia
126   - *
127   - * Inicia a ferramenta. &Eacute; chamado por criaJanelaFlutuante
128   - *
129   - * Parametro:
130   - *
131   - * iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
132   - */
133   - inicia : function(iddiv) {
134   - if(i3GEOF.legenda.MUSTACHE == ""){
135   - var d = i3GEOF.legenda.templateDir;
136   - var t1 = d + "/template_mst.html",
137   - t2 = d + "/templateLista_mst.html",
138   - t3 = d + "/templateFormEstilo_mst.html";
139   - $.when( $.get(t1),$.get(t2),$.get(t3) ).done(function(r1,r2,r3) {
140   - i3GEOF.legenda.MUSTACHE = r1[0];
141   - i3GEOF.legenda.MUSTACHELISTA = r2[0];
142   - i3GEOF.legenda.MUSTACHEESTILO = r3[0];
143   - i3GEOF.legenda.inicia(iddiv);
144   - }).fail(function() {
145   - i3GEO.janela.closeMsg($trad("erroTpl"));
146   - return;
147   - });
148   - return;
149   - }
150   -
151   - try {
152   - $i(iddiv).innerHTML = i3GEOF.legenda.html();
153   - if (!$i("i3GEOFlegendaComboCabecaSel")) {
154   - i3GEO.janela.comboCabecalhoTemasBs("i3GEOFlegendaComboCabeca", "i3GEOFlegendaComboCabecaSel", "legenda", "ligados",function(evt){
155   - var botao = evt.target;
156   - if (botao) {
157   - if (botao.value != "") {
158   - i3GEO.mapa.ativaTema(botao.value);
159   - i3GEOF.legenda.tema = botao.value;
160   - $i(iddiv).innerHTML = "";
161   - i3GEOF.legenda.inicia(iddiv);
162   - } else {
163   - //$i(iddiv).innerHTML = "";
164   - }
165   - }
166   - });
167   - }
168   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia1", "i3GEOlegendaguia");
169   - // eventos das guias
170   - $i("i3GEOlegendaguia8").onclick = function() {
171   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia8", "i3GEOlegendaguia");
172   - i3GEOF.legenda.parametrosAuto();
173   - };
174   - $i("i3GEOlegendaguia7").onclick = function() {
175   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia7", "i3GEOlegendaguia");
176   - };
177   - $i("i3GEOlegendaguia6").onclick = function() {
178   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia6", "i3GEOlegendaguia");
179   - };
180   - $i("i3GEOlegendaguia1").onclick = function() {
181   - i3GEOF.legenda.mostralegenda();
182   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia1", "i3GEOlegendaguia");
183   - };
184   - $i("i3GEOlegendaguia2").onclick = function() {
185   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia2", "i3GEOlegendaguia");
186   - };
187   - $i("i3GEOlegendaguia3").onclick = function() {
188   - i3GEO.janela.tempoMsg($trad('ajuda', i3GEOF.legenda.dicionario));
189   - };
190   - $i("i3GEOlegendaguia4").onclick = function() {
191   - i3GEOF.legenda.mostraGrafico();
192   - };
193   - $i("i3GEOlegendaguia5").onclick = function() {
194   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia5", "i3GEOlegendaguia");
195   - };
196   -
197   - i3GEOF.legenda.ativaFoco();
198   - i3GEOF.legenda.mostralegenda();
199   - i3GEOF.legenda.montaCombosItens();
200   - var objTema = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema);
201   - if (objTema.classe && objTema.classe.toLowerCase() == "nao") {
202   - $i("i3GEOFlegendamostra").checked = false;
203   - }
204   - if(objTema.legendaimg){
205   - $i("i3GEOlegendaImg").value = objTema.legendaimg;
206   - }
207   - if(objTema.offsite){
208   - $i("i3GEOoffsite").value = objTema.offsite;
209   - }
210   -
211   - i3GEO.util.aplicaAquarela("i3GEOF.legenda_corpo");
212   - i3GEOF.legenda.aposIniciar.call();
213   - } catch (erro) {
214   - i3GEOF.legenda.aposIniciar = function(){};
215   - }
216   - i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda");
217   - },
218   - sldi: function() {
219   - i3GEO.tema.dialogo.aplicarsld(i3GEOF.legenda.tema);
220   - },
221   - slde: function() {
222   - window.open(i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?funcao=tema2sld&tema="
223   - + i3GEOF.legenda.tema
224   - + "&g_sid="
225   - + i3GEO.configura.sid);
226   - },
227   - propriedadesLabels: function() {
228   - i3GEO.util.scriptTag(
229   - i3GEO.configura.locaplic + "/ferramentas/opcoes_label/dependencias.php",
230   - "i3GEOF.proplabel.iniciaJanelaFlutuante(false)",
231   - "i3GEOFproplabel",
232   - false);
233   - },
234   - incluirLabels: function() {
235   - var par, p, temp, cp;
236   - try {
237   - par = i3GEOF.proplabel.pegaPar();
238   - i3GEOF.legenda.parDefault = par;
239   - } catch (e) {
240   - par = i3GEOF.legenda.parDefault;
241   - }
242   - i3GEOF.legenda.aguarde.visibility = "visible";
243   - temp = function() {
244   - i3GEOF.legenda.aguarde.visibility = "hidden";
245   - i3GEOF.legenda.aposAlterarLegenda();
246   - i3GEOF.legenda.aguarde.visibility = "hidden";
247   - };
248   - p =
249   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
250   - + i3GEO.configura.sid
251   - + "&funcao=adicionaLabelClasse&tema="
252   - + i3GEOF.legenda.tema
253   - + "&classe="
254   - + i3GEOF.legenda.classe
255   - + par;
256   - p += "&item=" + $i("i3GEOlegendaSelItemLabel").value;
257   - cp = new cpaint();
258   - cp.set_response_type("JSON");
259   - cp.call(p, "foo", temp);
260   - },
261   - excluiLabels: function() {
262   - var p, temp, cp;
263   - i3GEOF.legenda.aguarde.visibility = "visible";
264   - temp = function() {
265   - i3GEOF.legenda.aguarde.visibility = "hidden";
266   - i3GEOF.legenda.aposAlterarLegenda();
267   - i3GEOF.legenda.aguarde.visibility = "hidden";
268   - };
269   - p =
270   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
271   - + i3GEO.configura.sid
272   - + "&funcao=removeLabelClasse&tema="
273   - + i3GEOF.legenda.tema
274   - + "&classe="
275   - + i3GEOF.legenda.classe;
276   - cp = new cpaint();
277   - cp.set_response_type("JSON");
278   - cp.call(p, "foo", temp);
279   - },
280   - janelaCorRamp: function(){
281   - var tabela = $i("i3GEOlegendalegenda");
282   - var trs = tabela.getElementsByTagName("tr");
283   - var ncores = trs.length - 1;
284   - i3GEO.util.abreColourRamp("", "listaColourRamp", ncores, i3GEOF.legenda.tema);
285   - },
286   - /*
287   - * Function: html
288   - *
289   - * Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das op&ccedil;&otilde;es da ferramenta
290   - *
291   - * Retorno:
292   - *
293   - * String com o c&oacute;digo html
294   - */
295   - html : function() {
296   - var ins = Mustache.render(i3GEOF.legenda.MUSTACHE, i3GEOF.legenda.mustacheHash());
297   - return ins;
298   - },
299   - /*
300   - * Function: iniciaJanelaFlutuante
301   - *
302   - * Cria a janela flutuante para controle da ferramenta.
303   - */
304   - iniciaJanelaFlutuante : function() {
305   - var minimiza, cabecalho, janela, divid, temp, titulo;
306   - if ($i("i3GEOF.legenda")) {
307   - i3GEOF.legenda.tema = i3GEO.temaAtivo;
308   - i3GEOF.legenda.inicia("i3GEOF.legenda_corpo");
309   - return;
310   - }
311   - cabecalho = function() {
312   - i3GEOF.legenda.ativaFoco();
313   - };
314   - minimiza = function() {
315   - i3GEO.janela.minimiza("i3GEOF.legenda");
316   - };
317   - // cria a janela flutuante
318   - titulo = "<span class='i3GeoTituloJanelaBsNolink' >"+$trad("t33")+"</span></div>";
319   -
320   - janela = i3GEO.janela.cria(
321   - "590px",
322   - "350px",
323   - "",
324   - "",
325   - "",
326   - titulo,
327   - "i3GEOF.legenda",
328   - false,
329   - "hd",
330   - cabecalho,
331   - minimiza,
332   - function() {i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda");},
333   - true,
334   - "",
335   - "",
336   - "",
337   - "",
338   - "41"
339   - );
340   - divid = janela[2].id;
341   - i3GEOF.legenda.aguarde = $i("i3GEOF.legenda_imagemCabecalho").style;
342   - $i("i3GEOF.legenda_corpo").style.backgroundColor = "white";
343   - i3GEOF.legenda.inicia(divid);
344   - },
345   - /*
346   - * Function: ativaFoco
347   - *
348   - * Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
349   - */
350   - ativaFoco : function() {
351   -
352   - },
353   - /*
354   - * Function: aposAlterarLegenda
355   - *
356   - * Fun&ccedil;&atilde;o executada ap&oacute;s ocorrer alguma altera&ccedil;&atilde;o efetiva da legenda do mapa
357   - */
358   - aposAlterarLegenda : function() {
359   - i3GEO.arvoreDeCamadas.CAMADAS = [];
360   - i3GEO.atualiza();
361   - i3GEO.Interface.atualizaTema("", i3GEOF.legenda.tema);
362   - },
363   - /*
364   - * Function: mostralegenda
365   - *
366   - * Pega os dados da legenda do mapa atual e mostra na tela
367   - *
368   - * Veja:
369   - *
370   - * <EDITALEGENDA>
371   - */
372   - mostralegenda : function() {
373   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
374   - return;
375   - }
376   - i3GEOF.legenda.aguarde.visibility = "visible";
377   - var p, cp;
378   - p =
379   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
380   - + i3GEO.configura.sid
381   - + "&funcao=editalegenda&opcao=edita&tema="
382   - + i3GEOF.legenda.tema;
383   - cp = new cpaint();
384   - cp.set_response_type("JSON");
385   - cp.call(p, "tabelaLegenda", i3GEOF.legenda.montaLegenda);
386   - },
387   - /*
388   - * Function: montaLegenda
389   - *
390   - * Formata a tabela de edi&ccedil;&atilde;o da legenda
391   - *
392   - * Parametro:
393   - *
394   - * retorno - objeto contendo os dados para formata&ccedil;&atilde;o da legenda
395   - */
396   - montaLegenda : function(retorno) {
397   - i3GEOF.legenda.aviso = false;
398   - try {
399   - if (retorno.data != undefined) {
400   - //hidden e utilizado para esconder ou mostrar determinados trechos do template
401   - var mustache = [], b, ins, i, ajuda, id, re, exp, n, filtro,temp = {};
402   - // se nao for do tipo raster
403   - if (retorno.data[0].proc === "") {
404   - n = retorno.data.length;
405   - for (i = 0; i < n; i++) {
406   - temp = {};
407   - id = retorno.data[i].tema + "-" + retorno.data[i].idclasse;
408   - re = new RegExp("'", "g");
409   - exp = (retorno.data[i].expressao).replace(re, '"');
410   - temp.cliqueExclui = $trad('cliqueExclui', i3GEOF.legenda.dicionario);
411   - temp.cliqueAltera = $trad('cliqueAltera', i3GEOF.legenda.dicionario);
412   - temp.imagem = retorno.data[i].imagem;
413   - temp.id = id;
414   - temp.idclasse = retorno.data[i].idclasse;
415   - temp.novoNome = $trad('digitaNovoNome', i3GEOF.legenda.dicionario);
416   - temp.nome = retorno.data[i].nomeclasse;
417   - temp.editorExp = $trad("editorExp", i3GEOF.legenda.dicionario);
418   - temp.exp = exp;
419   - temp.txtMinscale = $trad('minScale', i3GEOF.legenda.dicionario);
420   - temp.minScale = retorno.data[i].minScale;
421   - temp.txtMaxScale = $trad('maxScale', i3GEOF.legenda.dicionario);
422   - temp.maxScale = retorno.data[i].maxScale;
423   - temp.sobe = $trad('sobe', i3GEOF.legenda.dicionario);
424   - temp.desce = $trad('desce', i3GEOF.legenda.dicionario);
425   - mustache.push(temp);
426   - }
427   - ins = Mustache.render(
428   - i3GEOF.legenda.MUSTACHELISTA,
429   - $.extend(
430   - {},
431   - {
432   - "linhas" : mustache,
433   - "hidden2":"",
434   - "hidden1": "hidden"
435   - },
436   - i3GEOF.legenda.DICIONARIO
437   - )
438   - );
439   - $i("i3GEOlegendaguia1objLegenda").innerHTML = ins;
440   - } else {
441   - ajuda = i3GEOF.legenda.DICIONARIO['ajudaEscalaCores']
442   - + "<p>"
443   - + i3GEOF.legenda.DICIONARIO['msgEscalaCoresAuto']
444   - + "<p>"
445   - + i3GEOF.legenda.DICIONARIO['msgEscalaCoresIndividual']
446   - + "<p>"
447   - + i3GEOF.legenda.DICIONARIO['msgBandas']
448   - + "<p>"
449   - + i3GEOF.legenda.DICIONARIO['msgReamostragem'];
450   -
451   - mustache = [];
452   - for (i = 0; i < retorno.data[0].proc.length; i++) {
453   - mustache.push({
454   - "value": retorno.data[0].proc[i]
455   - });
456   - }
457   -
458   - ins = Mustache.render(
459   - i3GEOF.legenda.MUSTACHELISTA,
460   - $.extend(
461   - {},
462   - {
463   - "hidden2":"hidden",
464   - "hidden1": "",
465   - "ajuda1": ajuda,
466   - "processos": mustache
467   - },
468   - i3GEOF.legenda.DICIONARIO
469   - )
470   - );
471   - $i("i3GEOlegendaguia1objLegenda").innerHTML = ins;
472   - }
473   - } else {
474   - $i("i3GEOlegendaresultado").innerHTML = "<p style=color:red >Erro<br>";
475   - }
476   - i3GEOF.legenda.aguarde.visibility = "hidden";
477   - } catch (e) {
478   - i3GEOF.legenda.aguarde.visibility = "hidden";
479   - }
480   - },
481   - filtro : function(idRetorno) {
482   - i3GEO.tema.dialogo.filtro(i3GEOF.legenda.tema, true, idRetorno);
483   - },
484   - /*
485   - * Function: aviso
486   - *
487   - * Mostra um i3GEO.janela.tempoMsga ao usu&aacute;rio quando um campo da tabela que cont&eacute;m os dados da legenda &eacute;
488   - * alterado
489   - *
490   - * O aviso &eacute; mostrado apenas uma vez
491   - */
492   - aviso : function() {
493   - if (i3GEOF.legenda.aviso == true) {
494   - i3GEO.janela.tempoMsg($trad('msgAplicaAlteracao', i3GEOF.legenda.dicionario));
495   - i3GEOF.legenda.aviso == false;
496   - }
497   - },
498   - /*
499   - * Function: aplicaColourRamp
500   - *
501   - * Aplica nas classes da legenda as cores escolhidas no seletor de cores
502   - */
503   - aplicaColourRamp : function() {
504   - if ($i("listaColourRamp").value != "") {
505   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
506   - return;
507   - }
508   - i3GEOF.legenda.aguarde.visibility = "visible";
509   - var cores = $i("listaColourRamp").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), temp = function() {
510   - i3GEOF.legenda.aguarde.visibility = "hidden";
511   - i3GEOF.legenda.mostralegenda();
512   - i3GEOF.legenda.aposAlterarLegenda();
513   - }, p =
514   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
515   - + i3GEO.configura.sid
516   - + "&funcao=alteraclasse&opcao=aplicacoresrgb&ext="
517   - + ext
518   - + "&tema="
519   - + i3GEOF.legenda.tema, cp = new cpaint();
520   - cp.set_transfer_mode('POST');
521   - cp.set_response_type("JSON");
522   - cp.call(p, "foo", temp, "cores=" + cores);
523   - }
524   - },
525   - /*
526   - * Function: corj
527   - *
528   - * Abre a janela para o usu&aacute;rio selecionar uma cor interativamente
529   - */
530   - corj : function(obj) {
531   - i3GEO.util.abreCor("", obj);
532   - },
533   - /*
534   - * Function: modificaCor
535   - *
536   - * Modifica a cor de uma classe
537   - */
538   - modificaCor : function(id) {
539   - var obj = $i("tempCorLegenda");
540   - if (!obj) {
541   - var obj = document.createElement("input");
542   - obj.id = "tempCorLegenda";
543   - obj.style.display = "none";
544   - obj.type = "text";
545   - obj.value = "";
546   - document.body.appendChild(obj);
547   - obj.onchange = function() {
548   - i3GEOF.legenda.aplicaNovaCor($i("tempCorLegenda").name);
549   - };
550   - }
551   - obj.name = id;
552   - i3GEO.util.abreCor("", "tempCorLegenda");
553   - },
554   - aplicaNovaCor : function(id) {
555   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
556   - return;
557   - }
558   - i3GEOF.legenda.aguarde.visibility = "visible";
559   - var retorna = function() {
560   - i3GEOF.legenda.aposAlterarLegenda();
561   - i3GEOF.legenda.aguarde.visibility = "hidden";
562   - i3GEOF.legenda.mostralegenda();
563   - };
564   - i3GEO.php.aplicaCorClasseTema(retorna, i3GEOF.legenda.tema, id, $i("tempCorLegenda").value);
565   - },
566   - aplicarLegendaImg : function() {
567   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
568   - return;
569   - }
570   - //muda o valor do objeto tema para que a proxima vez que abrir a ferramenta o campo input seja preenchido corretamente
571   - var objTema = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema);
572   - objTema.legendaimg = $i("i3GEOlegendaImg").value;
573   -
574   - i3GEOF.legenda.aguarde.visibility = "visible";
575   - var retorna = function() {
576   - i3GEOF.legenda.aposAlterarLegenda();
577   - i3GEOF.legenda.aguarde.visibility = "hidden";
578   - i3GEOF.legenda.mostralegenda();
579   - };
580   - var p =
581   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
582   - + i3GEO.configura.sid
583   - + "&funcao=aplicaLegendaImg"
584   - + "&tema="
585   - + i3GEOF.legenda.tema
586   - + "&imagem="
587   - + objTema.legendaimg,
588   - cp = new cpaint();
589   - cp.set_response_type("JSON");
590   - cp.call(p, "foo", retorna);
591   - },
592   - aplicarOffsite : function() {
593   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
594   - return;
595   - }
596   - //muda o valor do objeto tema para que a proxima vez que abrir a ferramenta o campo input seja preenchido corretamente
597   - var objTema = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema);
598   - objTema.offsite = $i("i3GEOoffsite").value;
599   -
600   - i3GEOF.legenda.aguarde.visibility = "visible";
601   - var retorna = function() {
602   - i3GEOF.legenda.aposAlterarLegenda();
603   - i3GEOF.legenda.aguarde.visibility = "hidden";
604   - i3GEOF.legenda.mostralegenda();
605   - };
606   - var p =
607   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
608   - + i3GEO.configura.sid
609   - + "&funcao=aplicaOffsite"
610   - + "&tema="
611   - + i3GEOF.legenda.tema
612   - + "&offsite="
613   - + objTema.offsite,
614   - cp = new cpaint();
615   - cp.set_response_type("JSON");
616   - cp.call(p, "foo", retorna);
617   - },
618   - /*
619   - * Function: mudaLegenda
620   - *
621   - * Altera a legenda conforme os valores existentes na tabela de propriedades (express&atilde;o e nome da classe)
622   - *
623   - * Veja:
624   - *
625   - * <ALTERACLASSE>
626   - */
627   - mudaLegenda : function() {
628   - i3GEOF.legenda.aviso = false;
629   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
630   - return;
631   - }
632   - i3GEOF.legenda.aguarde.visibility = "visible";
633   - try {
634   - var tabela = $i("i3GEOlegendalegenda"),
635   - trs = tabela.getElementsByTagName("tr"),
636   - minScales = [],
637   - maxScales = [],
638   - nomes = [],
639   - exps = [],
640   - ids = [],
641   - t, nn, n, p, cp, temp;
642   - for (t = 1; t < trs.length; t++) {
643   - if (trs[t].childNodes) {
644   - nn = trs[t].childNodes;
645   - for (n = 0; n < nn.length; n++) {
646   - if (nn && nn[n] && nn[n].childNodes && nn[n].getElementsByTagName) {
647   - var isn = nn[n].getElementsByTagName("input");
648   - if (isn && isn[0] != undefined) {
649   - if (isn[0].name == "nome") {
650   - nomes.push(isn[0].value);
651   - temp = (isn[0].id).split("i3GEOlegendaid_");
652   - ids.push(temp[1]);
653   - }
654   - if (isn[0].name == "expressao") {
655   - exps.push(isn[0].value);
656   - }
657   - if (isn[0].name == "minScale") {
658   - minScales.push(parseInt(isn[0].value, 10));
659   - }
660   - if (isn[0].name == "maxScale") {
661   - maxScales.push(parseInt(isn[0].value, 10));
662   - }
663   - }
664   - }
665   - }
666   - }
667   - }
668   - ids = ids.join(";");
669   - nomes = nomes.join(";");
670   - exps = exps.join(";");
671   - minScales = minScales.join(";");
672   - maxScales = maxScales.join(";");
673   - temp = function() {
674   - i3GEOF.legenda.aguarde.visibility = "hidden";
675   - i3GEOF.legenda.mostralegenda();
676   - i3GEOF.legenda.aposAlterarLegenda();
677   - i3GEOF.legenda.aguarde.visibility = "hidden";
678   - };
679   - var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
680   - p =
681   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?"
682   - + "base64=sim"
683   - + "&g_sid="
684   - + i3GEO.configura.sid
685   - + "&funcao=alteraclasse"
686   - + "&opcao=alteraclasses"
687   - + "&ext="
688   - + ext;
689   - cp = new cpaint();
690   - cp.set_transfer_mode('POST');
691   - cp.set_response_type("JSON");
692   - cp.call(p, "alteraclassesPost", temp, "ids=" + ids
693   - + "&nomes="
694   - + i3GEO.util.base64encode(nomes)
695   - //+ nomes
696   - + "&exps="
697   - + i3GEO.util.base64encode(exps)
698   - //+ exps
699   - + "&minScales="
700   - + minScales
701   - + "&maxScales="
702   - + maxScales);
703   - } catch (e) {
704   - i3GEO.janela.tempoMsg("Erro: " + e);
705   - i3GEOF.legenda.aguarde.visibility = "hidden";
706   - }
707   - },
708   - /*
709   - * Function: alteraGeometria
710   - *
711   - * Altera o tipo de representa&ccedil;&atilde;o geom&eacute;trica dos elementos de um layer
712   - *
713   - * Veja:
714   - *
715   - * <ALTERACLASSE>
716   - */
717   - alteraGeometriaTema : function() {
718   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
719   - return;
720   - }
721   - i3GEOF.legenda.aguarde.visibility = "visible";
722   - var retorna = function() {
723   - i3GEOF.legenda.aposAlterarLegenda();
724   - i3GEOF.legenda.aguarde.visibility = "hidden";
725   - i3GEOF.legenda.mostralegenda();
726   - };
727   - var p =
728   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
729   - + i3GEO.configura.sid
730   - + "&funcao=alteraclasse&opcao=alterageometria&tema="
731   - + i3GEOF.legenda.tema
732   - + "&tipo="
733   - + $i("i3GEOlegentaTipoGeo").value, cp = new cpaint();
734   - cp.set_response_type("JSON");
735   - cp.call(p, "", retorna);
736   - },
737   - /*
738   - * Function: adicionaConta
739   - *
740   - * Adiciona ao nome de cada classe o n&uacute;mero de ocorr&ecirc;ncias em cada uma
741   - *
742   - * Veja:
743   - *
744   - * <CONTAGEMCLASSE>
745   - */
746   - adicionaConta : function() {
747   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
748   - return;
749   - }
750   - i3GEOF.legenda.aguarde.visibility = "visible";
751   - var p =
752   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
753   - + i3GEO.configura.sid
754   - + "&funcao=contagemclasse"
755   - + "&tema="
756   - + i3GEOF.legenda.tema, cp = new cpaint();
757   - cp.set_response_type("JSON");
758   - cp.call(p, "contagemclasse", i3GEOF.legenda.montaLegenda);
759   - i3GEO.janela.tempoMsg($trad('consideraElementosVisiveis', i3GEOF.legenda.dicionario));
760   - },
761   - /*
762   - * Function: adicionaClasse
763   - *
764   - * Adiciona uma nova classe ao tema
765   - *
766   - * Veja:
767   - *
768   - * <ALTERACLASSE>
769   - */
770   - adicionaClasse : function() {
771   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
772   - return;
773   - }
774   - var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
775   - var p =
776   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
777   - + i3GEO.configura.sid
778   - + "&funcao=alteraclasse&opcao=adicionaclasse"
779   - + "&tema="
780   - + i3GEOF.legenda.tema
781   - + "&ext="
782   - + ext, cp = new cpaint();
783   - cp.set_response_type("JSON");
784   - cp.call(p, "alteraclasse", i3GEOF.legenda.mostralegenda);
785   - },
786   - /*
787   - * Function: adicionaOpacidade
788   - *
789   - * Adiciona opacidade vari&aacute;vel em cada classe
790   - *
791   - * Veja:
792   - *
793   - * <ALTERACLASSE>
794   - */
795   - adicionaOpacidade : function() {
796   - var retorna = function() {
797   - i3GEOF.legenda.aposAlterarLegenda();
798   - i3GEOF.legenda.aguarde.visibility = "hidden";
799   - i3GEOF.legenda.mostralegenda();
800   - };
801   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
802   - return;
803   - }
804   - var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
805   - var p =
806   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
807   - + i3GEO.configura.sid
808   - + "&funcao=alteraclasse&opcao=adicionaopacidade"
809   - + "&tema="
810   - + i3GEOF.legenda.tema
811   - + "&ext="
812   - + ext, cp = new cpaint();
813   - cp.set_response_type("JSON");
814   - cp.call(p, "alteraclasse", retorna);
815   - },
816   - /*
817   - * Function: paleta
818   - *
819   - * Gera as cores para as classes considerando um RGB inicial e um final
820   - *
821   - * Veja:
822   - *
823   - * <ALTERACORESCLASSES>
824   - */
825   - paleta : function() {
826   - try {
827   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
828   - return;
829   - }
830   - i3GEOF.legenda.aguarde.visibility = "visible";
831   - var retornapaleta = function() {
832   - i3GEOF.legenda.aposAlterarLegenda();
833   - i3GEOF.legenda.aguarde.visibility = "hidden";
834   - i3GEOF.legenda.mostralegenda();
835   - }, ci = $i("i3GEOlegendaacori").value, cf = $i("i3GEOlegendaacorf").value, cp = new cpaint(), p =
836   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
837   - + i3GEO.configura.sid
838   - + "&funcao=alteraCoresClasses&tema="
839   - + i3GEOF.legenda.tema
840   - + "&cori="
841   - + ci
842   - + "&corf="
843   - + cf;
844   - cp.set_response_type("JSON");
845   - cp.call(p, "alteraCoresClasses", retornapaleta);
846   - } catch (e) {
847   - i3GEO.janela.tempoMsg("Erro: " + e);
848   - i3GEOF.legenda.aguarde.visibility = "hidden";
849   - }
850   - },
851   - /*
852   - * Function: inverteCores
853   - *
854   - * Inverte as cores utilizadas nos s&iacute;mbolos das classes
855   - *
856   - * Veja:
857   - *
858   - * <INVERTECORESCLASSES>
859   - */
860   - inverteCores : function() {
861   - try {
862   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
863   - return;
864   - }
865   - i3GEOF.legenda.aguarde.visibility = "visible";
866   - var retornapaleta = function() {
867   - i3GEOF.legenda.aposAlterarLegenda();
868   - i3GEOF.legenda.aguarde.visibility = "hidden";
869   - i3GEOF.legenda.mostralegenda();
870   - }, cp = new cpaint(), p =
871   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
872   - + i3GEO.configura.sid
873   - + "&funcao=inverteCoresClasses&tema="
874   - + i3GEOF.legenda.tema;
875   - cp.set_response_type("JSON");
876   - cp.call(p, "alteraCoresClasses", retornapaleta);
877   - } catch (e) {
878   - i3GEO.janela.tempoMsg("Erro: " + e);
879   - i3GEOF.legenda.aguarde.visibility = "hidden";
880   - }
881   - },
882   - /*
883   - * Function: calculaTamanho
884   - *
885   - * Muda o s&iacute;mbolo de cada classe aplicando tamanhos diferentes e lineares
886   - *
887   - * Veja:
888   - *
889   - * <CALCULATAMANHOCLASSES>
890   - */
891   - calculaTamanho : function() {
892   - try {
893   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
894   - return;
895   - }
896   - i3GEOF.legenda.aguarde.visibility = "visible";
897   - var retornapaleta = function() {
898   - i3GEOF.legenda.aposAlterarLegenda();
899   - i3GEOF.legenda.aguarde.visibility = "hidden";
900   - i3GEOF.legenda.mostralegenda();
901   - }, cp = new cpaint(), p =
902   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
903   - + i3GEO.configura.sid
904   - + "&funcao=calculaTamanhoClasses&tema="
905   - + i3GEOF.legenda.tema;
906   - cp.set_response_type("JSON");
907   - cp.call(p, "calculaTamanhoClasses", retornapaleta);
908   - } catch (e) {
909   - i3GEO.janela.tempoMsg("Erro: " + e);
910   - i3GEOF.legenda.aguarde.visibility = "hidden";
911   - }
912   - },
913   - /*
914   - * Function: ordenaClasses
915   - *
916   - * Ordena as classes pelo nome
917   - *
918   - */
919   - ordenaClasses : function() {
920   - try {
921   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
922   - return;
923   - }
924   - i3GEOF.legenda.aguarde.visibility = "visible";
925   - var retornapaleta = function() {
926   - i3GEOF.legenda.aposAlterarLegenda();
927   - i3GEOF.legenda.aguarde.visibility = "hidden";
928   - i3GEOF.legenda.mostralegenda();
929   - }, cp = new cpaint(), p =
930   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
931   - + i3GEO.configura.sid
932   - + "&funcao=ordenaClasses&tema="
933   - + i3GEOF.legenda.tema;
934   - cp.set_response_type("JSON");
935   - cp.call(p, "foo", retornapaleta);
936   - } catch (e) {
937   - i3GEO.janela.tempoMsg("Erro: " + e);
938   - i3GEOF.legenda.aguarde.visibility = "hidden";
939   - }
940   - },
941   - /*
942   - * Function: excluilinhaf
943   - *
944   - * Exclui uma linha da tabela de edi&ccedil;&atilde;o de classes da legendda
945   - */
946   - excluilinhaf : function(id) {
947   - var p = $i(id);
948   - do {
949   - p.removeChild(p.childNodes[0]);
950   - } while (p.childNodes.length > 0);
951   - p.parentNode.removeChild(p);
952   - i3GEOF.legenda.mudaLegenda();
953   - },
954   - /*
955   - * Function: sobelinhaf
956   - *
957   - * Sobe uma linha na tabela de edi&ccedil;&atilde;o de classes da legendda
958   - */
959   - sobelinhaf : function(idclasse) {
960   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
961   - return;
962   - }
963   - i3GEOF.legenda.aguarde.visibility = "visible";
964   - var p =
965   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
966   - + i3GEO.configura.sid
967   - + "&funcao=ALTERACLASSE&opcao=sobeclasse&tema="
968   - + i3GEOF.legenda.tema
969   - + "&idclasse="
970   - + idclasse, cp = new cpaint(), temp = function() {
971   - i3GEOF.legenda.aguarde.visibility = "hidden";
972   - i3GEOF.legenda.mostralegenda();
973   - };
974   - cp.set_response_type("JSON");
975   - cp.call(p, "foo", temp);
976   - },
977   - /*
978   - * Function: descelinhaf
979   - *
980   - * Desce uma linha na tabela de edi&ccedil;&atilde;o de classes da legendda
981   - */
982   - descelinhaf : function(idclasse) {
983   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
984   - return;
985   - }
986   - i3GEOF.legenda.aguarde.visibility = "visible";
987   - var p =
988   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
989   - + i3GEO.configura.sid
990   - + "&funcao=ALTERACLASSE&opcao=desceclasse&tema="
991   - + i3GEOF.legenda.tema
992   - + "&idclasse="
993   - + idclasse, cp = new cpaint(), temp = function() {
994   - i3GEOF.legenda.aguarde.visibility = "hidden";
995   - i3GEOF.legenda.mostralegenda();
996   - };
997   - ;
998   - cp.set_response_type("JSON");
999   - cp.call(p, "foo", temp);
1000   - },
1001   - /*
1002   - * Function: editaSimbolo
1003   - *
1004   - * Abre o editor de s&iacute;mbolos
1005   - *
1006   - * Veja:
1007   - *
1008   - * <EDITASIMBOLO>
1009   - */
1010   - editaSimbolo : function(id) {
1011   - try {
1012   - $i("i3GEOlegendaguia1obj").style.display = "none";
1013   - $i("i3GEOlegendaguia3obj").style.display = "block";
1014   - id = id.split("-");
1015   - i3GEOF.legenda.classe = id[1];
1016   - i3GEOF.legenda.formEditorSimbolo();
1017   - i3GEOF.legenda.aguarde.visibility = "hidden";
1018   - } catch (e) {
1019   - i3GEO.janela.tempoMsg("Erro: " + e);
1020   - i3GEOF.legenda.aguarde.visibility = "hidden";
1021   - }
1022   - },
1023   - formEditorSimbolo : function() {
1024   - var p =
1025   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1026   - + i3GEO.configura.sid
1027   - + "&funcao=editasimbolo&opcao=pegaparametros&tema="
1028   - + i3GEOF.legenda.tema
1029   - + "&classe="
1030   - + i3GEOF.legenda.classe, cp = new cpaint();
1031   - cp.set_response_type("JSON");
1032   - cp.call(p, "pegaParametrosMapa", i3GEOF.legenda.montaEditor);
1033   - },
1034   - /*
1035   - * Function: simbU
1036   - *
1037   - * Altera a leganda do tema para o tipo s&iacute;mbolo &uacute;nico
1038   - *
1039   - * Veja:
1040   - *
1041   - * <ALTERACLASSE>
1042   - */
1043   - simbU : function() {
1044   - try {
1045   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1046   - return;
1047   - }
1048   - i3GEOF.legenda.aguarde.visibility = "visible";
1049   - var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1050   - var p =
1051   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1052   - + i3GEO.configura.sid
1053   - + "&funcao=alteraclasse&tema="
1054   - + i3GEOF.legenda.tema
1055   - + "&opcao=simbolounico&ext="
1056   - + ext, cp = new cpaint(), fim = function() {
1057   - i3GEOF.legenda.aposAlterarLegenda();
1058   - i3GEOF.legenda.aguarde.visibility = "hidden";
1059   - };
1060   - cp.set_response_type("JSON");
1061   - cp.call(p, "alteraclasse", fim);
1062   - } catch (e) {
1063   - i3GEO.janela.tempoMsg("Erro: " + e);
1064   - i3GEOF.legenda.aguarde.visibility = "hidden";
1065   - }
1066   - },
1067   - /*
1068   - * Function: valorU
1069   - *
1070   - * Altera a leganda do tema para o tipo valor &uacute;nico
1071   - *
1072   - * Veja:
1073   - *
1074   - * <ALTERACLASSE>
1075   - */
1076   - valorU : function() {
1077   - try {
1078   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1079   - return;
1080   - }
1081   - var item = $i("i3GEOlegendaitensValorUnico").getElementsByTagName("select")[0].value, itemNome =
1082   - $i("i3GEOlegendaClassesValorUnico").getElementsByTagName("select")[0].value, p =
1083   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1084   - + i3GEO.configura.sid
1085   - + "&funcao=alteraclasse&tema="
1086   - + i3GEOF.legenda.tema
1087   - + "&item="
1088   - + item
1089   - + "&itemNome="
1090   - + itemNome
1091   - + "&opcao=valorunico"
1092   - + "&ignorar="
1093   - + $i("i3GEOlegendaignorar").value, cp = new cpaint(), fim = function() {
1094   - i3GEOF.legenda.aposAlterarLegenda();
1095   - i3GEOF.legenda.aguarde.visibility = "hidden";
1096   - };
1097   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
1098   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1099   - } else {
1100   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
1101   - }
1102   -
1103   - if (item == "") {
1104   - i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario));
1105   - return;
1106   - }
1107   - i3GEOF.legenda.aguarde.visibility = "visible";
1108   - cp.set_response_type("JSON");
1109   - cp.call(p, "alteraclasse", fim);
1110   - } catch (e) {
1111   - i3GEO.janela.tempoMsg("Erro: " + e);
1112   - i3GEOF.legenda.aguarde.visibility = "hidden";
1113   - }
1114   - },
1115   - /*
1116   - * Function: valorC
1117   - *
1118   - * Altera a leganda do tema com um n&uacute;mero espec&iacute;fico de classes
1119   - *
1120   - * Veja:
1121   - *
1122   - * <ALTERACLASSE>
1123   - */
1124   - valorC : function() {
1125   - try {
1126   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1127   - return;
1128   - }
1129   - var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses =
1130   - $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1131   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1132   - + i3GEO.configura.sid
1133   - + "&funcao=alteraclasse&nclasses="
1134   - + nclasses
1135   - + "&tema="
1136   - + i3GEOF.legenda.tema
1137   - + "&item="
1138   - + item
1139   - + "&opcao=intervalosiguais&ignorar="
1140   - + $i("i3GEOlegendaignorar").value
1141   - + "&ext="
1142   - + ext, cp = new cpaint(), fim = function() {
1143   - i3GEOF.legenda.aposAlterarLegenda();
1144   - i3GEOF.legenda.aguarde.visibility = "hidden";
1145   - };
1146   - if (item == "") {
1147   - i3GEO.janela.tempoMsg("Selecione um item!");
1148   - return;
1149   - }
1150   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
1151   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1152   - } else {
1153   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
1154   - }
1155   - i3GEOF.legenda.aguarde.visibility = "visible";
1156   - cp.set_response_type("JSON");
1157   - cp.call(p, "alteraclasse", fim);
1158   - } catch (e) {
1159   - i3GEO.janela.tempoMsg("Erro: " + e);
1160   - i3GEOF.legenda.aguarde.visibility = "hidden";
1161   - }
1162   - },
1163   - /*
1164   - * Function: metade
1165   - *
1166   - * Duas classes concentrando a soma das metades
1167   - *
1168   - * Veja:
1169   - *
1170   - * <ALTERACLASSE>
1171   - */
1172   - metade : function() {
1173   - try {
1174   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1175   - return;
1176   - }
1177   - var item = $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value,
1178   - itemid = $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value,
1179   - p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1180   - + i3GEO.configura.sid
1181   - + "&funcao=alteraclasse"
1182   - + "&tema="
1183   - + i3GEOF.legenda.tema
1184   - + "&item="
1185   - + item
1186   - + "&itemid="
1187   - + itemid
1188   - + "&opcao=metade&ignorar="
1189   - + $i("i3GEOlegendaignorar").value,
1190   - cp = new cpaint(),
1191   - fim = function() {
1192   - i3GEOF.legenda.aposAlterarLegenda();
1193   - i3GEOF.legenda.aguarde.visibility = "hidden";
1194   - };
1195   - if (item == "") {
1196   - i3GEO.janela.tempoMsg("Selecione um item!");
1197   - return;
1198   - }
1199   - if (itemid == "") {
1200   - i3GEO.janela.tempoMsg("Selecione um item!");
1201   - return;
1202   - }
1203   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
1204   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1205   - } else {
1206   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
1207   - }
1208   - i3GEOF.legenda.aguarde.visibility = "visible";
1209   - cp.set_response_type("JSON");
1210   - cp.call(p, "alteraclasse", fim);
1211   - } catch (e) {
1212   - i3GEO.janela.tempoMsg("Erro: " + e);
1213   - i3GEOF.legenda.aguarde.visibility = "hidden";
1214   - }
1215   - },
1216   - /*
1217   - * Function: media
1218   - *
1219   - * Duas classes considerando a media
1220   - *
1221   - * Veja:
1222   - *
1223   - * <ALTERACLASSE>
1224   - */
1225   - media : function() {
1226   - try {
1227   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1228   - return;
1229   - }
1230   - var item = $i("i3GEOlegendaitensMedia").getElementsByTagName("select")[0].value,
1231   - p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1232   - + i3GEO.configura.sid
1233   - + "&funcao=alteraclasse"
1234   - + "&tema="
1235   - + i3GEOF.legenda.tema
1236   - + "&item="
1237   - + item
1238   - + "&opcao=media&ignorar="
1239   - + $i("i3GEOlegendaignorar").value,
1240   - cp = new cpaint(),
1241   - fim = function() {
1242   - i3GEOF.legenda.aposAlterarLegenda();
1243   - i3GEOF.legenda.aguarde.visibility = "hidden";
1244   - };
1245   - if (item == "") {
1246   - i3GEO.janela.tempoMsg("Selecione um item!");
1247   - return;
1248   - }
1249   - if ($i("i3GEOFlegendaaplicaextent").checked === true) {
1250   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
1251   - } else {
1252   - p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal);
1253   - }
1254   - i3GEOF.legenda.aguarde.visibility = "visible";
1255   - cp.set_response_type("JSON");
1256   - cp.call(p, "alteraclasse", fim);
1257   - } catch (e) {
1258   - i3GEO.janela.tempoMsg("Erro: " + e);
1259   - i3GEOF.legenda.aguarde.visibility = "hidden";
1260   - }
1261   - },
1262   - /*
1263   - * Function: valorQ
1264   - *
1265   - * Altera a leganda do tema claculando as classes pelo m&eacute;todo quartil
1266   - *
1267   - * Veja:
1268   - *
1269   - * <ALTERACLASSE>
1270   - */
1271   - valorQ : function() {
1272   - try {
1273   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1274   - return;
1275   - }
1276   - var item = $i("i3GEOlegendaitensValorQuartil").getElementsByTagName("select")[0].value, ext =
1277   - i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1278   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1279   - + i3GEO.configura.sid
1280   - + "&funcao=alteraclasse&tema="
1281   - + i3GEOF.legenda.tema
1282   - + "&item="
1283   - + item
1284   - + "&opcao=quartis&ignorar="
1285   - + $i("i3GEOlegendaignorar").value
1286   - + "&ext="
1287   - + ext
1288   - + "&tipoLegenda="
1289   - + $i("estiloClassesQuartis").value, cp = new cpaint(), fim = function() {
1290   - i3GEOF.legenda.aposAlterarLegenda();
1291   - i3GEOF.legenda.aguarde.visibility = "hidden";
1292   - };
1293   - if (item == "") {
1294   - i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario));
1295   - return;
1296   - }
1297   - i3GEOF.legenda.aguarde.visibility = "visible";
1298   - cp.set_response_type("JSON");
1299   - cp.call(p, "alteraclasse", fim);
1300   - } catch (e) {
1301   - i3GEO.janela.tempoMsg("Erro: " + e);
1302   - i3GEOF.legenda.aguarde.visibility = "hidden";
1303   - }
1304   - },
1305   - /*
1306   - * Function: valorQu
1307   - *
1308   - * Altera a leganda do tema por meio do calculo de quantis
1309   - *
1310   - * Veja:
1311   - *
1312   - * <ALTERACLASSE>
1313   - */
1314   - valorQu : function() {
1315   - try {
1316   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1317   - return;
1318   - }
1319   - var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses =
1320   - $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1321   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1322   - + i3GEO.configura.sid
1323   - + "&funcao=alteraclasse&nclasses="
1324   - + nclasses
1325   - + "&tema="
1326   - + i3GEOF.legenda.tema
1327   - + "&item="
1328   - + item
1329   - + "&opcao=quantil&ignorar="
1330   - + $i("i3GEOlegendaignorar").value
1331   - + "&ext="
1332   - + ext, cp = new cpaint(), fim = function() {
1333   - i3GEOF.legenda.aposAlterarLegenda();
1334   - i3GEOF.legenda.aguarde.visibility = "hidden";
1335   - };
1336   - if (item == "") {
1337   - i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario));
1338   - return;
1339   - }
1340   - i3GEOF.legenda.aguarde.visibility = "visible";
1341   - cp.set_response_type("JSON");
1342   - cp.call(p, "alteraclasse", fim);
1343   - } catch (e) {
1344   - i3GEO.janela.tempoMsg("Erro: " + e);
1345   - i3GEOF.legenda.aguarde.visibility = "hidden";
1346   - }
1347   - },
1348   - /*
1349   - * Function: valorQN
1350   - *
1351   - * Altera a legenda do tema por meio do calculo de quebras naturais
1352   - *
1353   - * Veja:
1354   - *
1355   - * <ALTERACLASSE>
1356   - */
1357   - valorQN : function() {
1358   - try {
1359   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1360   - return;
1361   - }
1362   - var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses =
1363   - $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p =
1364   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1365   - + i3GEO.configura.sid
1366   - + "&funcao=alteraclasse&nclasses="
1367   - + nclasses
1368   - + "&tema="
1369   - + i3GEOF.legenda.tema
1370   - + "&item="
1371   - + item
1372   - + "&opcao=quebrasnaturais&ignorar="
1373   - + $i("i3GEOlegendaignorar").value
1374   - + "&ext="
1375   - + ext, cp = new cpaint(), fim = function() {
1376   - i3GEOF.legenda.aposAlterarLegenda();
1377   - i3GEOF.legenda.aguarde.visibility = "hidden";
1378   - };
1379   - if (item == "") {
1380   - i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario));
1381   - return;
1382   - }
1383   - i3GEOF.legenda.aguarde.visibility = "visible";
1384   - cp.set_response_type("JSON");
1385   - cp.call(p, "alteraclasse", fim);
1386   - } catch (e) {
1387   - i3GEO.janela.tempoMsg("Erro: " + e);
1388   - i3GEOF.legenda.aguarde.visibility = "hidden";
1389   - }
1390   - },
1391   -
1392   - /*
1393   - * Function: representacao
1394   - *
1395   - * Altera o tipo de representa&ccedil;&atilde;o do tema (linear ou poligonoal)
1396   - *
1397   - * Veja:
1398   - *
1399   - * <ALTERAREPRESENTACAO>
1400   - *
1401   - */
1402   - representacao : function() {
1403   - try {
1404   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1405   - return;
1406   - }
1407   - var p =
1408   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1409   - + i3GEO.configura.sid
1410   - + "&funcao=alterarepresentacao&tema="
1411   - + i3GEOF.legenda.tema, cp = new cpaint(), fim = function() {
1412   - i3GEOF.legenda.aposAlterarLegenda();
1413   - i3GEOF.legenda.aguarde.visibility = "hidden";
1414   - };
1415   - i3GEOF.legenda.aguarde.visibility = "visible";
1416   - cp.set_response_type("JSON");
1417   - cp.call(p, "alteraRepresentacao", fim);
1418   - } catch (e) {
1419   - i3GEO.janela.tempoMsg("Erro: " + e);
1420   - i3GEOF.legenda.aguarde.visibility = "hidden";
1421   - }
1422   - },
1423   - /*
1424   - * Function: montaEditor
1425   - *
1426   - * Monta o editor de s&iacute;mbolos quando o usu&aacute;rio clica em um s&iacute;mbolo na legenda
1427   - */
1428   - montaEditor : function(retorno) {
1429   - try {
1430   - i3GEO.util.comboItens(
1431   - "i3GEOlegendaSelItemLabel",
1432   - i3GEOF.legenda.tema,
1433   - function(retorno) {
1434   - if ($i("i3GEOlegendaitensLabel")) {
1435   - $i("i3GEOlegendaitensLabel").innerHTML = retorno.dados ;
1436   - }
1437   - },
1438   - "i3GEOlegendaitensLabel",
1439   - "",
1440   - "",
1441   - "",
1442   - "form-control"
1443   - );
1444   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1445   - return;
1446   - }
1447   - i3GEOF.legenda.aguarde.visibility = "visible";
1448   - if (retorno.data != undefined) {
1449   - var b, l, i, sct, combo, n;
1450   - retorno = retorno.data;
1451   - i3GEOF.legenda.estilos = retorno.split("|");
1452   - combo =
1453   - "<select id='i3GEOlegendaestilos' class='form-control' onchange=i3GEOF.legenda.estilo=this.value;i3GEOF.legenda.mostraEstilo(this.value)>";
1454   - n = i3GEOF.legenda.estilos.length;
1455   - for (i = 0; i < n; i++) {
1456   - l = i3GEOF.legenda.estilos[i].split("#");
1457   - sct = "<option value=" + l[1] + " />" + l[1] + "</option>";
1458   - combo += sct;
1459   - }
1460   - combo += "</select></div>";
1461   - $i("i3GEOlegendacomboestilos").innerHTML = combo;
1462   - $i("i3GEOlegendaestilos").value = i3GEOF.legenda.estilo;
1463   -
1464   -
1465   - i3GEOF.legenda.aguarde.visibility = "hidden";
1466   - i3GEOF.legenda.mostraEstilo(0);
1467   - } else {
1468   - $i("i3GEOlegendacomboestilos").innerHTML = "<p style=color:red >Erro<br>";
1469   - i3GEOF.legenda.aguarde.visibility = "hidden";
1470   - }
1471   - } catch (e) {
1472   - i3GEO.janela.tempoMsg("Erro: " + e);
1473   - i3GEOF.legenda.aguarde.visibility = "hidden";
1474   - }
1475   - },
1476   - desceEstilo: function() {
1477   - try {
1478   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1479   - return;
1480   - }
1481   - i3GEOF.legenda.aguarde.visibility = "visible";
1482   - var p =
1483   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1484   - + i3GEO.configura.sid
1485   - + "&funcao=editasimbolo&opcao=desceestilo&tema="
1486   - + i3GEOF.legenda.tema
1487   - + "&classe="
1488   - + i3GEOF.legenda.classe
1489   - + "&estilo="
1490   - + i3GEOF.legenda.estilo, cp = new cpaint();
1491   - cp.set_response_type("JSON");
1492   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1493   - } catch (e) {
1494   - i3GEO.janela.tempoMsg("Erro: " + e);
1495   - i3GEOF.legenda.aguarde.visibility = "hidden";
1496   - }
1497   - },
1498   - sobeEstilo: function() {
1499   - try {
1500   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1501   - return;
1502   - }
1503   - i3GEOF.legenda.aguarde.visibility = "visible";
1504   - var p =
1505   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1506   - + i3GEO.configura.sid
1507   - + "&funcao=editasimbolo&opcao=sobeestilo&tema="
1508   - + i3GEOF.legenda.tema
1509   - + "&classe="
1510   - + i3GEOF.legenda.classe
1511   - + "&estilo="
1512   - + i3GEOF.legenda.estilo, cp = new cpaint();
1513   - cp.set_response_type("JSON");
1514   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1515   - } catch (e) {
1516   - i3GEO.janela.tempoMsg("Erro: " + e);
1517   - i3GEOF.legenda.aguarde.visibility = "hidden";
1518   - }
1519   - },
1520   - adicionaEstilo: function() {
1521   - try {
1522   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1523   - return;
1524   - }
1525   - i3GEOF.legenda.aguarde.visibility = "visible";
1526   - var p =
1527   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1528   - + i3GEO.configura.sid
1529   - + "&funcao=editasimbolo&opcao=adicionaestilo&tema="
1530   - + i3GEOF.legenda.tema
1531   - + "&classe="
1532   - + i3GEOF.legenda.classe
1533   - + "&estilo="
1534   - + i3GEOF.legenda.estilo, cp = new cpaint();
1535   - cp.set_response_type("JSON");
1536   - i3GEOF.legenda.estilo = i3GEOF.legenda.estilo + 1;
1537   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1538   - } catch (e) {
1539   - i3GEO.janela.tempoMsg("Erro: " + e);
1540   - i3GEOF.legenda.aguarde.visibility = "hidden";
1541   - }
1542   - },
1543   - excluiEstilo: function() {
1544   - try {
1545   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1546   - return;
1547   - }
1548   - i3GEOF.legenda.aguarde.visibility = "visible";
1549   - i3GEOF.legenda.estilo = 0;
1550   - var p =
1551   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1552   - + i3GEO.configura.sid
1553   - + "&funcao=editasimbolo&opcao=excluiestilo&tema="
1554   - + i3GEOF.legenda.tema
1555   - + "&classe="
1556   - + i3GEOF.legenda.classe
1557   - + "&estilo="
1558   - + i3GEOF.legenda.estilo, cp = new cpaint();
1559   - cp.set_response_type("JSON");
1560   - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1561   - } catch (e) {
1562   - i3GEO.janela.tempoMsg("Erro: " + e);
1563   - i3GEOF.legenda.aguarde.visibility = "hidden";
1564   - }
1565   - },
1566   - /*
1567   - * Function: mostraEstilo
1568   - *
1569   - * Mostra as propriedades de um estilo de um s&iacute;mbolo
1570   - */
1571   - mostraEstilo : function() {
1572   - i3GEOF.legenda.aguarde.visibility = "visible";
1573   - try {
1574   - var linha, tipoLayer, d, p, cp, mustache = {};
1575   - //i3GEOF.legenda.estilo = e; // esta e uma variavel global
1576   - linha = i3GEOF.legenda.estilos[i3GEOF.legenda.estilo];
1577   - linha = linha.split("#");
1578   - tipoLayer = linha[0];
1579   - mustache = {
1580   - "voutlinecolor": linha[2],
1581   - "vcolor": linha[4],
1582   - "vbackgroundcolor": linha[3],
1583   - "vsize": linha[6],
1584   - "vwidth": linha[8],
1585   - "vpattern": linha[9],
1586   - "vopacity": linha[7],
1587   - "vangle": linha[10],
1588   - "vsymbolscale": linha[11],
1589   - "vminsize": linha[12],
1590   - "vmaxsize": linha[13],
1591   - "voffsetx": linha[14],
1592   - "voffsety": linha[15],
1593   - "vsymbolname": linha[5],
1594   - };
1595   -
1596   - ins = Mustache.render(
1597   - i3GEOF.legenda.MUSTACHEESTILO,
1598   - $.extend(
1599   - {},
1600   - mustache,
1601   - i3GEOF.legenda.DICIONARIO
1602   - )
1603   - );
1604   - $i("i3GEOlegendaParametrosEstilos").innerHTML = ins;
1605   -
1606   -
1607   - //preenche as listas de itens
1608   - i3GEO.util.comboItens(
1609   - "",
1610   - i3GEOF.legenda.tema, function(retorno) {
1611   - if ($i("i3GEOlegendaComboSize")) {
1612   - $i("i3GEOlegendaComboSize").innerHTML = retorno.dados.replace("id=''"," onchange='$i(\"i3GEOlegendasizes\").value = this.value'");
1613   - }
1614   - },
1615   - "",
1616   - "",
1617   - "",
1618   - "",
1619   - "form-control"
1620   - );
1621   -
1622   - i3GEO.util.aplicaAquarela("i3GEOlegendaParametrosEstilos");
1623   -
1624   - p =
1625   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1626   - + i3GEO.configura.sid
1627   - + "&funcao=editasimbolo&tipo="
1628   - + tipoLayer
1629   - + "&opcao=listaSimbolos&onclick=i3GEOF.legenda.aplicaSimbolo(this)";
1630   - cp = new cpaint();
1631   - cp.set_response_type("JSON");
1632   - cp.call(p, "editasimbolo", i3GEOF.legenda.listaSimbolos);
1633   - i3GEOF.legenda.aguarde.visibility = "hidden";
1634   - } catch (e) {
1635   - i3GEO.janela.tempoMsg("Erro: " + i3GEOF.legenda.estilo);
1636   - i3GEOF.legenda.aguarde.visibility = "hidden";
1637   - }
1638   - },
1639   - /*
1640   - * Function: listaSimbolos
1641   - *
1642   - * Monta a lista de s&iacute;mbolos com imagem
1643   - */
1644   - listaSimbolos : function(retorno) {
1645   - i3GEOF.legenda.aguarde.visibility = "visible";
1646   - try {
1647   - if (retorno.data != undefined) {
1648   - retorno = retorno.data;
1649   - $i("i3GEOlegendasimbolos").innerHTML =
1650   - "<br>" + $trad('listaSimbolo', i3GEOF.legenda.dicionario) + ":<br><br>" + retorno;
1651   - } else {
1652   - $i("i3GEOlegendasimbolos").innerHTML = "<p style=color:red >Erro<br>";
1653   - }
1654   - i3GEOF.legenda.aguarde.visibility = "hidden";
1655   - } catch (e) {
1656   - i3GEO.janela.tempoMsg("Erro: " + e);
1657   - i3GEOF.legenda.aguarde.visibility = "hidden";
1658   - }
1659   - },
1660   - /*
1661   - * Function: aplicaSimbolo
1662   - *
1663   - * Muda o valor do campo com o c&oacute;digo do s&iacute;mbolo escolhido
1664   - */
1665   - aplicaSimbolo : function(s) {
1666   - $i("i3GEOlegendasymbolname").value = s.title;
1667   - },
1668   - /*
1669   - * Function: aplicaEstilo
1670   - *
1671   - * Aplica ao estilo as propriedades definidas
1672   - *
1673   - * Veja:
1674   - *
1675   - * <EDITASIMBOLO>
1676   - */
1677   - aplicaEstilo : function() {
1678   - try {
1679   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1680   - return;
1681   - }
1682   - i3GEOF.legenda.aguarde.visibility = "visible";
1683   - var i, p, cp, fim, outlinecolor = $i("i3GEOlegendaoutlinecolor").value, backgroundcolor =
1684   - $i("i3GEOlegendabackgroundcolor").value, color = $i("i3GEOlegendacolor").value, symbolname =
1685   - $i("i3GEOlegendasymbolname").value, simbolos = $i("i3GEOlegendasimbolos").getElementsByTagName("img"), valido = "nao", n =
1686   - simbolos.length, size = $i("i3GEOlegendasizes").value, width = $i("i3GEOlegendawidth").value, pattern =
1687   - $i("i3GEOlegendapattern").value, opacidade = $i("i3GEOlegendaopacidade").value, angle = $i("i3GEOlegendaangulo").value, symbolscale =
1688   - $i("i3GEOlegendasymbolscale").value, minsize = $i("i3GEOlegendaminsize").value, maxsize =
1689   - $i("i3GEOlegendamaxsize").value, offsetx = $i("i3GEOlegendaoffsetx").value, offsety = $i("i3GEOlegendaoffsety").value;
1690   - if (symbolscale != "") {
1691   - symbolscale = parseInt(symbolscale, 10);
1692   - } else {
1693   - symbolscale = -1;
1694   - }
1695   - for (i = 0; i < n; i++) {
1696   - if (simbolos[i].title == symbolname || symbolname == i) {
1697   - valido = "sim";
1698   - }
1699   - }
1700   - if (valido === "nao") {
1701   - // i3GEO.janela.tempoMsg("Nome do simbolo nao encontrado");
1702   - // i3GEOF.legenda.aguarde.visibility = "hidden";
1703   - // return;
1704   - }
1705   - p =
1706   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1707   - + i3GEO.configura.sid
1708   - + "&funcao=editasimbolo&opcao=aplica&tema="
1709   - + i3GEOF.legenda.tema
1710   - + "&classe="
1711   - + i3GEOF.legenda.classe
1712   - + "&estilo="
1713   - + i3GEOF.legenda.estilo
1714   - + "&outlinecolor="
1715   - + outlinecolor
1716   - + "&backgroundcolor="
1717   - + backgroundcolor
1718   - + "&color="
1719   - + color
1720   - + "&symbolname="
1721   - + symbolname
1722   - + "&width="
1723   - + width
1724   - + "&pattern="
1725   - + pattern
1726   - + "&size="
1727   - + size
1728   - + "&opacidade="
1729   - + opacidade
1730   - + "&angle="
1731   - + angle
1732   - + "&symbolscale="
1733   - + symbolscale
1734   - + "&minsize="
1735   - + minsize
1736   - + "&maxsize="
1737   - + maxsize
1738   - + "&offsetx="
1739   - + offsetx
1740   - + "&offsety="
1741   - + offsety;
1742   - cp = new cpaint();
1743   - fim = function() {
1744   - i3GEOF.legenda.aposAlterarLegenda();
1745   - i3GEOF.legenda.aguarde.visibility = "hidden";
1746   - i3GEOF.legenda.reMontaEditor();
1747   - };
1748   - // cp.set_debug(2)
1749   - cp.set_response_type("JSON");
1750   - cp.call(p, "editasimbolo", fim);
1751   - } catch (e) {
1752   - i3GEO.janela.tempoMsg("Erro: " + e);
1753   - i3GEOF.legenda.aguarde.visibility = "hidden";
1754   - }
1755   - },
1756   - /*
1757   - * Function: reMontaEditor
1758   - *
1759   - * Gera novamente o editor de s&iacute;mbolo ap&oacute;s ter sido feita alguma altera&ccedil;&atilde;o nos estilos
1760   - */
1761   - reMontaEditor : function() {
1762   - var id = i3GEOF.legenda.tema + "-" + i3GEOF.legenda.classe;
1763   - i3GEOF.legenda.editaSimbolo(id);
1764   - },
1765   - /*
1766   - * Function: mostraGrafico
1767   - *
1768   - * Mostra um gr&aacute;fico com a contegem de elementos em caada classe
1769   - *
1770   - * Veja:
1771   - *
1772   - * <CONTAGEMCLASSE>
1773   - */
1774   - mostraGrafico : function() {
1775   - try {
1776   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1777   - return;
1778   - }
1779   - i3GEOF.legenda.aguarde.visibility = "visible";
1780   - var monta =
1781   - function(retorno) {
1782   - if (retorno.data && retorno.data[0].proc == "") {
1783   - var b, ins = [], i, re, t;
1784   - ins.push("<h5>" + $trad('numeroOcorrenciasClasses', i3GEOF.legenda.dicionario) + "</h5>");
1785   - ins.push("<table width=100% >");
1786   - i3GEOF.legenda.dadosGrafico = [
1787   - "n;x"
1788   - ];
1789   - if (retorno.data.length < 2) {
1790   - i3GEO.janela.tempoMsg($trad('msgNumeroClasses', i3GEOF.legenda.dicionario));
1791   - i3GEOF.legenda.aguarde.visibility = "hidden";
1792   - return;
1793   - } else {
1794   - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia4", "i3GEOlegendaguia");
1795   - }
1796   - for (i = 0; i < retorno.data.length; i++) {
1797   - id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; // layer+indice da classe
1798   - re = new RegExp("'", "g");
1799   - exp = (retorno.data[i].expressao).replace(re, '"');
1800   - ins.push("<tr><td style='text-align:left;border-bottom:0 none white' ><label>" + retorno.data[i].nomeclasse
1801   - + "</label></td></tr>");
1802   - t = (retorno.data[i].nreg * 100) / retorno.data[i].totalreg;
1803   - ins.push("<tr><td style=text-align:left ><img height=15px width=" + t
1804   - + "% src='"
1805   - + retorno.data[i].imagem
1806   - + "' /></td></tr>");
1807   - i3GEOF.legenda.dadosGrafico.push(retorno.data[i].nomeclasse + ";" + retorno.data[i].nreg);
1808   - }
1809   - ins.push("</table><br>");
1810   - $i("i3GEOlegendaguia4obj").innerHTML = ins.join("");
1811   - } else {
1812   - $i("i3GEOlegendaguia4obj").innerHTML = "<p style=color:red >Erro<br>";
1813   - return;
1814   - }
1815   - i3GEOF.legenda.aguarde.visibility = "hidden";
1816   -
1817   - }, p =
1818   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1819   - + i3GEO.configura.sid
1820   - + "&funcao=contagemclasse&tema="
1821   - + i3GEOF.legenda.tema, cp = new cpaint();
1822   - // cp.set_debug(2)
1823   - cp.set_response_type("JSON");
1824   - cp.call(p, "cocontagemclasse", monta);
1825   - } catch (e) {
1826   - i3GEO.janela.tempoMsg("Erro: " + e);
1827   - i3GEOF.legenda.aguarde.visibility = "hidden";
1828   - }
1829   - },
1830   - iniciaGraficoPizza : function() {
1831   - var dados = {
1832   - "attributes" : {
1833   - "id" : ""
1834   - },
1835   - "data" : {
1836   - "dados" : i3GEOF.legenda.dadosGrafico
1837   - }
1838   - };
1839   - i3GEOF.graficointerativo1.tipo = "pizza_1";
1840   - i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados);
1841   - },
1842   - /*
1843   - * Function: aplicaProcessos
1844   - *
1845   - * Aplica processos de ajuste em imagens de sat&eacute;lite
1846   - *
1847   - * Veja:
1848   - *
1849   - * <APLICAPROCESSOS>
1850   - */
1851   - aplicaProcessos : function() {
1852   - try {
1853   - if (i3GEOF.legenda.aguarde.visibility === "visible") {
1854   - return;
1855   - }
1856   - i3GEOF.legenda.aguarde.visibility = "visible";
1857   - var lista = [], ipt, i, p, cp, temp;
1858   - if ($i("i3GEOlegendaprocessos").innerHTML != "") {
1859   - ipt = $i("i3GEOlegendaprocessos").getElementsByTagName("input");
1860   - for (i = 0; i < ipt.length; i++) {
1861   - if (ipt[i].value != "") {
1862   - lista.push(ipt[i].value);
1863   - }
1864   - }
1865   - }
1866   - lista = lista.join("|");
1867   - temp = function() {
1868   - i3GEOF.legenda.aguarde.visibility = "hidden";
1869   - i3GEOF.legenda.mostralegenda();
1870   - i3GEOF.legenda.aposAlterarLegenda();
1871   - };
1872   - p =
1873   - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1874   - + i3GEO.configura.sid
1875   - + "&funcao=aplicaProcessos&lista="
1876   - + lista
1877   - + "&tema="
1878   - + i3GEOF.legenda.tema;
1879   - cp = new cpaint();
1880   - cp.set_response_type("JSON");
1881   - cp.call(p, "aplicaProcessos", temp);
1882   - } catch (e) {
1883   - i3GEO.janela.tempoMsg("Erro: " + e);
1884   - i3GEOF.legenda.aguarde.visibility = "hidden";
1885   - }
1886   - },
1887   - /*
1888   - * Function: adicionaProcesso
1889   - *
1890   - * Adiciona um novo processo na lista de processos
1891   - */
1892   - adicionaProcesso : function(s) {
1893   - $i("i3GEOlegendaprocessos").innerHTML += "<div class='form-group label-fixed condensed'><input value='" + s.value + "' class='form-control input-lg' type='text' /></div>";
1894   - },
1895   - aplicaTodasClasses : function(parametro, id) {
1896   - var valor = $i(id).value;
1897   - i3GEO.janela.confirma("Aplica " + parametro + " = " + valor + " ?", 300, $trad("x14"), "", function() {
1898   - var temp = function() {
1899   - // i3GEOF.legenda.mostralegenda();
1900   - i3GEOF.legenda.aposAlterarLegenda();
1901   - }, p, cp;
1902   - p =
1903   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1904   - + i3GEO.configura.sid
1905   - + "&funcao=aplicaTodasClasses"
1906   - + "&parametro="
1907   - + parametro
1908   - + "&valor="
1909   - + valor
1910   - + "&tema="
1911   - + i3GEOF.legenda.tema;
1912   - cp = new cpaint();
1913   - cp.set_response_type("JSON");
1914   - cp.call(p, "foo", temp);
1915   - });
1916   - },
1917   - aplicarCluster : function(){
1918   - var temp = function() {
1919   - i3GEOF.legenda.aposAlterarLegenda();
1920   - i3GEOF.legenda.montaCombosItens();
1921   - }, p, cp;
1922   - p =
1923   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1924   - + i3GEO.configura.sid
1925   - + "&funcao=aplicarCluster"
1926   - + "&maxdistance="
1927   - + $i("i3GEOlegendaClusterMaxdistance").value
1928   - + "&buffer="
1929   - + $i("i3GEOlegendaClusterBuffer").value
1930   - + "&filter="
1931   - //+ i3GEO.util.base64encode($i("i3GEOlegendaClusterFilter").value)
1932   - + $i("i3GEOlegendaClusterFilter").value
1933   - + "&region="
1934   - + $i("i3GEOlegendaClusterRegion").value
1935   - + "&group="
1936   - + $i("i3GEOlegendaitensCluster").getElementsByTagName("select")[0].value
1937   - + "&tema="
1938   - + i3GEOF.legenda.tema;
1939   - cp = new cpaint();
1940   - cp.set_response_type("JSON");
1941   - cp.call(p, "foo", temp);
1942   - },
1943   - removerCluster : function(){
1944   - var temp = function() {
1945   - i3GEOF.legenda.montaCombosItens();
1946   - i3GEOF.legenda.aposAlterarLegenda();
1947   - }, p, cp;
1948   - p =
1949   - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid="
1950   - + i3GEO.configura.sid
1951   - + "&funcao=removerCluster"
1952   - + "&tema="
1953   - + i3GEOF.legenda.tema;
1954   - cp = new cpaint();
1955   - cp.set_response_type("JSON");
1956   - cp.call(p, "foo", temp);
1957   - },
1958   - montaCombosItens : function(){
1959   - i3GEO.util.comboItens(
1960   - "",
1961   - i3GEOF.legenda.tema,
1962   - function(retorno) {
1963   - if ($i("i3GEOlegendaitensValorUnico")) {
1964   - $i("i3GEOlegendaitensValorUnico").innerHTML = retorno.dados ;
1965   - }
1966   - if ($i("i3GEOlegendaClassesValorUnico")) {
1967   - $i("i3GEOlegendaClassesValorUnico").innerHTML = retorno.dados;
1968   - }
1969   - if ($i("i3GEOlegendaitensMetade")) {
1970   - $i("i3GEOlegendaitensMetade").innerHTML = retorno.dados;
1971   - }
1972   - if ($i("i3GEOlegendaitensMetadeId")) {
1973   - $i("i3GEOlegendaitensMetadeId").innerHTML = retorno.dados;
1974   - }
1975   - if ($i("i3GEOlegendaitensMedia")) {
1976   - $i("i3GEOlegendaitensMedia").innerHTML = retorno.dados;
1977   - }
1978   - if ($i("i3GEOlegendaitensValorClass")) {
1979   - $i("i3GEOlegendaitensValorClass").innerHTML = retorno.dados;
1980   - }
1981   - if ($i("i3GEOlegendaitensCluster")) {
1982   - $i("i3GEOlegendaitensCluster").innerHTML = retorno.dados;
1983   - }
1984   - if ($i("i3GEOlegendaitensValorQuartil")) {
1985   - $i("i3GEOlegendaitensValorQuartil").innerHTML = retorno.dados;
1986   - }
1987   - },
1988   - "",
1989   - "",
1990   - "",
1991   - "",
1992   - "form-control"
1993   - );
1994   - },
1995   - parametrosAuto : function() {
1996   - i3GEOF.legenda.aguarde.visibility = "visible";
1997   - var p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=parametrosauto&tema=" + i3GEOF.legenda.tema,
1998   - cp = new cpaint(),
1999   - temp = function(retorno){
2000   - try{
2001   - if(retorno.data !== ""){
2002   - $i("i3GEOlegendaAutocolunas").innerHTML = retorno.data.colunas;
2003   - $i("i3GEOlegendaAutoclassesitem").value = retorno.data.classesitem;
2004   - $i("i3GEOlegendaAutoclassesnome").value = retorno.data.classesnome;
2005   - $i("i3GEOlegendaAutoclassescor").value = retorno.data.classescor;
2006   - $i("i3GEOlegendaAutoclassessimbolo").value = retorno.data.classessimbolo;
2007   - $i("i3GEOlegendaAutoclassestamanho").value = retorno.data.classestamanho;
2008   - $i("i3GEOlegendaAutopalletefile").value = retorno.data.palletefile;
2009   - $i("i3GEOlegendaAutopalletestep").value = retorno.data.palletestep;
2010   - }
2011   - i3GEOF.legenda.aguarde.visibility = "hidden";
2012   - }catch(e){
2013   - i3GEO.janela.tempoMsg("Erro. "+e);
2014   - i3GEOF.legenda.aguarde.visibility = "hidden";
2015   - }
2016   - };
2017   - cp.set_response_type("JSON");
2018   - cp.call(p,"foo",temp);
2019   - },
2020   - salvaParametrosAuto: function(){
2021   - if(i3GEOF.legenda.aguarde.visibility === "visible"){
2022   - return;
2023   - }
2024   - i3GEOF.legenda.aguarde.visibility = "visible";
2025   - var temp,
2026   - p,
2027   - cp;
2028   - temp = function(){
2029   - i3GEOF.legenda.aguarde.visibility = "hidden";
2030   - i3GEOF.legenda.aposAlterarLegenda();
2031   - };
2032   - p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=salvaparametrosauto&tema=" + i3GEOF.legenda.tema
2033   - + "&classesitem=" + $i("i3GEOlegendaAutoclassesitem").value
2034   - + "&classesnome=" + $i("i3GEOlegendaAutoclassesnome").value
2035   - + "&classescor=" + $i("i3GEOlegendaAutoclassescor").value
2036   - + "&classessimbolo=" + $i("i3GEOlegendaAutoclassessimbolo").value
2037   - + "&classestamanho=" + $i("i3GEOlegendaAutoclassestamanho").value
2038   - + "&palletefile=" + $i("i3GEOlegendaAutopalletefile").value
2039   - + "&palletestep=" + $i("i3GEOlegendaAutopalletestep").value;
2040   -
2041   - cp = new cpaint();
2042   - cp.set_response_type("JSON");
2043   - cp.call(p,"foo",temp);
2044   - }
2045   -};
2046   -//aplica ao codigo i3GEOF definicoes feitas na interface do mapa
2047   -//isso permite a substituicao de funcoes e parametros
2048   -if(i3GEO.configura.ferramentas.hasOwnProperty("legenda")){
2049   - jQuery.each( i3GEO.configura.ferramentas.legenda, function(index, value) {
2050   - i3GEOF.legenda[index] = i3GEO.configura.ferramentas.legenda[index];
2051   - });
2052   -}
2053 0 \ No newline at end of file
ferramentas/legenda_old/templateFormEstilo_mst.html
... ... @@ -1,238 +0,0 @@
1   -<div class='form-group condensed'>
2   - <div class="input-group">
3   - <div class='form-group label-fixed'>
4   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("outlinecolor","i3GEOlegendaoutlinecolor")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
5   - <span class="material-icons">flash_on</span>
6   - </button>
7   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaoutlinecolor">{{{corContorno}}}</label>
8   - <input id='i3GEOlegendaoutlinecolor' value='{{{voutlinecolor}}}' class="form-control input-lg i3geoFormIconeAquarela" type='text' />
9   - </div>
10   - <span class="input-group-btn">
11   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
12   - <span class="material-icons ">send</span>
13   - </a>
14   - </span>
15   - </div>
16   -</div>
17   -
18   -<div class='form-group condensed'>
19   - <div class="input-group">
20   - <div class='form-group label-fixed'>
21   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("color","i3GEOlegendacolor")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
22   - <span class="material-icons">flash_on</span>
23   - </button>
24   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendacolor">{{{corFrente}}}</label>
25   - <input id='i3GEOlegendacolor' value='{{{vcolor}}}' class="form-control input-lg i3geoFormIconeAquarela" type='text' />
26   - </div>
27   - <span class="input-group-btn">
28   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
29   - <span class="material-icons ">send</span>
30   - </a>
31   - </span>
32   - </div>
33   -</div>
34   -
35   -<div class='form-group condensed'>
36   - <div class="input-group">
37   - <div class='form-group label-fixed'>
38   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("backgroundcolor","i3GEOlegendabackgroundcolor")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
39   - <span class="material-icons">flash_on</span>
40   - </button>
41   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendabackgroundcolor">{{{corFundo}}}</label>
42   - <input id='i3GEOlegendabackgroundcolor' value='{{{vbackgroundcolor}}}' class="form-control input-lg i3geoFormIconeAquarela" type='text' />
43   - </div>
44   - <span class="input-group-btn">
45   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
46   - <span class="material-icons ">send</span>
47   - </a>
48   - </span>
49   - </div>
50   -</div>
51   -
52   -<div class='form-group condensed'>
53   - <div class="input-group">
54   - <div class='form-group label-fixed'>
55   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("size","i3GEOlegendasizes")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
56   - <span class="material-icons">flash_on</span>
57   - </button>
58   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendasizes">{{{tamanhoEspacamento}}}</label>
59   - <input id='i3GEOlegendasizes' value='{{{vsize}}}' class="form-control input-lg " type='text' />
60   - <div id='i3GEOlegendaComboSize'></div>
61   - </div>
62   - <span class="input-group-btn">
63   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
64   - <span class="material-icons ">send</span>
65   - </a>
66   - </span>
67   - </div>
68   -</div>
69   -
70   -<div class='form-group condensed'>
71   - <div class="input-group">
72   - <div class='form-group label-fixed'>
73   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("width","i3GEOlegendawidth")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
74   - <span class="material-icons">flash_on</span>
75   - </button>
76   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendawidth">{{{espessura}}}</label>
77   - <input value='{{{vwidth}}}' id='i3GEOlegendawidth' class="form-control input-lg " type='text' />
78   - </div>
79   - <span class="input-group-btn">
80   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
81   - <span class="material-icons ">send</span>
82   - </a>
83   - </span>
84   - </div>
85   -</div>
86   -
87   -<div class='form-group condensed'>
88   - <div class="input-group">
89   - <div class='form-group label-fixed'>
90   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("pattern","i3GEOlegendapattern")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
91   - <span class="material-icons">flash_on</span>
92   - </button>
93   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendapattern">{{{padraoRepeticao}}}</label>
94   - <input value='{{{vpattern}}}' id='i3GEOlegendapattern' class="form-control input-lg " type='text' />
95   - </div>
96   - <span class="input-group-btn">
97   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
98   - <span class="material-icons ">send</span>
99   - </a>
100   - </span>
101   - </div>
102   -</div>
103   -
104   -<div class='form-group condensed'>
105   - <div class="input-group">
106   - <div class='form-group label-fixed'>
107   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("opacity","i3GEOlegendaopacidade")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
108   - <span class="material-icons">flash_on</span>
109   - </button>
110   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaopacidade">{{{opacidade}}}</label>
111   - <input value='{{{vopacity}}}' id='i3GEOlegendaopacidade' class="form-control input-lg " type='text' />
112   - </div>
113   - <span class="input-group-btn">
114   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
115   - <span class="material-icons ">send</span>
116   - </a>
117   - </span>
118   - </div>
119   -</div>
120   -
121   -<div class='form-group condensed'>
122   - <div class="input-group">
123   - <div class='form-group label-fixed'>
124   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("angle","i3GEOlegendaangulo")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
125   - <span class="material-icons">flash_on</span>
126   - </button>
127   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaangulo">{{{angulo}}}</label>
128   - <input value='{{{vangle}}}' id='i3GEOlegendaangulo' class="form-control input-lg " type='text' />
129   - </div>
130   - <span class="input-group-btn">
131   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
132   - <span class="material-icons ">send</span>
133   - </a>
134   - </span>
135   - </div>
136   -</div>
137   -
138   -<div class='form-group condensed'>
139   - <div class="input-group">
140   - <div class='form-group label-fixed'>
141   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("symbolscale","i3GEOlegendasymbolscale")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
142   - <span class="material-icons">flash_on</span>
143   - </button>
144   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendasymbolscale">{{{symbolscale}}}</label>
145   - <input value='{{{vsymbolscale}}}' id='i3GEOlegendasymbolscale' class="form-control input-lg " type='text' />
146   - </div>
147   - <span class="input-group-btn">
148   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
149   - <span class="material-icons ">send</span>
150   - </a>
151   - </span>
152   - </div>
153   -</div>
154   -
155   -<div class='form-group condensed'>
156   - <div class="input-group">
157   - <div class='form-group label-fixed'>
158   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("minsize","i3GEOlegendaminsize")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
159   - <span class="material-icons">flash_on</span>
160   - </button>
161   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaminsize">{{{minsize}}}</label>
162   - <input value='{{{vminsize}}}' id='i3GEOlegendaminsize' class="form-control input-lg " type='text' />
163   - </div>
164   - <span class="input-group-btn">
165   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
166   - <span class="material-icons ">send</span>
167   - </a>
168   - </span>
169   - </div>
170   -</div>
171   -
172   -<div class='form-group condensed'>
173   - <div class="input-group">
174   - <div class='form-group label-fixed'>
175   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("maxsize","i3GEOlegendamaxsize")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
176   - <span class="material-icons">flash_on</span>
177   - </button>
178   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendamaxsize">{{{maxsize}}}</label>
179   - <input value='{{{vmaxsize}}}' id='i3GEOlegendamaxsize' class="form-control input-lg " type='text' />
180   - </div>
181   - <span class="input-group-btn">
182   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
183   - <span class="material-icons ">send</span>
184   - </a>
185   - </span>
186   - </div>
187   -</div>
188   -
189   -<div class='form-group condensed'>
190   - <div class="input-group">
191   - <div class='form-group label-fixed'>
192   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("offsetx","i3GEOlegendaoffsetx")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
193   - <span class="material-icons">flash_on</span>
194   - </button>
195   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaoffsetx">{{{offsetx}}}</label>
196   - <input value='{{{voffsetx}}}' id='i3GEOlegendaoffsetx' class="form-control input-lg " type='text' />
197   - </div>
198   - <span class="input-group-btn">
199   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
200   - <span class="material-icons ">send</span>
201   - </a>
202   - </span>
203   - </div>
204   -</div>
205   -
206   -<div class='form-group condensed'>
207   - <div class="input-group">
208   - <div class='form-group label-fixed'>
209   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("offsety","i3GEOlegendaoffsety")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
210   - <span class="material-icons">flash_on</span>
211   - </button>
212   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaoffsety">{{{offsety}}}</label>
213   - <input value='{{{voffsety}}}' id='i3GEOlegendaoffsety' class="form-control input-lg " type='text' />
214   - </div>
215   - <span class="input-group-btn">
216   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
217   - <span class="material-icons ">send</span>
218   - </a>
219   - </span>
220   - </div>
221   -</div>
222   -
223   -<div class='form-group condensed'>
224   - <div class="input-group">
225   - <div class='form-group label-fixed'>
226   - <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("symbolname","i3GEOlegendasymbolname")' class="btn btn-xs" style="margin: 2px; padding: 2px;">
227   - <span class="material-icons">flash_on</span>
228   - </button>
229   - <label class="control-label" style="max-width: 90%;" for="i3GEOlegendasymbolname">{{{simbolo}}}</label>
230   - <input value='{{{vsymbolname}}}' id='i3GEOlegendasymbolname' class="form-control input-lg " type='text' />
231   - </div>
232   - <span class="input-group-btn">
233   - <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
234   - <span class="material-icons ">send</span>
235   - </a>
236   - </span>
237   - </div>
238   -</div>
ferramentas/legenda_old/templateLista_mst.html
... ... @@ -1,109 +0,0 @@
1   -<!-- para o caso de vetores -->
2   -<div class="{{{hidden2}}}">
3   - <button onclick="i3GEOF.legenda.mudaLegenda()" class='btn btn-primary btn-sm btn-raised'>{{{aplicaAlteracao}}}</button>
4   - <button id="botaoAdicionaClasse" onclick="i3GEOF.legenda.adicionaClasse()" title='{{{adicionaNovaClasse}}}' class='btn btn-primary btn-sm btn-raised'>{{{adicionaClasse}}}</button>
5   - <h5 class="alert alert-info">{{{clicaSimbolo}}}</h5>
6   - <table id="i3GEOlegendalegenda">
7   - <tr>
8   - <td>
9   - <button title='{{{inverte}}}' onclick='i3GEOF.legenda.inverteCores()' class="btn btn-xs" style="margin: 2px; padding: 2px;">
10   - <span class="material-icons">invert_colors</span>
11   - </button>
12   - </td>
13   - <td style="background-color: white">
14   - <button title='{{{calculaTamanho}}}' onclick='i3GEOF.legenda.calculaTamanho()' class="btn btn-xs" style="margin: 2px; padding: 2px;">
15   - <span class="material-icons">texture</span>
16   - </button>
17   - </td>
18   - <td></td>
19   - <td style="background-color: yellow">
20   - <button onclick='i3GEOF.legenda.ordenaClasses()' class="btn btn-xs" style="margin: 2px; padding: 2px;">
21   - <span class="material-icons">sort</span>
22   - </button> <span style="vertical-align: super; margin-left: 3px;">nome</span>
23   - </td>
24   - <td style="background-color: yellow">expressão</td>
25   - <td style="background-color: yellow"></td>
26   - <td style="background-color: yellow">minScale</td>
27   - <td style="background-color: yellow">maxScale</td>
28   - </tr>
29   - {{#linhas}}
30   - <tr id="{{{id}}}{{{idclasse}}}">
31   - <td>
32   - <button title="{{{cliqueExclui}}}" onclick="i3GEOF.legenda.excluilinhaf('{{{id}}}{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;">
33   - <span class="material-icons">clear</span>
34   - </button>
35   - </td>
36   - <td><img style="cursor: pointer; width: 30px; height: 25px" title="{{{cliqueAltera}}}" src="{{{imagem}}}" onclick="i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_{{{id}}}')"></td>
37   - <td>
38   - <button onclick="i3GEOF.legenda.modificaCor('{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;">
39   - <span class="material-icons">palette</span>
40   - </button>
41   - </td>
42   - <td style="padding: 5px;">
43   - <div class='form-group label-fixed condensed'>
44   - <input onchange="$('#botaoAdicionaClasse').prop('disabled', true);" id="i3GEOlegendaid_{{{id}}}" style="width: 200px;" value="{{{nome}}}" name="nome" title="{{{novoNome}}}"
45   - tabindex="0" class="form-control input-lg" type='text' />
46   - </div>
47   - </td>
48   - <td style="padding: 5px;">
49   - <div class='form-group label-fixed condensed'>
50   - <!-- id necessario para o construtor de filtro -->
51   - <input onchange="$('#botaoAdicionaClasse').prop('disabled', true);" id="i3GEOlegendaid_exp{{{id}}}" style="width: 200px;" value='{{{exp}}}' name="expressao" tabindex="0"
52   - class="form-control input-lg" type='text' />
53   - </div>
54   - </td>
55   - <td>
56   - <button title="{{{editorExp}}}" onclick="i3GEOF.legenda.filtro('i3GEOlegendaid_exp{{{id}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;">
57   - <span class="material-icons">build</span>
58   - </button>
59   - </td>
60   - <td style="padding: 5px;">
61   - <div class='form-group label-fixed condensed'>
62   - <input style="width: 100px;" value="{{{minScale}}}" name="minScale" title="{{{txtMinscale}}}" tabindex="0" class="form-control input-lg" type='text' />
63   - </div>
64   - </td>
65   - <td style="padding: 5px;">
66   - <div class='form-group label-fixed condensed'>
67   - <input style="width: 100px;" value="{{{maxScale}}}" name="maxScale" title="{{{txtMaxscale}}}" tabindex="0" class="form-control input-lg" type='text' />
68   - </div>
69   - </td>
70   - <td>
71   - <button title="{{{sobe}}}" onclick="i3GEOF.legenda.sobelinhaf('{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;">
72   - <span class="material-icons">arrow_drop_up</span>
73   - </button>
74   - </td>
75   - <td>
76   - <button title="{{{desce}}}" onclick="i3GEOF.legenda.descelinhaf('{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;">
77   - <span class="material-icons">arrow_drop_down</span>
78   - </button>
79   - </td>
80   - </tr>
81   - {{/linhas}}
82   - </table>
83   -</div>
84   -<!-- para o caso de imagens -->
85   -<div class="{{{hidden1}}}">
86   - <button onclick="i3GEOF.legenda.aplicaProcessos()" class='btn btn-primary btn-sm btn-raised'>{{{aplicaProcesso}}}</button>
87   - <div class='form-group condensed'>
88   - <label class="control-label">{{{selecionaProcesso}}}</label>
89   - <select class="form-control" onchange="i3GEOF.legenda.adicionaProcesso(this)">
90   - <option value=''></option>
91   - <option value='SCALE='>{{{escalaCores}}}</option>
92   - <option value='RESAMPLE='>{{{reamostragem}}}</option>
93   - <option value='BANDS='>{{{bandas}}}</option>
94   - <option value='COLOR_MATCH_THRESHOLD='>Threshold</option>
95   - <option value='NODATA='>Nodata</option>
96   - </select><b class="caret careti"></b> <b class="caret careti"></b>
97   - </div>
98   - <br>
99   - <h5>{{{existentes}}}</h5>
100   - <div id=i3GEOlegendaprocessos>
101   - {{#processos}}
102   - <div class='form-group label-fixed condensed'>
103   - <input value="{{{value}}}" tabindex="0" class="form-control input-lg" type='text' />
104   - </div>
105   - {{/processos}}
106   - </div>
107   - <h5 class="alert alert-info">{{{ajuda1}}}</h5>
108   - <h5 class="alert alert-info">{{{adicionaProcesso}}}</h5>
109   -</div>
110 0 \ No newline at end of file
ferramentas/legenda_old/template_mst.html
... ... @@ -1,415 +0,0 @@
1   -<!-- Guias -->
2   -<div class='yui-navset' style='height: 38px; top: 0px; cursor: pointer; margin-left: 2px;'>
3   - <ul class='yui-nav' style='border-width: 0pt 0pt 0px; border-color: rgb(240, 240, 240); border-bottom-color: white;'>
4   - <li>
5   - <div id='i3GEOlegendaguia6' style='text-align: center; left: 0px;'>
6   - <a title='{{{propriedades}}}'>
7   - <em><span class="material-icons">settings</span></em>
8   - </a>
9   - </div>
10   - </li>
11   - <li>
12   - <div id='i3GEOlegendaguia1' style='text-align: center; left: 0px;'>
13   - <a>
14   - <em>{{{legenda}}}</em>
15   - </a>
16   - </div>
17   - </li>
18   - <li>
19   - <div id='i3GEOlegendaguia2' style='text-align: center; left: 0px;'>
20   - <a>
21   - <em>{{{classes}}}</em>
22   - </a>
23   - </div>
24   - </li>
25   - <li>
26   - <div id='i3GEOlegendaguia3' style='text-align: center; left: 0px;'>
27   - <a>
28   - <em>{{{editor}}}</em>
29   - </a>
30   - </div>
31   - </li>
32   - <li>
33   - <div id='i3GEOlegendaguia4' style='text-align: center; left: 0px;'>
34   - <a>
35   - <em>{{{graficos}}}</em>
36   - </a>
37   - </div>
38   - </li>
39   - <li>
40   - <div id='i3GEOlegendaguia5' style='text-align: center; left: 0px;'>
41   - <a>
42   - <em>{{{importaExportaSLD}}}</em>
43   - </a>
44   - </div>
45   - </li>
46   - <li>
47   - <div id='i3GEOlegendaguia7' style='text-align: center; left: 0px;'>
48   - <a>
49   - <em>{{{cluster}}}</em>
50   - </a>
51   - </div>
52   - </li>
53   - <li>
54   - <div id='i3GEOlegendaguia8' style='text-align: center; left: 0px;'>
55   - <a>
56   - <em>Auto</em>
57   - </a>
58   - </div>
59   - </li>
60   - </ul>
61   -</div>
62   -<div class='container-fluid' style="width:98%;height: calc(100% - 39px); overflow: auto;">
63   -
64   -<!--- Propriedades -->
65   - <div id='i3GEOlegendaguia6obj' class='container-fluid ' >
66   - <button onclick="i3GEOF.legenda.adicionaConta()" class='btn btn-primary btn-sm btn-block btn-raised'>{{{incluiNumeroOcorrencia}}}</button>
67   - <button onclick="i3GEOF.legenda.adicionaOpacidade()" title='{{{aplicaOpacidade}}}' class='btn btn-primary btn-sm btn-block btn-raised'>{{{aplicaOpacidadeVariavel}}}</button>
68   - <button onclick="i3GEOF.legenda.janelaCorRamp()" title='{{{variaCoresExtremos}}}' class='btn btn-primary btn-sm btn-block btn-raised'>{{{escolhePaletaCores}}}</button>
69   - <div class="checkbox text-left">
70   - <label>
71   - <input checked type="checkbox" id="i3GEOFlegendamostra" onclick="i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema);">
72   - <span class="checkbox-material noprint"> <span class="check"></span>
73   - </span> {{{mostraClassesLegenda}}}
74   - </label>
75   - </div>
76   - <div class="form-group label-fixed">
77   - <label class="control-label" for="i3GEOlegendaImg">{{{legendaImg}}}</label>
78   - <div class="input-group">
79   - <input id="i3GEOlegendaImg" class="form-control" type="text" value="">
80   - <span class="input-group-btn"> <a onclick="i3GEOF.legenda.aplicarLegendaImg();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max"
81   - href="javascript:void(0)">
82   - <span class="material-icons ">send</span>
83   - </a>
84   - </span>
85   - </div>
86   - </div>
87   -
88   - <div class="form-group label-fixed">
89   - <label class="control-label" for="i3GEOlegendaImg">{{{offsite}}}</label>
90   - <div class="input-group">
91   - <input id="i3GEOoffsite" class="form-control i3geoFormIconeAquarela" type="text" value="-1,-1,-1">
92   - <span class="input-group-btn"> <a onclick="i3GEOF.legenda.aplicarOffsite();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max"
93   - href="javascript:void(0)">
94   - <span class="material-icons ">send</span>
95   - </a>
96   - </span>
97   - </div>
98   - </div>
99   -
100   - <div class="form-group label-fixed">
101   - <label class="control-label" for="i3GEOlegendaImg">{{{geraCores}}}</label>
102   - <br> {{{de}}} &nbsp;
103   - <input class="form-control i3geoFormIconeAquarela" style="display: inline; width: 150px;" id="i3GEOlegendaacori" size="10" value="0,0,0" type="text">
104   - &nbsp; {{{ate}}} &nbsp;
105   - <input class="form-control i3geoFormIconeAquarela" style="display: inline; width: 150px;" id="i3GEOlegendaacorf" size="10" value="255,255,255" type="text">
106   - &nbsp; <span class="input-group-btn" style="display: inline;"> <a title='{{{aplicaVariaCores}}}' onclick="i3GEOF.legenda.paleta();return false;" role="button" type="button"
107   - class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
108   - <span class="material-icons ">send</span>
109   - </a>
110   - </span>
111   - </div>
112   - </div>
113   - <!-- listagem das classes ver templateLista_mst.html -->
114   - <div id='i3GEOlegendaguia1obj' class='container-fluid ' style="height: calc(100% - 200px);">
115   - <div id='i3GEOFlegendaComboCabeca' class='form-group condensed' ></div>
116   - <div id="i3GEOlegendaguia1objLegenda"></div>
117   - </div>
118   -
119   - <!-- Classificacao -->
120   - <div id='i3GEOlegendaguia2obj' class='container-fluid '>
121   - <div class="checkbox text-left">
122   - <label>
123   - <input checked id='i3GEOFlegendaaplicaextent' type="checkbox" onclick="">
124   - <span class="checkbox-material noprint"> <span class="check"></span>
125   - </span> {{{consideraElementosVisisveis}}}
126   - </label>
127   - </div>
128   - <div class='form-group label-floating'>
129   - <label class="control-label" for="{{{idjanela}}}i3GEOtabelaexcestat">{{{ignoraValores}}}</label>
130   - <input class="form-control input-lg" type='text' id='i3GEOlegendaignorar' value='' />
131   - </div>
132   -
133   - <hr />
134   - <h5>{{{alteraGeom}}}</h5>
135   - <div style="width: 80%">
136   - <div class='form-group condensed'>
137   - <label class="control-label" for="i3GEOlegentaTipoGeo">{{{transformaGeom}}}</label>
138   - <div style="width: 100%;" class="input-group">
139   - <select class="form-control" id='i3GEOlegentaTipoGeo'>
140   - <option value=''>{{{semTransformacao}}}</option>
141   - <option value='centroid'>{{{centroide}}}</option>
142   - <option value='bbox'>box</option>
143   - <option value='vertices'>{{{vertices}}}</option>
144   - <option value='start'>{{{verticeInicial}}}</option>
145   - <option value='end'>{{{verticeFinal}}}</option>
146   - </select> <b class="caret careti"></b>
147   - </div>
148   - </div>
149   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn pull-right"> <a style="left: 80px;" onclick="i3GEOF.legenda.alteraGeometriaTema();return false;"
150   - role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
151   - <span class="material-icons ">send</span>
152   - </a>
153   - </span>
154   - </div>
155   - <hr />
156   - <h5>{{{alteraTipo}}}</h5>
157   - <div style="width: 80%">
158   -
159   - <div class='form-group condensed'>
160   - <div class="input-group">
161   - <label class="control-label">{{{alteraTipoGeom}}}</label>
162   - </div>
163   - </div>
164   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn"> <a style="left: 80px;" onclick="i3GEOF.legenda.representacao();return false;" role="button"
165   - type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
166   - <span class="material-icons ">send</span>
167   - </a>
168   - </span>
169   - </div>
170   - <hr />
171   - <h5>{{{simboloUnico}}}</h5>
172   - <div style="width: 80%">
173   -
174   - <div class='form-group condensed'>
175   - <div class="input-group">
176   - <label class="control-label">{{{todosElementosUnicoSimbolo}}}</label>
177   - </div>
178   - </div>
179   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn"> <a style="left: 80px;" onclick="i3GEOF.legenda.simbU();return false;" role="button" type="button"
180   - class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
181   - <span class="material-icons ">send</span>
182   - </a>
183   - </span>
184   - </div>
185   - <hr />
186   - <h5>{{{valorUnico}}}</h5>
187   - <div style="width: 80%">
188   -
189   - <div class='form-group condensed'>
190   - <label class="control-label">{{{cadaOcorrenciaUnicoSimbolo}}}</label>
191   - <div style="width: 100%;" class="input-group">
192   - <div id='i3GEOlegendaitensValorUnico'></div>
193   - </div>
194   - </div>
195   - <div class='form-group condensed'>
196   - <label class="control-label">{{{nomeClassesUnicoSimbolo}}}</label>
197   - <div style="width: 100%;" class="input-group">
198   - <div id='i3GEOlegendaClassesValorUnico'></div>
199   -
200   - </div>
201   - </div>
202   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn"> <a style="left: 80px;" onclick="i3GEOF.legenda.valorU();return false;" role="button" type="button"
203   - class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
204   - <span class="material-icons ">send</span>
205   - </a>
206   - </span>
207   - </div>
208   - <hr />
209   - <h5>{{{classesFixas}}}</h5>
210   - <div style="width: 80%">
211   -
212   - <div class='form-group condensed'>
213   - <label class="control-label">{{{criaClassesItemNumerico}}}</label>
214   - <div style="width: 100%;" class="input-group">
215   - <div id='i3GEOlegendaitensValorClass'></div>
216   - </div>
217   - </div>
218   - <div class='form-group label-floating'>
219   - <label class="control-label" for="i3GEOlegendanclasses">{{{numeroClasses}}}</label>
220   - <input class="form-control input-lg" type='text' id='i3GEOlegendanclasses' value='5' />
221   - </div>
222   - <h5>{{{tipoCalculo}}}</h5>
223   - <button onclick="i3GEOF.legenda.valorC()" class='btn btn-primary btn-sm btn-raised'>{{{intervalosIguais}}}</button>
224   - <button onclick="i3GEOF.legenda.valorQN()" class='btn btn-primary btn-sm btn-raised'>{{{quebrasNaturais}}}</button>
225   - <button onclick="i3GEOF.legenda.valorQu()" class='btn btn-primary btn-sm btn-raised'>{{{calcularQuantil}}}</button>
226   - </div>
227   - <hr />
228   - <h5>{{{metade}}}</h5>
229   - <div style="width: 80%">
230   -
231   - <div class='form-group condensed'>
232   - <label class="control-label">{{{duasmetades}}}</label>
233   - <div style="width: 100%;" class="input-group">
234   - <div id='i3GEOlegendaitensMetade'></div>
235   - </div>
236   - </div>
237   - <div class='form-group condensed'>
238   - <label class="control-label">{{{iunico}}}</label>
239   - <div style="width: 100%;" class="input-group">
240   - <div id='i3GEOlegendaitensMetadeId'></div>
241   - </div>
242   - </div>
243   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn"> <a style="left: 80px;" onclick="i3GEOF.legenda.metade();return false;" role="button" type="button"
244   - class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
245   - <span class="material-icons ">send</span>
246   - </a>
247   - </span>
248   - </div>
249   - <hr />
250   - <h5>{{{media}}}</h5>
251   - <div style="width: 80%">
252   -
253   - <div class='form-group condensed'>
254   - <label class="control-label">{{{duasmedias}}}</label>
255   - <div style="width: 100%;" class="input-group">
256   - <div id='i3GEOlegendaitensMedia'></div>
257   - </div>
258   - </div>
259   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn"> <a style="left: 80px;" onclick="i3GEOF.legenda.media();return false;" role="button" type="button"
260   - class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
261   - <span class="material-icons ">send</span>
262   - </a>
263   - </span>
264   - </div>
265   - <hr />
266   - <h5>{{{calcularQuartil}}}</h5>
267   - <div style="width: 80%">
268   -
269   - <div class='form-group condensed'>
270   - <label class="control-label">{{{criaQuartis}}}</label>
271   - <div style="width: 100%;" class="input-group">
272   - <div id='i3GEOlegendaitensValorQuartil'></div>
273   - </div>
274   - </div>
275   - <div class='form-group condensed'>
276   - <label class="control-label">{{{estiloNomeClasses}}}</label>
277   - <div style="width: 100%;" class="input-group">
278   - <select class="form-control" id='estiloClassesQuartis'>
279   - <option value='minimo'>{{{soValores}}}</option>
280   - <option value='simples'>{{{quartilValores}}}</option>
281   - <option value='completo'>{{{expressaoCompleta}}}</option>
282   - </select> <b class="caret careti"></b>
283   -
284   -
285   - </div>
286   - </div>
287   - <span style="top: 0px; position: absolute; right: 0px;" class="input-group-btn"> <a style="left: 80px;" onclick="i3GEOF.legenda.valorQ();return false;" role="button" type="button"
288   - class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)">
289   - <span class="material-icons ">send</span>
290   - </a>
291   - </span>
292   - </div>
293   - <br>
294   - </div>
295   - <!-- editor de simbolos -->
296   - <div id='i3GEOlegendaguia3obj' class='container-fluid '>
297   - <h5>{{{etiquetasClasse}}}</h5>
298   - <div class='form-group condensed'>
299   - <label class="control-label" for="i3GEOlegendaitensLabel">{{{itemComTexto}}}</label>
300   - <div style="width: 100%;" class="input-group">
301   - <div id='i3GEOlegendaitensLabel'></div>
302   - </div>
303   - </div>
304   - <button onclick="i3GEOF.legenda.excluiLabels()" class='btn btn-primary btn-sm btn-raised'>{{{removeLabels}}}</button>
305   - <button onclick="i3GEOF.legenda.incluirLabels()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button>
306   - <button onclick="i3GEOF.legenda.propriedadesLabels()" class='btn btn-primary btn-sm btn-raised'>{{{propriedades2}}}</button>
307   -
308   - <hr />
309   -
310   - <h5>{{{estilos}}}</h5>
311   -
312   - <div class='form-group condensed'>
313   - <label class="control-label" for="i3GEOlegendaestilos">{{{estiloEdicao}}}</label>
314   - <div class="input-group" style="width: 150px;">
315   - <div id='i3GEOlegendacomboestilos'></div>
316   - </div>
317   - </div>
318   - <button onclick="i3GEOF.legenda.excluiEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{exclui}}}</button>
319   - <button onclick="i3GEOF.legenda.adicionaEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{adiciona}}}</button>
320   - <button onclick="i3GEOF.legenda.sobeEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{sobe}}}</button>
321   - <button onclick="i3GEOF.legenda.desceEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{desce}}}</button>
322   -
323   - <hr />
324   -
325   - <h5>{{{edicaoEstilo}}}</h5>
326   - <h5>{{{ajudaEstilo}}}</h5>
327   - <div id='i3GEOlegendaParametrosEstilos'></div>
328   - <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendamostraEstilo'></div>
329   - <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendasimbolos'></div>
330   - </div>
331   -
332   - <!-- graficos -->
333   - <div id='i3GEOlegendaguia4obj' class='container-fluid '></div>
334   -
335   - <!-- SLD -->
336   - <div id='i3GEOlegendaguia5obj' class='container-fluid '>
337   - <h5>
338   - {{{geraSLD}}}
339   - <a href='http://mapserver.org/ogc/sld.html#sld' target='_blank'> Mapserver SLD </a>
340   - {{{ajudaSLD}}}
341   - </h5>
342   - <button onclick="i3GEOF.legenda.slde()" class='btn btn-primary btn-sm btn-raised'>{{{exportaSLD}}}</button>
343   - <h5>{{{msgAplicaSLD}}}</h5>
344   - <button onclick="i3GEOF.legenda.sldi()" class='btn btn-primary btn-sm btn-raised'>{{{aplicaSLD}}}</button>
345   - </div>
346   -
347   - <!-- cluster -->
348   - <div id='i3GEOlegendaguia7obj' class='container-fluid '>
349   - <h5>{{{clusterAjuda}}}</h5>
350   - <div class='form-group label-fixed'>
351   - <label class="control-label" for="i3GEOlegendaClusterMaxdistance">{{{ClusterMaxdistance}}}</label>
352   - <input class="form-control input-lg" type='text' id='i3GEOlegendaClusterMaxdistance' value='5' />
353   - </div>
354   - <div class='form-group label-fixed'>
355   - <label class="control-label" for="i3GEOlegendaClusterBuffer">{{{ClusterBuffer}}}</label>
356   - <input class="form-control input-lg" type='text' id='i3GEOlegendaClusterBuffer' value='0' />
357   - </div>
358   - <div class='form-group label-fixed'>
359   - <label class="control-label" for="i3GEOlegendaClusterFilter">{{{ClusterFilter}}}</label>
360   - <input class="form-control input-lg" type='text' id='i3GEOlegendaClusterFilter' value='' />
361   - </div>
362   - <div style="width: 100%;" class='form-group label-fixed'>
363   - <label class="control-label" for="i3GEOlegendaClusterRegion">{{{ClusterRegion}}}</label>
364   - <select class="form-control" id='i3GEOlegendaClusterRegion'>
365   - <option value='rectangle'>rectangle</option>
366   - <option value='ellipse'>ellipse</option>
367   - </select> <b class="caret careti"></b>
368   -
369   - </div>
370   - <div class='form-group label-fixed'>
371   - <label class="control-label" for="i3GEOlegendaClusterRegion">{{{ClusterGroup}}}</label>
372   - <div id='i3GEOlegendaitensCluster'></div>
373   - </div>
374   - <button onclick="i3GEOF.legenda.aplicarCluster()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button>
375   - <button onclick="i3GEOF.legenda.removerCluster()" class='btn btn-primary btn-sm btn-raised'>{{{remover}}}</button>
376   -
377   - </div>
378   - <!--autoclasses-->
379   - <div id='i3GEOlegendaguia8obj' class='container-fluid '>
380   - <h5>{{{autoClasses}}}</h5>
381   -
382   - <h5>{{{colunasTxt}}}</h5>
383   - <div id="i3GEOlegendaAutocolunas"></div>
384   - <div class='form-group label-fixed'>
385   - <label class="control-label" for="i3GEOlegendaClusterFilter">{{{classesitem}}}</label>
386   - <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassesitem' value='' />
387   - </div>
388   - <div class='form-group label-fixed'>
389   - <label class="control-label" for="i3GEOlegendaAutoclassesnome">{{{classesnome}}}</label>
390   - <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassesnome' value='' />
391   - </div>
392   - <div class='form-group label-fixed'>
393   - <label class="control-label" for="i3GEOlegendaAutoclassescor">{{{classescor}}}</label>
394   - <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassescor' value='' />
395   - </div>
396   - <div class='form-group label-fixed'>
397   - <label class="control-label" for="i3GEOlegendaAutoclassessimbolo">{{{classessimbolo}}}</label>
398   - <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassessimbolo' value='' />
399   - </div>
400   - <div class='form-group label-fixed'>
401   - <label class="control-label" for="i3GEOlegendaAutoclassestamanho">{{{classestamanho}}}</label>
402   - <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassestamanho' value='' />
403   - </div>
404   - <div class='form-group label-fixed'>
405   - <label class="control-label" for="i3GEOlegendaAutopalletefile">{{{palletefile}}}</label>
406   - <input class="form-control input-lg" type='text' id='i3GEOlegendaAutopalletefile' value='' />
407   - </div>
408   - <div class='form-group label-fixed'>
409   - <label class="control-label" for="i3GEOlegendaAutopalletestep">{{{palletestep}}}</label>
410   - <input class="form-control input-lg" type='text' id='i3GEOlegendaAutopalletestep' value='' />
411   - </div>
412   - <button onclick="i3GEOF.legenda.salvaParametrosAuto()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button>
413   - </div>
414   - <input type='hidden' value='' id='listaColourRamp' onchange='javascript:i3GEOF.legenda.aplicaColourRamp()' />
415   -</div>
416 0 \ No newline at end of file
ferramentas/opcoes_label/index.js
... ... @@ -28,20 +28,20 @@ Voc&amp;ecirc; deve ter recebido uma c&amp;oacute;pia da Licen&amp;ccedil;a P&amp;uacute;blica G
28 28 GNU junto com este programa; se n&atilde;o, escreva para a
29 29 Free Software Foundation, Inc., no endere&ccedil;o
30 30 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
31   -*/
  31 + */
32 32 if(typeof(i3GEOF) === 'undefined'){
33   - var i3GEOF = {};
  33 + var i3GEOF = {};
34 34 }
35 35  
36 36 /*
37 37 Classe: i3GEOF.proplabel
38   -*/
  38 + */
39 39 i3GEOF.proplabel = {
40 40 /*
41 41 Variavel: aguarde
42 42  
43 43 Estilo do objeto DOM com a imagem de aguarde existente no cabe&ccedil;alho da janela.
44   - */
  44 + */
45 45 aguarde: "",
46 46 /**
47 47 * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php
... ... @@ -51,17 +51,17 @@ i3GEOF.proplabel = {
51 51 * Susbtitutos para o template
52 52 */
53 53 mustacheHash : function() {
54   - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.proplabel.dicionario);
55   - dicionario["locaplic"] = i3GEO.configura.locaplic;
56   - dicionario["x15"] = $trad("x15");
57   - dicionario["x14"] = $trad("x14");
58   - return dicionario;
  54 + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.proplabel.dicionario);
  55 + dicionario["locaplic"] = i3GEO.configura.locaplic;
  56 + dicionario["x15"] = $trad("x15");
  57 + dicionario["x14"] = $trad("x14");
  58 + return dicionario;
59 59 },
60 60 /*
61 61 Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que n&atilde;o tinha dicion&aacute;rio
62   - */
  62 + */
63 63 criaJanelaFlutuante: function(conector){
64   - i3GEOF.proplabel.iniciaDicionario(conector);
  64 + i3GEOF.proplabel.iniciaDicionario(conector);
65 65 },
66 66 /*
67 67 Function: inicia
... ... @@ -71,18 +71,18 @@ i3GEOF.proplabel = {
71 71 Parametro:
72 72  
73 73 iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
74   - */
  74 + */
75 75 inicia: function(iddiv,conector){
76   - if(i3GEOF.proplabel.MUSTACHE == ""){
77   - $.get(i3GEO.configura.locaplic + "/ferramentas/opcoes_label/template_mst.html", function(template) {
78   - i3GEOF.proplabel.MUSTACHE = template;
79   - i3GEOF.proplabel.inicia(iddiv,conector);
80   - });
81   - return;
82   - }
83   - $i(iddiv).innerHTML = i3GEOF.proplabel.html(conector);
84   - i3GEO.util.aplicaAquarela("i3GEOF.proplabel_corpo");
85   - i3GEO.util.comboFontes("i3GEOproplabelListaFonte","i3GEOproplabelDivListaFonte","form-control");
  76 + if(i3GEOF.proplabel.MUSTACHE == ""){
  77 + $.get(i3GEO.configura.locaplic + "/ferramentas/opcoes_label/template_mst.html", function(template) {
  78 + i3GEOF.proplabel.MUSTACHE = template;
  79 + i3GEOF.proplabel.inicia(iddiv,conector);
  80 + });
  81 + return;
  82 + }
  83 + $i(iddiv).innerHTML = i3GEOF.proplabel.html(conector);
  84 + i3GEO.util.aplicaAquarela("i3GEOF.proplabel_corpo");
  85 + i3GEO.util.comboFontes("i3GEOproplabelListaFonte","i3GEOproplabelDivListaFonte","form-control");
86 86 },
87 87 /*
88 88 Function: html
... ... @@ -96,102 +96,135 @@ i3GEOF.proplabel = {
96 96 Retorno:
97 97  
98 98 String com o c&oacute;digo html
99   - */
  99 + */
100 100 html:function(conector){
101   - var ins = Mustache.render(i3GEOF.proplabel.MUSTACHE, i3GEOF.proplabel.mustacheHash());
102   - return ins;
  101 + var ins = Mustache.render(i3GEOF.proplabel.MUSTACHE, i3GEOF.proplabel.mustacheHash());
  102 + return ins;
103 103 },
104 104 /*
105 105 Function: iniciaJanelaFlutuante
106 106  
107 107 Cria a janela flutuante para controle da ferramenta.
108   - */
  108 + */
109 109 iniciaJanelaFlutuante: function(conector){
110   - var minimiza,cabecalho,janela,divid,titulo;
111   - if ($i("i3GEOF.proplabel")) {
112   - return;
113   - }
114   - //cria a janela flutuante
115   - cabecalho = function(){
116   - i3GEOF.proplabel.ativaFoco();
117   - };
118   - minimiza = function(){
119   - i3GEO.janela.minimiza("i3GEOF.proplabel",200);
120   - };
121   - titulo = "<span class='i3GeoTituloJanelaBsNolink' >" + $trad('propriedadesTexto',i3GEOF.proplabel.dicionario) + "</span></div>";
122   - janela = i3GEO.janela.cria(
123   - "360px",
124   - "230px",
125   - "",
126   - "",
127   - "",
128   - titulo,
129   - "i3GEOF.proplabel",
130   - false,
131   - "hd",
132   - cabecalho,
133   - minimiza,
134   - "",
135   - false,
136   - "",
137   - "",
138   - "",
139   - "",
140   - ""
141   - );
142   - divid = janela[2].id;
143   - i3GEOF.proplabel.aguarde = $i("i3GEOF.proplabel_imagemCabecalho").style;
144   - $i("i3GEOF.proplabel_corpo").style.backgroundColor = "white";
145   - i3GEOF.proplabel.inicia(divid,conector);
  110 + var minimiza,cabecalho,janela,divid,titulo;
  111 + if ($i("i3GEOF.proplabel")) {
  112 + return;
  113 + }
  114 + //cria a janela flutuante
  115 + cabecalho = function(){
  116 + i3GEOF.proplabel.ativaFoco();
  117 + };
  118 + minimiza = function(){
  119 + i3GEO.janela.minimiza("i3GEOF.proplabel",200);
  120 + };
  121 + titulo = "<span class='i3GeoTituloJanelaBsNolink' >" + $trad('propriedadesTexto',i3GEOF.proplabel.dicionario) + "</span></div>";
  122 + janela = i3GEO.janela.cria(
  123 + "360px",
  124 + "230px",
  125 + "",
  126 + "",
  127 + "",
  128 + titulo,
  129 + "i3GEOF.proplabel",
  130 + false,
  131 + "hd",
  132 + cabecalho,
  133 + minimiza,
  134 + "",
  135 + false,
  136 + "",
  137 + "",
  138 + "",
  139 + "",
  140 + ""
  141 + );
  142 + divid = janela[2].id;
  143 + i3GEOF.proplabel.aguarde = $i("i3GEOF.proplabel_imagemCabecalho").style;
  144 + $i("i3GEOF.proplabel_corpo").style.backgroundColor = "white";
  145 + i3GEOF.proplabel.inicia(divid,conector);
146 146 },
147 147 /*
148 148 Function: ativaFoco
149 149  
150 150 Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
151   - */
  151 + */
152 152 ativaFoco: function(){
153 153 },
154 154 /*
155 155 Function: corj
156 156  
157 157 Abre a janela para o usu&aacute;rio selecionar uma cor interativamente
158   - */
  158 + */
159 159 corj: function(obj)
160 160 {i3GEO.util.abreCor("",obj);},
161 161 /*
162 162 Function: pegaPar
163 163  
164 164 Pega os parametros para montar a chamada ajax que cria ou testa a topon&iacute;mia
165   - */
  165 + */
166 166 pegaPar: function(){
167   - if($i("i3GEOproplabelfundoc_i").value === "")
168   - {$i("i3GEOproplabelfundoc_i").value = "off";}
169   - if($i("i3GEOproplabelsombra_i").value === "")
170   - {$i("i3GEOproplabelsombra_i").value = "off";}
171   - if($i("i3GEOproplabelmascara_i").value === "")
172   - {$i("i3GEOproplabelmascara_i").value = "off";}
173   - if($i("i3GEOproplabelfrentes_i").value === "")
174   - {$i("i3GEOproplabelfrentes_i").value = "off";}
175   - var par = "&position="+$i("i3GEOproplabelposition_i").value +
176   - "&partials="+$i("i3GEOproplabelpartials_i").value+
177   - "&offsetx="+$i("i3GEOproplabeloffsetx_i").value+
178   - "&offsety="+$i("i3GEOproplabeloffsety_i").value+
179   - "&minfeaturesize="+$i("i3GEOproplabelminfeaturesize_i").value+
180   - "&mindistance="+$i("i3GEOproplabelmindistance_i").value+
181   - "&force="+$i("i3GEOproplabelforce_i").value+
182   - "&shadowsizex="+$i("i3GEOproplabelfrentex_i").value+
183   - "&shadowsizey="+$i("i3GEOproplabelfrentey_i").value+
184   - "&cor="+$i("i3GEOproplabelfrente_i").value+
185   - "&sombray="+$i("i3GEOproplabelsombray_i").value+
186   - "&sombrax="+$i("i3GEOproplabelsombrax_i").value+
187   - "&angulo="+$i("i3GEOproplabelangulo_i").value+
188   - "&tamanho="+$i("i3GEOproplabeltamanho_i").value+
189   - "&fonte="+$i("i3GEOproplabelListaFonte").value+
190   - "&fundo="+$i("i3GEOproplabelfundoc_i").value+
191   - "&sombra="+$i("i3GEOproplabelsombra_i").value+
192   - "&outlinecolor="+$i("i3GEOproplabelmascara_i").value+
193   - "&shadowcolor="+$i("i3GEOproplabelfrentes_i").value+
194   - "&wrap="+$i("i3GEOproplabelwrap_i").value;
195   - return par;
  167 + if($i("i3GEOproplabelfundoc_i").value === "")
  168 + {$i("i3GEOproplabelfundoc_i").value = "off";}
  169 + if($i("i3GEOproplabelsombra_i").value === "")
  170 + {$i("i3GEOproplabelsombra_i").value = "off";}
  171 + if($i("i3GEOproplabelmascara_i").value === "")
  172 + {$i("i3GEOproplabelmascara_i").value = "off";}
  173 + if($i("i3GEOproplabelfrentes_i").value === "")
  174 + {$i("i3GEOproplabelfrentes_i").value = "off";}
  175 + var par = "&position="+$i("i3GEOproplabelposition_i").value +
  176 + "&partials="+$i("i3GEOproplabelpartials_i").value+
  177 + "&offsetx="+$i("i3GEOproplabeloffsetx_i").value+
  178 + "&offsety="+$i("i3GEOproplabeloffsety_i").value+
  179 + "&minfeaturesize="+$i("i3GEOproplabelminfeaturesize_i").value+
  180 + "&mindistance="+$i("i3GEOproplabelmindistance_i").value+
  181 + "&force="+$i("i3GEOproplabelforce_i").value+
  182 + "&shadowsizex="+$i("i3GEOproplabelfrentex_i").value+
  183 + "&shadowsizey="+$i("i3GEOproplabelfrentey_i").value+
  184 + "&cor="+$i("i3GEOproplabelfrente_i").value+
  185 + "&sombray="+$i("i3GEOproplabelsombray_i").value+
  186 + "&sombrax="+$i("i3GEOproplabelsombrax_i").value+
  187 + "&angulo="+$i("i3GEOproplabelangulo_i").value+
  188 + "&tamanho="+$i("i3GEOproplabeltamanho_i").value+
  189 + "&fonte="+$i("i3GEOproplabelListaFonte").value+
  190 + "&fundo="+$i("i3GEOproplabelfundoc_i").value+
  191 + "&sombra="+$i("i3GEOproplabelsombra_i").value+
  192 + "&outlinecolor="+$i("i3GEOproplabelmascara_i").value+
  193 + "&shadowcolor="+$i("i3GEOproplabelfrentes_i").value+
  194 + "&wrap="+$i("i3GEOproplabelwrap_i").value;
  195 + return par;
  196 + },
  197 + getParameters: function(){
  198 + var par = {
  199 + position: $i("i3GEOproplabelposition_i").value,
  200 + partials: $i("i3GEOproplabelpartials_i").value,
  201 + offsetx: $i("i3GEOproplabeloffsetx_i").value,
  202 + offsety: $i("i3GEOproplabeloffsety_i").value,
  203 + minfeaturesize: $i("i3GEOproplabelminfeaturesize_i").value,
  204 + mindistance: $i("i3GEOproplabelmindistance_i").value,
  205 + force: $i("i3GEOproplabelforce_i").value,
  206 + shadowsizex: $i("i3GEOproplabelfrentex_i").value,
  207 + shadowsizey: $i("i3GEOproplabelfrentey_i").value,
  208 + cor: $i("i3GEOproplabelfrente_i").value,
  209 + sombray: $i("i3GEOproplabelsombray_i").value,
  210 + sombrax: $i("i3GEOproplabelsombrax_i").value,
  211 + angulo: $i("i3GEOproplabelangulo_i").value,
  212 + tamanho: $i("i3GEOproplabeltamanho_i").value,
  213 + fonte: $i("i3GEOproplabelListaFonte").value,
  214 + fundo: $i("i3GEOproplabelfundoc_i").value,
  215 + sombra: $i("i3GEOproplabelsombra_i").value,
  216 + outlinecolor: $i("i3GEOproplabelmascara_i").value,
  217 + shadowcolor: $i("i3GEOproplabelfrentes_i").value,
  218 + wrap: $i("i3GEOproplabelwrap_i").value
  219 + };
  220 + if(par.i3GEOproplabelfundoc_i === "")
  221 + {par.i3GEOproplabelfundoc_i = "off";}
  222 + if(par.i3GEOproplabelsombra_i === "")
  223 + {par.i3GEOproplabelsombra_i = "off";}
  224 + if(par.i3GEOproplabelmascara_i === "")
  225 + {par.i3GEOproplabelmascara_i = "off";}
  226 + if(par.i3GEOproplabelfrentes_i === "")
  227 + {par.i3GEOproplabelfrentes_i = "off";}
  228 + return par;
196 229 }
197 230 };
198 231 \ No newline at end of file
... ...
ferramentas/safe2.php
1 1 <?php
2 2 include_once (dirname(__FILE__) . "/../classesphp/sani_request.php");
  3 +
3 4 error_reporting(0);
4 5 $_GET = array_merge($_GET, $_POST);
  6 +ini_set("session.use_cookies", 0);
5 7 session_name("i3GeoPHP");
6   -session_id($_GET["g_sid"]);
7   -session_start();
  8 +if (@$_GET["g_sid"]) {
  9 + session_id($_GET["g_sid"]);
  10 +} elseif (@$_COOKIE["i3GeoPHP"]) {
  11 + session_id($_COOKIE["i3GeoPHP"]);
  12 +}
  13 +session_start([
  14 + 'read_and_close' => true
  15 +]);
8 16 $f = explode(",", $_SESSION["fingerprint"]);
9 17 if ($f[0] != md5('I3GEOSEC' . $_SERVER['HTTP_USER_AGENT'] . $_GET["g_sid"])) {
10 18 header("Content-type: application/json");
... ...
interface/templates/camada.html
... ... @@ -31,7 +31,7 @@
31 31 <li><a href="javascript:void(0)" onclick="i3GEO.tema.dialogo.tabela('{{{name}}}')" title="{{{tabelaTitle}}}" class='{{isnotvetor}} '>
32 32 <span class="glyphicon glyphicon-list-alt"></span> {{{tabelaTexto}}}
33 33 </a></li>
34   - <li><a href="javascript:void(0)" onclick="i3GEO.tema.dialogo.editaLegenda('{{{name}}}')" class='{{isnotvetor}} '>
  34 + <li><a href="javascript:void(0)" onclick="i3GEO.tema.dialogo.editaLegenda('{{{name}}}')" >
35 35 <span class="glyphicon glyphicon-th-list"></span> {{{editorlegendaTexto}}}
36 36 </a></li>
37 37 <li><a class="{{{zoomtema}}} " href="javascript:void(0)" onclick="i3GEO.tema.zoom('{{{name}}}')" title="{{{zoomtemaTitle}}}" >
... ...