Commit 48b5f5b9d8a2bde3646f1fd7fb61fff53a20ddc5

Authored by Edmar Moretti
1 parent 9c9494ab

--no commit message

Showing 1 changed file with 17 additions and 2 deletions   Show diff stats
classesphp/mapa_openlayers.php
... ... @@ -107,15 +107,30 @@ $qy = file_exists($qyfile);
107 107 if($qy)
108 108 {
109 109 $l = $mapa->getLayerByname($_GET["layer"]);
  110 + if (($postgis_mapa != "") && ($postgis_mapa != " "))
  111 + {
  112 + if ($l->connectiontype == MS_POSTGIS)
  113 + {
  114 + $lcon = $l->connection;
  115 + if (($lcon == " ") || ($lcon == "") || (in_array($lcon,array_keys($postgis_mapa))))
  116 + {
  117 + if(($lcon == " ") || ($lcon == ""))
  118 + {$l->set("connection",$postgis_mapa);}
  119 + else
  120 + {$l->set("connection",$postgis_mapa[$lcon]);}
  121 + }
  122 + }
  123 + }
110 124 $indxlayer = $l->index;
111 125 $handle = fopen ($qyfile, "r");
112 126 $conteudo = fread ($handle, filesize ($qyfile));
113 127 fclose ($handle);
114 128 $shp = unserialize($conteudo);
  129 + //$l->set("tileitem","");
115 130 foreach ($shp as $indx)
116 131 {$mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);}
117   -
118   - //$mapa->loadquery(str_replace(".map",".qy",$map_fileX);
  132 + //$mapa->loadquery(str_replace(".map",".qy",$map_fileX));
  133 + //echo str_replace(".map",".qy",$map_fileX);exit;
119 134 }
120 135 if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao e alterado
121 136 $numlayers = $mapa->numlayers;
... ...