Commit 4a197f20d241036c98b8e4a55e223b283d0925fb

Authored by Edmar Moretti
1 parent 8f76e794

--no commit message

aplicmap/geral.htm
... ... @@ -163,12 +163,20 @@ vc pode optar por colocar mensagens de ajuda em algum lugar
163 163  
164 164 <center>
165 165 <br><br>
166   -<table><tr>
167   -<td colspan=3 ><center><img src='../imagens/i3geo1.jpg'></td></tr>
  166 +<table>
  167 +<tr>
  168 + <td colspan=3 ><center><img src='../imagens/i3geo1.jpg'></td>
  169 +</tr>
168 170 <tr><td style="padding:10px;"><center><img src='../imagens/pspb.png'></td>
169   -<td style="padding:10px;"><center><img src='../imagens/mapserv.png'></td>
170   -<td style="padding:10px;"><center><a href='http://mapas.mma.gov.br/download' target=blank ><img src='../imagens/somerights20_pt.gif' ></a></td>
171   -</tr></table>
  171 + <td style="padding:10px;"><center><img src='../imagens/mapserv.png'></td>
  172 + <td style="padding:10px;"><center><a href='http://mapas.mma.gov.br/download' target=blank ><img src='../imagens/somerights20_pt.gif' ></a></td>
  173 +</tr>
  174 +<tr>
  175 + <td colspan=3 ><center>
  176 + <script type="text/javascript" src="http://www.ohloh.net/p/150688/widgets/project_users.js?style=red"></script>
  177 + </td>
  178 +</tr>
  179 +</table>
172 180  
173 181  
174 182 <!--
... ...
classesphp/funcoes_gerais.php
... ... @@ -861,8 +861,16 @@ postgis_mapa - string de conexão com o banco de dados definida em ms_configura.p
861 861 */
862 862 function testaMapa($map_file,$postgis_mapa)
863 863 {
  864 + //var_dump($postgis_mapa);
  865 + //error_reporting(E_ALL);
864 866 substituiCon($map_file,$postgis_mapa);
865 867 $objMapa = ms_newMapObj($map_file);
  868 +
  869 + //$l = $objMapa->getlayerbyname("testesubsstring");
  870 + //echo $l->connection;
  871 +
  872 +
  873 +
866 874 ms_ResetErrorList();
867 875 $img = $objMapa->draw();
868 876 $erros = "";
... ...
classesphp/mapa_controle.php
... ... @@ -721,6 +721,7 @@ Include:
721 721 $salvar = $m->adicionaTema($temas,$locaplic);
722 722 if($salvar)
723 723 $m->salva();
  724 + $cp->set_data("ok");
724 725 $teste = testaMapa($map_file,$postgis_mapa);
725 726 if ($teste == "ok")
726 727 {$cp->set_data("ok");}
... ...
menutemas/admin.db
No preview for this file type
ms_configura.php
... ... @@ -253,10 +253,20 @@ if (strtoupper(substr(PHP_OS, 0, 3) == &#39;WIN&#39;))
253 253  
254 254 Para mais detalhes veja a função substituiCon em classesphp/funcoes_gerais.php
255 255  
  256 + Importante - se vc usar o modo de substituição de strings, as interfaces que dependem do modo CGI
  257 + para funcionarem, não serão capazes de acessar os dados. Isso afeta por exemplo, a interface Google Maps e Openlayers.
  258 +
  259 + exemplo -
  260 +
  261 + $postgis_mapa = array(
  262 + "conexao1"=>"user=geodados password=geodados dbname=geodados host=10.1.1.36 port=5432",
  263 + "conexao2"=>"user=geodados password=geodados dbname=geodadosteste host=10.1.1.36 port=5432"
  264 + )
  265 +
256 266 Tipo:
257   - {array}
  267 + {array ou string}
258 268 */
259   - $postgis_mapa = ""; //"user=geodados password=geodados dbname=geodados host=10.1.1.36 port=5432";
  269 + $postgis_mapa = array("teste"=>"user=postgres password=postgres dbname=pgutf8 host=localhost port=5432 options='-c client_encoding=LATIN1'"); //"user=geodados password=geodados dbname=geodados host=10.1.1.36 port=5432";
260 270 /*
261 271 Variable: menutemas
262 272  
... ...
temas/testesubsstring.map 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +MAP
  2 +SYMBOLSET ../symbols/simbolos.sym
  3 +FONTSET "../symbols/fontes.txt"
  4 + LAYER
  5 + CONNECTION "teste"
  6 + CONNECTIONTYPE POSTGIS
  7 + DATA "the_geom FROM (select * FROM biomas) as foo USING UNIQUE gid USING SRID=4291"
  8 + METADATA
  9 + "CLASSE" "SIM"
  10 + "download" "SIM"
  11 + "TEMA" "Teste de substituição de string"
  12 + END
  13 + NAME "testesubsstring"
  14 + STATUS OFF
  15 + TEMPLATE "none.htm"
  16 + TYPE POLYGON
  17 + UNITS METERS
  18 + CLASS
  19 + NAME "Teste"
  20 + STYLE
  21 + ANGLE 360
  22 + COLOR 196 185 103
  23 + OPACITY 100
  24 + SYMBOL 0
  25 + END
  26 + END
  27 + END
  28 +
  29 +END
  30 +
... ...