diff --git a/admin/js/editormapfile_metadados.js b/admin/js/editormapfile_metadados.js index fc35ff3..7efebb9 100755 --- a/admin/js/editormapfile_metadados.js +++ b/admin/js/editormapfile_metadados.js @@ -7,7 +7,7 @@ Abre o editor de metadados */ function editorMetadados(codigoMap,codigoLayer) { - core_montaEditor("","450px","500px","","Metadados"); + core_montaEditor("","450px","500px","","Miscelânea"); var sUrl = "../php/editormapfile.php?funcao=pegaMetadados&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer; core_pegaDados("Obtendo dados...",sUrl,"montaEditorMetadados"); } @@ -129,7 +129,7 @@ function montaEditorMetadados(dados) var ins = ""; if(dados.colunas != "") { - ins += "

O layer possuí as seguintes colunas na tabela de atributos: "; + ins += "

O layer possuí as seguintes colunas na tabela de atributos:
"; ins += dados.colunas+"

"; } ins += core_geraLinhas(param); diff --git a/admin/php/editormapfile.php b/admin/php/editormapfile.php index 685758f..dae4b28 100644 --- a/admin/php/editormapfile.php +++ b/admin/php/editormapfile.php @@ -1739,6 +1739,7 @@ function pegaConexao() $dados["metaestat_id_medida_variavel"] = $layer->getmetadata("metaestat_id_medida_variavel"); $dados["colunas"] = implode(",",pegaItens($layer)); + if($layer->connectiontype == 7 || $layer->connectiontype == 9){ $dados["tipooriginal"] = $layer->getmetadata("tipooriginal"); } @@ -1841,7 +1842,17 @@ function pegaMetadados() $dados["editorsql"] = $layer->getmetadata("editorsql"); $dados["codigoMap"] = $codigoMap; $dados["codigoLayer"] = $codigoLayer; + $lcon = $layer->connection; + if ($layer->connectiontype == MS_POSTGIS){ + if (in_array($lcon,array_keys($postgis_mapa))) + { + //echo $postgis_mapa[$lcon];exit; + $layer->set("connection",$postgis_mapa[$lcon]); + } + } $dados["colunas"] = implode(" ,",pegaItens($layer)); + $layer->set("connection",$lcon); + $dados["ltempoformatodata"] = $layer->getmetadata("ltempoformatodata"); $dados["ltempoiteminicio"] = $layer->getmetadata("ltempoiteminicio"); $dados["ltempoitemfim"] = $layer->getmetadata("ltempoitemfim"); diff --git a/ms_configura.php b/ms_configura.php index 1bc5920..bdfb189 100644 --- a/ms_configura.php +++ b/ms_configura.php @@ -417,7 +417,8 @@ Tipo: */ $postgis_mapa = array( "teste"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=LATIN1'", - "postgres"=>"user=postgres password=postgres dbname=postgres host=localhost port=5432" + "postgres"=>"user=postgres password=postgres dbname=postgres host=localhost port=5432", + "i3geosaude"=>"user=postgres password=postgres dbname=i3geosaude host=localhost port=5432" ); /* Variable: utilizacgi diff --git a/temas/_lbairros.map b/temas/_lbairros.map index ab7d9e4..a8d4a62 100644 --- a/temas/_lbairros.map +++ b/temas/_lbairros.map @@ -2,7 +2,7 @@ MAP FONTSET "../symbols/fontes.txt" SYMBOLSET "../symbols/simbolos.sym" LAYER - CONNECTION "user=postgres password=postgres dbname=i3geosaude host=localhost port=5432" + CONNECTION "i3geosaude" CONNECTIONTYPE POSTGIS DATA "the_geom from (select * from i3geo_metaestat.bairros) as foo using unique gid using srid=4326" METADATA -- libgit2 0.21.2