Commit 86d7705fe53a198467cd4e71f8e428a644ba74b2
1 parent
22975886
Exists in
master
and in
7 other branches
Resolvido o problema do destaque dos elementos selecionados nas versões novas do Mapserver
Showing
7 changed files
with
76 additions
and
15 deletions
Show diff stats
classesphp/classe_mapa.php
... | ... | @@ -166,15 +166,19 @@ string - javascript com os parametros |
166 | 166 | function parametrosTemas() |
167 | 167 | { |
168 | 168 | $existesel = false; |
169 | - $qy = file_exists($this->qyfile); | |
169 | + $dir = dirname($this->arquivo); | |
170 | + //$qy = file_exists($this->qyfile); | |
170 | 171 | foreach($this->layers as $l) |
171 | 172 | {$l->set("template","none.htm");} |
172 | 173 | |
173 | - if ($qy) | |
174 | - {$this->mapa->loadquery($this->qyfile);} | |
174 | + //if ($qy) | |
175 | + //{$this->mapa->loadquery($this->qyfile);} | |
175 | 176 | foreach ($this->layers as $oLayer) |
176 | 177 | { |
177 | 178 | $sel = "nao"; |
179 | + if(file_exists($dir."/".$oLayer->name.".php")) | |
180 | + {$sel = "sim";$existesel = true;} | |
181 | + /* | |
178 | 182 | if ($qy) //verifica se existe alguma selecao no tema |
179 | 183 | { |
180 | 184 | $sopen = $oLayer->open(); |
... | ... | @@ -185,6 +189,7 @@ string - javascript com os parametros |
185 | 189 | if ($res_count > 0){$sel = "sim";$existesel = true;} |
186 | 190 | } |
187 | 191 | } |
192 | + */ | |
188 | 193 | $escondido = $oLayer->getmetadata("escondido"); |
189 | 194 | if($escondido == "") |
190 | 195 | {$escondido = "nao";} | ... | ... |
classesphp/classe_selecao.php
... | ... | @@ -586,16 +586,19 @@ Limpa a seleção do tema. |
586 | 586 | */ |
587 | 587 | function selecaoLimpa() |
588 | 588 | { |
589 | + //apaga o arquivo do i3geo com os ids selecionados | |
589 | 590 | if(file_exists($this->qyfileTema)) |
590 | 591 | {unlink($this->qyfileTema);} |
591 | 592 | if ($this->nome != "") //limpa de um tema |
592 | 593 | { |
593 | 594 | if(!$this->layer){return "erro";} |
594 | 595 | if (file_exists($this->qyfile)) |
595 | - {$this->mapa->loadquery($this->qyfile);} | |
596 | - $indxlayer = $this->layer->index; | |
597 | - $this->mapa->freequery($indxlayer); | |
598 | - $this->mapa->savequery($this->qyfile); | |
596 | + { | |
597 | + $this->mapa->loadquery($this->qyfile); | |
598 | + $indxlayer = $this->layer->index; | |
599 | + $this->mapa->freequery($indxlayer); | |
600 | + $this->mapa->savequery($this->qyfile); | |
601 | + } | |
599 | 602 | } |
600 | 603 | else //limpa de todos os temas |
601 | 604 | { |
... | ... | @@ -668,6 +671,7 @@ $shp_atual - Indices dos elementos já selecionados. |
668 | 671 | $this->mapa->freequery($indxlayer); |
669 | 672 | foreach ($shp as $indx) |
670 | 673 | {@$this->mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} |
674 | + //echo $this->layer->getNumresults(); | |
671 | 675 | $this->mapa->savequery($this->qyfile); |
672 | 676 | $this->serializeQ($this->qyfileTema,$shp); |
673 | 677 | return("ok"); |
... | ... | @@ -865,7 +869,7 @@ $ext - coordenadas separadas por espaços no estilo xmin ymin xmax ymax |
865 | 869 | /* |
866 | 870 | function unserializeQ |
867 | 871 | |
868 | -Deserializa um arquivo de geometrias. | |
872 | +Deserializa um arquivo. | |
869 | 873 | |
870 | 874 | Parametros: |
871 | 875 | $arquivo - arquivo que será processado |
... | ... | @@ -880,7 +884,7 @@ $arquivo - arquivo que será processado |
880 | 884 | /* |
881 | 885 | function serializeQ |
882 | 886 | |
883 | -Deserializa um arquivo de geometrias. | |
887 | +Serializa um arquivo. | |
884 | 888 | |
885 | 889 | Parametros: |
886 | 890 | $arquivo - arquivo que será processado | ... | ... |
classesphp/mapa_googleearth.php
... | ... | @@ -93,11 +93,28 @@ function retornaWms(){ |
93 | 93 | } |
94 | 94 | $mapa = ms_newMapObj($_GET["map"]); |
95 | 95 | $mapa->setProjection("init=epsg:4326"); |
96 | + /* | |
96 | 97 | $qyfile = str_replace(".map",".qy",$_GET["map"]); |
97 | 98 | $qy = file_exists($qyfile); |
98 | 99 | if($qy) |
99 | 100 | {$mapa->loadquery($qyfile);} |
100 | - | |
101 | + */ | |
102 | + // | |
103 | + //resolve o problema da seleção na versão nova do mapserver | |
104 | + // | |
105 | + $qyfile = dirname($_GET["map"])."/".$_GET["layer"].".php"; | |
106 | + $qy = file_exists($qyfile); | |
107 | + if($qy) | |
108 | + { | |
109 | + $l = $mapa->getLayerByname($_GET["layer"]); | |
110 | + $indxlayer = $l->index; | |
111 | + $handle = fopen ($qyfile, "r"); | |
112 | + $conteudo = fread ($handle, filesize ($qyfile)); | |
113 | + fclose ($handle); | |
114 | + $shp = unserialize($conteudo); | |
115 | + foreach ($shp as $indx) | |
116 | + {$mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} | |
117 | + } | |
101 | 118 | $layersNames = $mapa->getalllayernames(); |
102 | 119 | foreach ($layersNames as $layerName) |
103 | 120 | { | ... | ... |
classesphp/mapa_googlemaps.php
... | ... | @@ -11,7 +11,7 @@ Licenca: |
11 | 11 | |
12 | 12 | GPL2 |
13 | 13 | |
14 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
14 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
15 | 15 | |
16 | 16 | Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil |
17 | 17 | Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br |
... | ... | @@ -76,11 +76,28 @@ $_GET["WIDTH"] = "256"; |
76 | 76 | $_GET["HEIGHT"] = "256"; |
77 | 77 | |
78 | 78 | $mapa = ms_newMapObj($_GET["map"]); |
79 | +/* | |
79 | 80 | $qyfile = str_replace(".map",".qy",$_GET["map"]); |
80 | 81 | $qy = file_exists($qyfile); |
81 | 82 | if($qy) |
82 | 83 | {$mapa->loadquery($qyfile);} |
83 | - | |
84 | +*/ | |
85 | +// | |
86 | +//resolve o problema da seleção na versão nova do mapserver | |
87 | +// | |
88 | +$qyfile = dirname($_GET["map"])."/".$_GET["layer"].".php"; | |
89 | +$qy = file_exists($qyfile); | |
90 | +if($qy) | |
91 | +{ | |
92 | + $l = $mapa->getLayerByname($_GET["layer"]); | |
93 | + $indxlayer = $l->index; | |
94 | + $handle = fopen ($qyfile, "r"); | |
95 | + $conteudo = fread ($handle, filesize ($qyfile)); | |
96 | + fclose ($handle); | |
97 | + $shp = unserialize($conteudo); | |
98 | + foreach ($shp as $indx) | |
99 | + {$mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} | |
100 | +} | |
84 | 101 | $layersNames = $mapa->getalllayernames(); |
85 | 102 | $cache = false; |
86 | 103 | foreach ($layersNames as $layerName) | ... | ... |
classesphp/mapa_openlayers.php
... | ... | @@ -12,7 +12,7 @@ Licenca: |
12 | 12 | |
13 | 13 | GPL2 |
14 | 14 | |
15 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
15 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
16 | 16 | |
17 | 17 | Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil |
18 | 18 | Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br |
... | ... | @@ -50,10 +50,28 @@ if(isset($_GET["BBOX"])) |
50 | 50 | $_GET["map_size"] = $_GET["WIDTH"]." ".$_GET["HEIGHT"]; |
51 | 51 | } |
52 | 52 | $mapa = ms_newMapObj($_GET["map"]); |
53 | +/* | |
53 | 54 | $qyfile = str_replace(".map",".qy",$_GET["map"]); |
54 | 55 | $qy = file_exists($qyfile); |
55 | 56 | if($qy) |
56 | 57 | {$mapa->loadquery($qyfile);} |
58 | +*/ | |
59 | +// | |
60 | +//resolve o problema da seleção na versão nova do mapserver | |
61 | +// | |
62 | +$qyfile = dirname($_GET["map"])."/".$_GET["layer"].".php"; | |
63 | +$qy = file_exists($qyfile); | |
64 | +if($qy) | |
65 | +{ | |
66 | + $l = $mapa->getLayerByname($_GET["layer"]); | |
67 | + $indxlayer = $l->index; | |
68 | + $handle = fopen ($qyfile, "r"); | |
69 | + $conteudo = fread ($handle, filesize ($qyfile)); | |
70 | + fclose ($handle); | |
71 | + $shp = unserialize($conteudo); | |
72 | + foreach ($shp as $indx) | |
73 | + {$mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} | |
74 | +} | |
57 | 75 | |
58 | 76 | $layersNames = $mapa->getalllayernames(); |
59 | 77 | $cache = false; | ... | ... |
ferramentas/convertekml/index.js.php
... | ... | @@ -18,7 +18,7 @@ Licenca: |
18 | 18 | |
19 | 19 | GPL2 |
20 | 20 | |
21 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
21 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
22 | 22 | |
23 | 23 | Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil |
24 | 24 | Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | ... | ... |
index.html
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | <br><br> |
14 | 14 | <table> |
15 | 15 | <tr> |
16 | - <td style="padding:10px;"><center><img alt="logomarca" src='imagens/logo_inicio.png'></td> | |
16 | + <td style="padding:10px;"><center><img alt="i3Geo" src='imagens/logo_inicio.png'></td> | |
17 | 17 | </tr> |
18 | 18 | </table> |
19 | 19 | </body> | ... | ... |