Commit 0ca1693efffca95ca6d3337b353770c06448c287

Authored by Edmar Moretti
1 parent 2e5260d5

Modificação dos códigos para uso de setconnectiontype (compatibilização com vers…

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