Commit 0ca1693efffca95ca6d3337b353770c06448c287
1 parent
2e5260d5
Exists in
master
and in
7 other branches
Modificação dos códigos para uso de setconnectiontype (compatibilização com vers…
…oes novas do Mapserver)
Showing
8 changed files
with
18 additions
and
14 deletions
Show diff stats
admin/php/editormapfile.php
... | ... | @@ -486,7 +486,10 @@ function alterarConexao() |
486 | 486 | $mapa = ms_newMapObj($mapfile); |
487 | 487 | $layer = $mapa->getlayerbyname($codigoLayer); |
488 | 488 | $layer->set("connection",$connection); |
489 | - $layer->set("connectiontype",$connectiontype); | |
489 | + if(ms_GetVersionInt() > 50201) | |
490 | + {$layer->setconnectiontype($connectiontype);} | |
491 | + else | |
492 | + {$layer->set("connectiontype",$connectiontype);} | |
490 | 493 | $layer->set("data",$data); |
491 | 494 | $layer->set("tileitem",$tileitem); |
492 | 495 | $layer->set("tileindex",$tileindex); | ... | ... |
admin/php/parsemapfile.php
... | ... | @@ -240,7 +240,7 @@ function mapfile() |
240 | 240 | $nlayers = array(); |
241 | 241 | foreach ($layers as $layer) |
242 | 242 | { |
243 | - if($objcontype[$layer->connectiontype] != "MS_WMS") | |
243 | + if($objcontype[$layer->connectiontype] != MS_WMS ) | |
244 | 244 | { |
245 | 245 | $layer = $mapa->getlayerbyname($layer); |
246 | 246 | if($layer->group == "") | ... | ... |
aplicmap/geral.htm
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | o arquivo i3geo.js por i3geonaocompacto.js |
14 | 14 | No modo não compactado o código está adaptado para uso com o Firebug do Firefox. |
15 | 15 | --> |
16 | -<script type="text/javascript" src="../classesjs/i3geo.js"></script> | |
16 | +<script type="text/javascript" src="../classesjs/i3geonaocompacto.js"></script> | |
17 | 17 | <style> |
18 | 18 | .yui-log .i3geo {background-color:yellow;} /* customize a color */ |
19 | 19 | .yui-log .redesenho {background-color:yellow;} /* customize a color */ | ... | ... |
aplicmap/referenciadinamica.map
classesphp/classe_analise.php
... | ... | @@ -1063,7 +1063,10 @@ $locaplic - Localização do I3geo. |
1063 | 1063 | $novolayer->setmetadata("DOWNLOAD","SIM"); |
1064 | 1064 | $novolayer->setmetadata("ITENS"," "); |
1065 | 1065 | $novolayer->setmetadata("ITENSDESC"," "); |
1066 | - $novolayer->set("connectiontype",MS_SHAPEFILE); | |
1066 | + if(ms_GetVersionInt() > 50201) | |
1067 | + {$novolayer->setconnectiontype(MS_SHAPEFILE);} | |
1068 | + else | |
1069 | + {$novolayer->set("connectiontype",MS_SHAPEFILE);} | |
1067 | 1070 | if (file_exists($this->qyfile)) |
1068 | 1071 | {unlink ($this->qyfile);} |
1069 | 1072 | return(implode(" ",$nomesitens)); | ... | ... |
classesphp/classe_mapa.php
... | ... | @@ -1157,7 +1157,12 @@ Include: |
1157 | 1157 | $layer->set("name",nomeRandomico()); |
1158 | 1158 | $layer->set("type",MS_LAYER_RASTER); |
1159 | 1159 | $layer->set("connection",$servico); |
1160 | - $layer->set("connectiontype",MS_WMS); | |
1160 | + | |
1161 | + if(ms_GetVersionInt() > 50201) | |
1162 | + {$layer->setconnectiontype(MS_WMS);} | |
1163 | + else | |
1164 | + {$layer->set("connectiontype",MS_WMS);} | |
1165 | + | |
1161 | 1166 | $epsg = "EPSG:4291"; |
1162 | 1167 | $e4291 = "nao"; |
1163 | 1168 | $pos = explode(",",$proj); | ... | ... |
classesphp/classe_selecao.php
... | ... | @@ -128,7 +128,6 @@ $ys - lista de coordenadas y separadas por virgula |
128 | 128 | if ($tipo == "inverte") |
129 | 129 | {return($this->selecaoInverte());} |
130 | 130 | $tipoLayer = $this->layer->type; |
131 | - $this->layer->set("template","none.htm"); | |
132 | 131 | if (file_exists($this->qyfile)) |
133 | 132 | {$this->mapa->loadquery($this->qyfile);} |
134 | 133 | $indxlayer = $this->layer->index; |
... | ... | @@ -470,7 +469,6 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa |
470 | 469 | if ($tipo == "inverte") |
471 | 470 | {return ($this->selecaoInverte());} |
472 | 471 | if(!$this->layer){return "erro";} |
473 | - $this->layer->set("template","none.htm"); | |
474 | 472 | if (file_exists($this->qyfile)) |
475 | 473 | {$this->mapa->loadquery($this->qyfile);} |
476 | 474 | $indxlayer = $this->layer->index; |
... | ... | @@ -569,7 +567,6 @@ Inverte seleção do tema. |
569 | 567 | function selecaoInverte() |
570 | 568 | { |
571 | 569 | if(!$this->layer){return "erro";} |
572 | - $this->layer->set("template","none.htm"); | |
573 | 570 | if (file_exists($this->qyfile)) |
574 | 571 | {$this->mapa->loadquery($this->qyfile);} |
575 | 572 | $indxlayer = $this->layer->index; |
... | ... | @@ -614,7 +611,6 @@ $shp_atual - Indices dos elementos já selecionados. |
614 | 611 | function selecaoAdiciona($shpi,$shp_atual) |
615 | 612 | { |
616 | 613 | if(!$this->layer){return "erro";} |
617 | - //$this->layer->set("template","none.htm"); | |
618 | 614 | $indxlayer = $this->layer->index; |
619 | 615 | $shp = array_merge($shpi,$shp_atual); |
620 | 616 | $shp = array_unique($shp); |
... | ... | @@ -622,6 +618,7 @@ $shp_atual - Indices dos elementos já selecionados. |
622 | 618 | foreach ($shp as $indx) |
623 | 619 | {@$this->mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} |
624 | 620 | $this->mapa->savequery($this->qyfile); |
621 | + | |
625 | 622 | return("ok"); |
626 | 623 | } |
627 | 624 | /* |
... | ... | @@ -638,7 +635,6 @@ $shp_atual - Indices dos elementos já selecionados. |
638 | 635 | function selecaoRetira($shpi,$shp_atual) |
639 | 636 | { |
640 | 637 | if(!$this->layer){return "erro";} |
641 | - $this->layer->set("template","none.htm"); | |
642 | 638 | $indxlayer = $this->layer->index; |
643 | 639 | $this->mapa->freequery($indxlayer); |
644 | 640 | $shp = array_diff($shp_atual,$shpi); |
... | ... | @@ -663,7 +659,6 @@ $ids - Ids separados por vírgula correspondendo aos registros. |
663 | 659 | function incluiSel($ids) |
664 | 660 | { |
665 | 661 | if(!$this->layer){return "erro";} |
666 | - $this->layer->set("template","none.htm"); | |
667 | 662 | if (file_exists($this->qyfile)) |
668 | 663 | {$this->mapa->loadquery($this->qyfile);} |
669 | 664 | $ids = explode(",",$ids); |
... | ... | @@ -687,7 +682,6 @@ $dir_tmp - localização do diretório temporário |
687 | 682 | function selecao2tema($locaplic,$dir_tmp) |
688 | 683 | { |
689 | 684 | if(!$this->layer){return "erro";} |
690 | - $this->layer->set("template","none.htm"); | |
691 | 685 | $this->layer->setfilter(""); |
692 | 686 | $nomeshp = criaSHP($this->nome,$this->arquivo,$locaplic,$dir_tmp); |
693 | 687 | $novolayer = criaLayer($this->mapa,$this->layer->type,MS_DEFAULT,"Seleção de ".(pegaNome($this->layer))." (".$this->nome.")",$metaClasse="SIM"); |
... | ... | @@ -721,7 +715,6 @@ $tipo - Tipo de operação adiciona|retira|inverte|limpa |
721 | 715 | {return ($this->selecaoLimpa());} |
722 | 716 | if ($tipo == "inverte") |
723 | 717 | {return ($this->selecaoInverte());} |
724 | - $this->layer->set("template","none.htm"); | |
725 | 718 | if (file_exists($this->qyfile)) |
726 | 719 | {$this->mapa->loadquery($this->qyfile);} |
727 | 720 | $indxlayer = $this->layer->index; |
... | ... | @@ -770,7 +763,6 @@ $ext - coordenadas separadas por espaços no estilo xmin ymin xmax ymax |
770 | 763 | {return ($this->selecaoLimpa());} |
771 | 764 | if ($tipo == "inverte") |
772 | 765 | {return ($this->selecaoInverte());} |
773 | - $this->layer->set("template","none.htm"); | |
774 | 766 | if (file_exists($this->qyfile)) |
775 | 767 | {$this->mapa->loadquery($this->qyfile);} |
776 | 768 | $indxlayer = $this->layer->index; | ... | ... |
menutemas/admin.db
No preview for this file type