Commit 03629e2ecea4cd2cca9d9e1609c3e78b4e75170f
1 parent
d3b2d977
Exists in
master
and in
7 other branches
Correção nas funções de selecionar e limpar seleção na ferramenta tabela
Showing
7 changed files
with
87 additions
and
171 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesphp/classe_selecao.php
@@ -40,50 +40,50 @@ class Selecao | @@ -40,50 +40,50 @@ class Selecao | ||
40 | { | 40 | { |
41 | /* | 41 | /* |
42 | Variavel: $mapa | 42 | Variavel: $mapa |
43 | - | 43 | + |
44 | Objeto mapa | 44 | Objeto mapa |
45 | */ | 45 | */ |
46 | public $mapa; | 46 | public $mapa; |
47 | /* | 47 | /* |
48 | Variavel: $arquivo | 48 | Variavel: $arquivo |
49 | - | 49 | + |
50 | Arquivo map file | 50 | Arquivo map file |
51 | */ | 51 | */ |
52 | protected $arquivo; | 52 | protected $arquivo; |
53 | /* | 53 | /* |
54 | Variavel: $layer | 54 | Variavel: $layer |
55 | - | 55 | + |
56 | Objeto layer | 56 | Objeto layer |
57 | */ | 57 | */ |
58 | protected $layer; | 58 | protected $layer; |
59 | /* | 59 | /* |
60 | Variavel: $nome | 60 | Variavel: $nome |
61 | - | 61 | + |
62 | Nome do layer | 62 | Nome do layer |
63 | */ | 63 | */ |
64 | protected $nome; | 64 | protected $nome; |
65 | /* | 65 | /* |
66 | Variavel: $qyfile | 66 | Variavel: $qyfile |
67 | - | 67 | + |
68 | Nome do arquivo de seleção (.qy) | 68 | Nome do arquivo de seleção (.qy) |
69 | */ | 69 | */ |
70 | public $qyfile; | 70 | public $qyfile; |
71 | /* | 71 | /* |
72 | Variavel: $projO | 72 | Variavel: $projO |
73 | - | 73 | + |
74 | Objeto projection original do mapa. Obtido apenas na interface Googlemaps | 74 | Objeto projection original do mapa. Obtido apenas na interface Googlemaps |
75 | */ | 75 | */ |
76 | public $projO; | 76 | public $projO; |
77 | /* | 77 | /* |
78 | Variavel: $v | 78 | Variavel: $v |
79 | - | 79 | + |
80 | Versão atual do Mapserver (primeiro dígito) | 80 | Versão atual do Mapserver (primeiro dígito) |
81 | */ | 81 | */ |
82 | public $v; | 82 | public $v; |
83 | /* | 83 | /* |
84 | Function: __construct | 84 | Function: __construct |
85 | 85 | ||
86 | -Cria um objeto Selecao | 86 | +Cria um objeto Selecao |
87 | 87 | ||
88 | O tipo de interface usada pelo mapa é obtido do metadata "interface". Se for a interface Googlemaps, é feita a alteração temporária da projeção do mapa. | 88 | O tipo de interface usada pelo mapa é obtido do metadata "interface". Se for a interface Googlemaps, é feita a alteração temporária da projeção do mapa. |
89 | 89 | ||
@@ -98,10 +98,7 @@ $ext - extensão geográfica do mapa | @@ -98,10 +98,7 @@ $ext - extensão geográfica do mapa | ||
98 | 98 | ||
99 | function __construct($map_file,$tema="",$ext="") | 99 | function __construct($map_file,$tema="",$ext="") |
100 | { | 100 | { |
101 | - if(file_exists($locaplic."/funcoes_gerais.php")) | ||
102 | - include_once($locaplic."/funcoes_gerais.php"); | ||
103 | - else | ||
104 | - include_once("funcoes_gerais.php"); | 101 | + include_once(__DIR__."/funcoes_gerais.php"); |
105 | $this->v = versao(); | 102 | $this->v = versao(); |
106 | $this->v = $this->v["principal"]; | 103 | $this->v = $this->v["principal"]; |
107 | $this->qyfile = str_replace(".map",".qy",$map_file); | 104 | $this->qyfile = str_replace(".map",".qy",$map_file); |
@@ -128,25 +125,25 @@ $ext - extensão geográfica do mapa | @@ -128,25 +125,25 @@ $ext - extensão geográfica do mapa | ||
128 | if($this->mapa->getmetadata("interface") == "googlemaps"){ | 125 | if($this->mapa->getmetadata("interface") == "googlemaps"){ |
129 | $this->projO = $this->mapa->getProjection(); | 126 | $this->projO = $this->mapa->getProjection(); |
130 | $this->mapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); | 127 | $this->mapa->setProjection("init=epsg:4618,a=6378137,b=6378137"); |
131 | - } | 128 | + } |
132 | } | 129 | } |
133 | /* | 130 | /* |
134 | function: salva | 131 | function: salva |
135 | 132 | ||
136 | -Salva o mapfile atual | ||
137 | -*/ | 133 | +Salva o mapfile atual |
134 | +*/ | ||
138 | function salva() | 135 | function salva() |
139 | { | 136 | { |
140 | if (connection_aborted()){exit();} | 137 | if (connection_aborted()){exit();} |
141 | if($this->mapa->getmetadata("interface") == "googlemaps") | 138 | if($this->mapa->getmetadata("interface") == "googlemaps") |
142 | - {$this->mapa->setProjection($this->projO);} | 139 | + {$this->mapa->setProjection($this->projO);} |
143 | $this->mapa->save($this->arquivo); | 140 | $this->mapa->save($this->arquivo); |
144 | } | 141 | } |
145 | /* | 142 | /* |
146 | function: nSel | 143 | function: nSel |
147 | 144 | ||
148 | -Retorna o número de elementos selecionados | ||
149 | -*/ | 145 | +Retorna o número de elementos selecionados |
146 | +*/ | ||
150 | function nSel(){ | 147 | function nSel(){ |
151 | return $this->layer->getNumresults(); | 148 | return $this->layer->getNumresults(); |
152 | } | 149 | } |
@@ -171,7 +168,7 @@ $ys - lista de coordenadas y separadas por virgula | @@ -171,7 +168,7 @@ $ys - lista de coordenadas y separadas por virgula | ||
171 | { | 168 | { |
172 | $this->selecaoLimpa(); | 169 | $this->selecaoLimpa(); |
173 | $tipo = "adiciona"; | 170 | $tipo = "adiciona"; |
174 | - } | 171 | + } |
175 | if ($tipo == "limpa") | 172 | if ($tipo == "limpa") |
176 | {return($this->selecaoLimpa());} | 173 | {return($this->selecaoLimpa());} |
177 | if ($tipo == "inverte") | 174 | if ($tipo == "inverte") |
@@ -193,7 +190,7 @@ $ys - lista de coordenadas y separadas por virgula | @@ -193,7 +190,7 @@ $ys - lista de coordenadas y separadas por virgula | ||
193 | $shp_atual = array(); | 190 | $shp_atual = array(); |
194 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) | 191 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) |
195 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} | 192 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} |
196 | - | 193 | + |
197 | $shpi = array(); | 194 | $shpi = array(); |
198 | //transforma os pontos em shape | 195 | //transforma os pontos em shape |
199 | $s = ms_newShapeObj(MS_SHAPE_POLYGON); | 196 | $s = ms_newShapeObj(MS_SHAPE_POLYGON); |
@@ -272,7 +269,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | @@ -272,7 +269,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | ||
272 | $shp_atual = array(); | 269 | $shp_atual = array(); |
273 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) | 270 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) |
274 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} | 271 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} |
275 | - | 272 | + |
276 | $shpi = array(); | 273 | $shpi = array(); |
277 | $i = $layero->index; | 274 | $i = $layero->index; |
278 | $selecao = ""; | 275 | $selecao = ""; |
@@ -288,7 +285,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | @@ -288,7 +285,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | ||
288 | else{ | 285 | else{ |
289 | $result = $layero->getResult($i); | 286 | $result = $layero->getResult($i); |
290 | $s = $result->shapeindex; | 287 | $s = $result->shapeindex; |
291 | - $sh = $layero->getfeature($s,-1); | 288 | + $sh = $layero->getfeature($s,-1); |
292 | } | 289 | } |
293 | $tiposh = $sh->type; | 290 | $tiposh = $sh->type; |
294 | if ($tiposh == 2) | 291 | if ($tiposh == 2) |
@@ -445,7 +442,7 @@ $valor - Valor. | @@ -445,7 +442,7 @@ $valor - Valor. | ||
445 | $shp_atual = array(); | 442 | $shp_atual = array(); |
446 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) | 443 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) |
447 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} | 444 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} |
448 | - | 445 | + |
449 | $shpi = array(); | 446 | $shpi = array(); |
450 | if($this->layer->connectiontype == MS_POSTGIS) | 447 | if($this->layer->connectiontype == MS_POSTGIS) |
451 | { | 448 | { |
@@ -455,7 +452,7 @@ $valor - Valor. | @@ -455,7 +452,7 @@ $valor - Valor. | ||
455 | {$this->layer->querybyattributes($item,$operador,1);} | 452 | {$this->layer->querybyattributes($item,$operador,1);} |
456 | } | 453 | } |
457 | else | 454 | else |
458 | - { | 455 | + { |
459 | if($valor != "") | 456 | if($valor != "") |
460 | { | 457 | { |
461 | if(!is_numeric($valor)) | 458 | if(!is_numeric($valor)) |
@@ -466,7 +463,7 @@ $valor - Valor. | @@ -466,7 +463,7 @@ $valor - Valor. | ||
466 | else | 463 | else |
467 | { | 464 | { |
468 | $this->layer->querybyattributes($item,$operador,1); | 465 | $this->layer->querybyattributes($item,$operador,1); |
469 | - } | 466 | + } |
470 | } | 467 | } |
471 | $res_count = $this->layer->getNumresults(); | 468 | $res_count = $this->layer->getNumresults(); |
472 | $shpi = array(); | 469 | $shpi = array(); |
@@ -483,15 +480,15 @@ $valor - Valor. | @@ -483,15 +480,15 @@ $valor - Valor. | ||
483 | } | 480 | } |
484 | /* | 481 | /* |
485 | function: selecaoAtributos2 | 482 | function: selecaoAtributos2 |
486 | - | 483 | + |
487 | Seleção por atributo. Permite composição de atributos. | 484 | Seleção por atributo. Permite composição de atributos. |
488 | - | 485 | + |
489 | parameters: | 486 | parameters: |
490 | - | 487 | + |
491 | $filtro - Expressão de seleção | 488 | $filtro - Expressão de seleção |
492 | - | 489 | + |
493 | $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | 490 | $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo |
494 | - */ | 491 | + */ |
495 | function selecaoAtributos2($filtro,$tipo) | 492 | function selecaoAtributos2($filtro,$tipo) |
496 | { | 493 | { |
497 | $items = pegaItens($this->layer); | 494 | $items = pegaItens($this->layer); |
@@ -499,7 +496,7 @@ $valor - Valor. | @@ -499,7 +496,7 @@ $valor - Valor. | ||
499 | { | 496 | { |
500 | $this->selecaoLimpa(); | 497 | $this->selecaoLimpa(); |
501 | $tipo = "adiciona"; | 498 | $tipo = "adiciona"; |
502 | - } | 499 | + } |
503 | if ($tipo == "limpa") | 500 | if ($tipo == "limpa") |
504 | {return($this->selecaoLimpa());} | 501 | {return($this->selecaoLimpa());} |
505 | if ($tipo == "inverte") | 502 | if ($tipo == "inverte") |
@@ -519,13 +516,13 @@ $valor - Valor. | @@ -519,13 +516,13 @@ $valor - Valor. | ||
519 | } | 516 | } |
520 | $this->mapa->freequery($indxlayer); | 517 | $this->mapa->freequery($indxlayer); |
521 | */ | 518 | */ |
522 | - | 519 | + |
523 | $shp_atual = array(); | 520 | $shp_atual = array(); |
524 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) | 521 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) |
525 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} | 522 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} |
526 | - | 523 | + |
527 | $shpi = array(); | 524 | $shpi = array(); |
528 | - | 525 | + |
529 | $filtro = str_replace("|","'",$filtro); | 526 | $filtro = str_replace("|","'",$filtro); |
530 | if ($this->layer->connectiontype == MS_POSTGIS) | 527 | if ($this->layer->connectiontype == MS_POSTGIS) |
531 | { | 528 | { |
@@ -567,7 +564,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | @@ -567,7 +564,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | ||
567 | { | 564 | { |
568 | $this->selecaoLimpa(); | 565 | $this->selecaoLimpa(); |
569 | $tipo = "adiciona"; | 566 | $tipo = "adiciona"; |
570 | - } | 567 | + } |
571 | if ($tipo == "limpa") | 568 | if ($tipo == "limpa") |
572 | {return ($this->selecaoLimpa());} | 569 | {return ($this->selecaoLimpa());} |
573 | if ($tipo == "inverte") | 570 | if ($tipo == "inverte") |
@@ -675,7 +672,7 @@ Inverte seleção do tema. | @@ -675,7 +672,7 @@ Inverte seleção do tema. | ||
675 | if (file_exists($this->qyfile)) | 672 | if (file_exists($this->qyfile)) |
676 | {$this->mapa->loadquery($this->qyfile);} | 673 | {$this->mapa->loadquery($this->qyfile);} |
677 | $indxlayer = $this->layer->index; | 674 | $indxlayer = $this->layer->index; |
678 | - | 675 | + |
679 | /* | 676 | /* |
680 | $res_count = $this->layer->getNumresults(); | 677 | $res_count = $this->layer->getNumresults(); |
681 | $shp_atual = array(); | 678 | $shp_atual = array(); |
@@ -689,7 +686,7 @@ Inverte seleção do tema. | @@ -689,7 +686,7 @@ Inverte seleção do tema. | ||
689 | $shp_atual = array(); | 686 | $shp_atual = array(); |
690 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) | 687 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) |
691 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} | 688 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} |
692 | - | 689 | + |
693 | $this->layer->queryByrect($this->mapa->extent); | 690 | $this->layer->queryByrect($this->mapa->extent); |
694 | $res_count = $this->layer->getNumresults(); | 691 | $res_count = $this->layer->getNumresults(); |
695 | $shp_todos = array(); | 692 | $shp_todos = array(); |
@@ -826,7 +823,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | @@ -826,7 +823,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | ||
826 | { | 823 | { |
827 | $this->selecaoLimpa(); | 824 | $this->selecaoLimpa(); |
828 | $tipo = "adiciona"; | 825 | $tipo = "adiciona"; |
829 | - } | 826 | + } |
830 | if(!$this->layer){return "erro";} | 827 | if(!$this->layer){return "erro";} |
831 | $this->layer->set("tolerance",0); | 828 | $this->layer->set("tolerance",0); |
832 | if ($tipo == "limpa") | 829 | if ($tipo == "limpa") |
@@ -849,7 +846,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | @@ -849,7 +846,7 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa|novo | ||
849 | $shp_atual = array(); | 846 | $shp_atual = array(); |
850 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) | 847 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) |
851 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} | 848 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} |
852 | - | 849 | + |
853 | $shpi = array(); | 850 | $shpi = array(); |
854 | $rect = $this->mapa->extent; | 851 | $rect = $this->mapa->extent; |
855 | $ident = @$this->layer->queryByRect($rect); | 852 | $ident = @$this->layer->queryByRect($rect); |
@@ -908,7 +905,7 @@ $ext - coordenadas separadas por espaços no estilo xmin ymin xmax ymax | @@ -908,7 +905,7 @@ $ext - coordenadas separadas por espaços no estilo xmin ymin xmax ymax | ||
908 | $shp_atual = array(); | 905 | $shp_atual = array(); |
909 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) | 906 | if($this->qyfileTema != "" && file_exists($this->qyfileTema)) |
910 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} | 907 | {$shp_atual = $this->unserializeQ($this->qyfileTema);} |
911 | - | 908 | + |
912 | $shpi = array(); | 909 | $shpi = array(); |
913 | $temp = explode(" ",$ext); | 910 | $temp = explode(" ",$ext); |
914 | $rect = ms_newRectObj(); | 911 | $rect = ms_newRectObj(); |
@@ -939,7 +936,7 @@ Deserializa um arquivo. | @@ -939,7 +936,7 @@ Deserializa um arquivo. | ||
939 | 936 | ||
940 | Parametros: | 937 | Parametros: |
941 | $arquivo - arquivo que será processado | 938 | $arquivo - arquivo que será processado |
942 | -*/ | 939 | +*/ |
943 | function unserializeQ($arq) | 940 | function unserializeQ($arq) |
944 | { | 941 | { |
945 | $handle = fopen ($arq, "r"); | 942 | $handle = fopen ($arq, "r"); |
@@ -956,7 +953,7 @@ Parametros: | @@ -956,7 +953,7 @@ Parametros: | ||
956 | $arquivo - arquivo que será processado | 953 | $arquivo - arquivo que será processado |
957 | 954 | ||
958 | $geos - array com os dados | 955 | $geos - array com os dados |
959 | -*/ | 956 | +*/ |
960 | function serializeQ($arq,$geos) | 957 | function serializeQ($arq,$geos) |
961 | { | 958 | { |
962 | if (file_exists($arq)) | 959 | if (file_exists($arq)) |
@@ -965,6 +962,6 @@ $geos - array com os dados | @@ -965,6 +962,6 @@ $geos - array com os dados | ||
965 | $r = serialize($geos); | 962 | $r = serialize($geos); |
966 | fwrite($fp,$r); | 963 | fwrite($fp,$r); |
967 | fclose($fp); | 964 | fclose($fp); |
968 | - } | 965 | + } |
969 | } | 966 | } |
970 | ?> | 967 | ?> |
971 | \ No newline at end of file | 968 | \ No newline at end of file |
ferramentas/inicia.php
@@ -53,4 +53,45 @@ if(!substituiCon($map_file,$postgis_mapa)){ | @@ -53,4 +53,45 @@ if(!substituiCon($map_file,$postgis_mapa)){ | ||
53 | cpjson("erro",$cp); | 53 | cpjson("erro",$cp); |
54 | return; | 54 | return; |
55 | } | 55 | } |
56 | +function redesenhaMapa() | ||
57 | +{ | ||
58 | + global $map_file,$tipoimagem,$cp,$postgis_mapa,$utilizacgi,$locmapserv,$interface,$mapexten; | ||
59 | + if($tipoimagem != "nenhum" && $tipoimagem != "") | ||
60 | + {$utilizacgi = "nao";} | ||
61 | + if (connection_aborted()){exit();} | ||
62 | + if($interface == "googleearth" && $mapexten != ""){ | ||
63 | + include_once(__DIR__."/../classesphp/classe_navegacao.php"); | ||
64 | + $m = new Navegacao($map_file); | ||
65 | + $m->mudaExtensao($mapexten); | ||
66 | + $m->salva(); | ||
67 | + } | ||
68 | + include_once(__DIR__."/../classesphp/classe_mapa.php"); | ||
69 | + $m = New Mapa($map_file); | ||
70 | + $par = $m->parametrosTemas(); | ||
71 | + // | ||
72 | + //na interface googlemaps não é necessário gerar a imagem | ||
73 | + // | ||
74 | + $e = $m->mapa->extent; | ||
75 | + $ext = $e->minx." ".$e->miny." ".$e->maxx." ".$e->maxy; | ||
76 | + $res["mapimagem"] = ""; | ||
77 | + $res["mapexten"] = $ext; | ||
78 | + $res["mapres"] = ""; | ||
79 | + $res["erro"] = ""; | ||
80 | + $res["mapscale"] = ""; | ||
81 | + $res["pixelsize"] = ""; | ||
82 | + $res["mapimagem"] = ""; | ||
83 | + $res["w"] = $m->mapa->width; | ||
84 | + $res["h"] = $m->mapa->height; | ||
85 | + $res["mappath"] = ""; | ||
86 | + $res["mapurl"] = ""; | ||
87 | + $res["mensagens"] = $m->pegaMensagens(); | ||
88 | + $res["tempo"] = microtime(1) - $tempo; | ||
89 | + restauraCon($map_file,$postgis_mapa); | ||
90 | + ob_clean(); | ||
91 | + if ($par == "") | ||
92 | + {$retorno = "erro";} | ||
93 | + else | ||
94 | + {$retorno = array("variaveis"=>$res,"temas"=>$par);} | ||
95 | + cpjson($retorno); | ||
96 | +} | ||
56 | ?> | 97 | ?> |
57 | \ No newline at end of file | 98 | \ No newline at end of file |
ferramentas/inserexy2/exec.php
@@ -30,45 +30,5 @@ if (!connection_aborted()){ | @@ -30,45 +30,5 @@ if (!connection_aborted()){ | ||
30 | } | 30 | } |
31 | else | 31 | else |
32 | {exit();} | 32 | {exit();} |
33 | -function redesenhaMapa() | ||
34 | -{ | ||
35 | - global $tempo,$map_file,$tipoimagem,$cp,$postgis_mapa,$utilizacgi,$locmapserv,$interface,$mapexten; | ||
36 | - if($tipoimagem != "nenhum" && $tipoimagem != "") | ||
37 | - {$utilizacgi = "nao";} | ||
38 | - if (connection_aborted()){exit();} | ||
39 | - if($interface == "googleearth" && $mapexten != ""){ | ||
40 | - include_once(__DIR__."/../../classesphp/classe_navegacao.php"); | ||
41 | - $m = new Navegacao($map_file); | ||
42 | - $m->mudaExtensao($mapexten); | ||
43 | - $m->salva(); | ||
44 | - } | ||
45 | - include_once(__DIR__."/../../classesphp/classe_mapa.php"); | ||
46 | - $m = New Mapa($map_file); | ||
47 | - $par = $m->parametrosTemas(); | ||
48 | - // | ||
49 | - //na interface googlemaps não é necessário gerar a imagem | ||
50 | - // | ||
51 | - $e = $m->mapa->extent; | ||
52 | - $ext = $e->minx." ".$e->miny." ".$e->maxx." ".$e->maxy; | ||
53 | - $res["mapimagem"] = ""; | ||
54 | - $res["mapexten"] = $ext; | ||
55 | - $res["mapres"] = ""; | ||
56 | - $res["erro"] = ""; | ||
57 | - $res["mapscale"] = ""; | ||
58 | - $res["pixelsize"] = ""; | ||
59 | - $res["mapimagem"] = ""; | ||
60 | - $res["w"] = $m->mapa->width; | ||
61 | - $res["h"] = $m->mapa->height; | ||
62 | - $res["mappath"] = ""; | ||
63 | - $res["mapurl"] = ""; | ||
64 | - $res["mensagens"] = $m->pegaMensagens(); | ||
65 | - $res["tempo"] = microtime(1) - $tempo; | ||
66 | - restauraCon($map_file,$postgis_mapa); | ||
67 | - ob_clean(); | ||
68 | - if ($par == "") | ||
69 | - {$retorno = "erro";} | ||
70 | - else | ||
71 | - {$retorno = array("variaveis"=>$res,"temas"=>$par);} | ||
72 | - cpjson($retorno); | ||
73 | -} | 33 | + |
74 | ?> | 34 | ?> |
75 | \ No newline at end of file | 35 | \ No newline at end of file |
ferramentas/opcoes_fundo/exec.php
@@ -60,45 +60,5 @@ if (!connection_aborted()){ | @@ -60,45 +60,5 @@ if (!connection_aborted()){ | ||
60 | } | 60 | } |
61 | else | 61 | else |
62 | {exit();} | 62 | {exit();} |
63 | -function redesenhaMapa() | ||
64 | -{ | ||
65 | - global $tempo,$map_file,$tipoimagem,$cp,$postgis_mapa,$utilizacgi,$locmapserv,$interface,$mapexten; | ||
66 | - if($tipoimagem != "nenhum" && $tipoimagem != "") | ||
67 | - {$utilizacgi = "nao";} | ||
68 | - if (connection_aborted()){exit();} | ||
69 | - if($interface == "googleearth" && $mapexten != ""){ | ||
70 | - include_once(__DIR__."/../../classesphp/classe_navegacao.php"); | ||
71 | - $m = new Navegacao($map_file); | ||
72 | - $m->mudaExtensao($mapexten); | ||
73 | - $m->salva(); | ||
74 | - } | ||
75 | - include_once(__DIR__."/../../classesphp/classe_mapa.php"); | ||
76 | - $m = New Mapa($map_file); | ||
77 | - $par = $m->parametrosTemas(); | ||
78 | - // | ||
79 | - //na interface googlemaps não é necessário gerar a imagem | ||
80 | - // | ||
81 | - $e = $m->mapa->extent; | ||
82 | - $ext = $e->minx." ".$e->miny." ".$e->maxx." ".$e->maxy; | ||
83 | - $res["mapimagem"] = ""; | ||
84 | - $res["mapexten"] = $ext; | ||
85 | - $res["mapres"] = ""; | ||
86 | - $res["erro"] = ""; | ||
87 | - $res["mapscale"] = ""; | ||
88 | - $res["pixelsize"] = ""; | ||
89 | - $res["mapimagem"] = ""; | ||
90 | - $res["w"] = $m->mapa->width; | ||
91 | - $res["h"] = $m->mapa->height; | ||
92 | - $res["mappath"] = ""; | ||
93 | - $res["mapurl"] = ""; | ||
94 | - $res["mensagens"] = $m->pegaMensagens(); | ||
95 | - $res["tempo"] = microtime(1) - $tempo; | ||
96 | - restauraCon($map_file,$postgis_mapa); | ||
97 | - ob_clean(); | ||
98 | - if ($par == "") | ||
99 | - {$retorno = "erro";} | ||
100 | - else | ||
101 | - {$retorno = array("variaveis"=>$res,"temas"=>$par);} | ||
102 | - cpjson($retorno); | ||
103 | -} | 63 | + |
104 | ?> | 64 | ?> |
105 | \ No newline at end of file | 65 | \ No newline at end of file |
ferramentas/selecao/exec.php
@@ -38,7 +38,6 @@ Limpa a seleção existente em um tema. | @@ -38,7 +38,6 @@ Limpa a seleção existente em um tema. | ||
38 | $_SESSION["contadorsalva"]++; | 38 | $_SESSION["contadorsalva"]++; |
39 | redesenhaMapa(); | 39 | redesenhaMapa(); |
40 | break; | 40 | break; |
41 | - | ||
42 | /* | 41 | /* |
43 | Valor: SELECAOTEMA | 42 | Valor: SELECAOTEMA |
44 | 43 | ||
@@ -195,45 +194,4 @@ function selecaoPoli($xs,$ys,$tema,$tipo) | @@ -195,45 +194,4 @@ function selecaoPoli($xs,$ys,$tema,$tipo) | ||
195 | } | 194 | } |
196 | return implode(",",$ok); | 195 | return implode(",",$ok); |
197 | } | 196 | } |
198 | -function redesenhaMapa() | ||
199 | -{ | ||
200 | - global $tempo,$map_file,$tipoimagem,$cp,$postgis_mapa,$utilizacgi,$locmapserv,$interface,$mapexten; | ||
201 | - if($tipoimagem != "nenhum" && $tipoimagem != "") | ||
202 | - {$utilizacgi = "nao";} | ||
203 | - if (connection_aborted()){exit();} | ||
204 | - if($interface == "googleearth" && $mapexten != ""){ | ||
205 | - include_once(__DIR__."/../../classesphp/classe_navegacao.php"); | ||
206 | - $m = new Navegacao($map_file); | ||
207 | - $m->mudaExtensao($mapexten); | ||
208 | - $m->salva(); | ||
209 | - } | ||
210 | - include_once(__DIR__."/../../classesphp/classe_mapa.php"); | ||
211 | - $m = New Mapa($map_file); | ||
212 | - $par = $m->parametrosTemas(); | ||
213 | - // | ||
214 | - //na interface googlemaps não é necessário gerar a imagem | ||
215 | - // | ||
216 | - $e = $m->mapa->extent; | ||
217 | - $ext = $e->minx." ".$e->miny." ".$e->maxx." ".$e->maxy; | ||
218 | - $res["mapimagem"] = ""; | ||
219 | - $res["mapexten"] = $ext; | ||
220 | - $res["mapres"] = ""; | ||
221 | - $res["erro"] = ""; | ||
222 | - $res["mapscale"] = ""; | ||
223 | - $res["pixelsize"] = ""; | ||
224 | - $res["mapimagem"] = ""; | ||
225 | - $res["w"] = $m->mapa->width; | ||
226 | - $res["h"] = $m->mapa->height; | ||
227 | - $res["mappath"] = ""; | ||
228 | - $res["mapurl"] = ""; | ||
229 | - $res["mensagens"] = $m->pegaMensagens(); | ||
230 | - $res["tempo"] = microtime(1) - $tempo; | ||
231 | - restauraCon($map_file,$postgis_mapa); | ||
232 | - ob_clean(); | ||
233 | - if ($par == "") | ||
234 | - {$retorno = "erro";} | ||
235 | - else | ||
236 | - {$retorno = array("variaveis"=>$res,"temas"=>$par);} | ||
237 | - cpjson($retorno); | ||
238 | -} | ||
239 | ?> | 197 | ?> |
240 | \ No newline at end of file | 198 | \ No newline at end of file |
ferramentas/tabela/index.js
@@ -894,10 +894,10 @@ i3GEOF.tabela = { | @@ -894,10 +894,10 @@ i3GEOF.tabela = { | ||
894 | p, | 894 | p, |
895 | cp, | 895 | cp, |
896 | temp = function(retorno){ | 896 | temp = function(retorno){ |
897 | - if(i3GEO.Interface.ATUAL === "padrao") | ||
898 | - {i3GEO.atualiza(retorno);} | ||
899 | - i3GEO.Interface.atualizaTema(retorno,i3GEOF.tabela.tema); | ||
900 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | 897 | + if(retorno){ |
898 | + i3GEO.Interface.atualizaTema(retorno,i3GEOF.tabela.tema); | ||
899 | + i3GEOF.tabela.aguarde.visibility = "hidden"; | ||
900 | + } | ||
901 | }; | 901 | }; |
902 | p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=incluisel&tema="+i3GEOF.tabela.tema+"&ids="+lista.toString(); | 902 | p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=incluisel&tema="+i3GEOF.tabela.tema+"&ids="+lista.toString(); |
903 | cp = new cpaint(); | 903 | cp = new cpaint(); |