From 7da5365ce260f63c7cfebb895dd8e1bdebc94528 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Thu, 23 Oct 2008 18:20:11 +0000 Subject: [PATCH] Concluido o novo sistema de administração baseado em banco de dados --- admin/html/admin.css | 9 +++++++++ admin/html/atlas_importar.html | 10 ++++------ admin/html/i3geoadmin_importarmenu.html | 24 ------------------------ admin/html/identifica_importar.html | 10 ++++------ admin/html/importarmenu.html | 21 +++++++++++++++++++++ admin/html/mapas_importar.html | 10 ++++------ admin/html/sistemas_importar.html | 10 ++++------ admin/html/webservices_importar.html | 9 ++++----- admin/imagens/41.png | Bin 0 -> 671 bytes admin/index.html | 17 +++++++++-------- admin/js/core.js | 2 +- admin/js/editormapfile.js | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------- admin/js/importar.js | 35 +++++++++++++++++++++++++++++++++++ admin/js/listatemas.js | 2 +- admin/js/mapas.js | 1 + admin/js/menutemas.js | 493 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- admin/js/temasold.js | 137 +---------------------------------------------------------------------------------------------------------------------------------------- admin/php/admin.php | 1 + admin/php/atlas.php | 5 ++--- admin/php/editormapfile.php | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- admin/php/identifica.php | 5 ++--- admin/php/mapas.php | 10 ++-------- admin/php/menutemas.php | 14 +++++++++----- admin/php/parsemapfile.php | 1 + admin/php/sistemas.php | 5 ++--- admin/php/webservices.php | 6 +++--- aplicmap/ogc_wmc_output.cml | 28 ++++++++++++++++++++++++++++ aplicmap/ogcws.map | 1 + classesphp/funcoes_gerais.php | 11 +++++++++-- menutemas/admin.db | Bin 46080 -> 0 bytes menutemas/geopr.xml | 8 ++++---- temas/atlas_biomas.map | 18 ------------------ temas/bioma.map | 162 +++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------- 33 files changed, 569 insertions(+), 1097 deletions(-) delete mode 100644 admin/html/i3geoadmin_importarmenu.html create mode 100644 admin/html/importarmenu.html create mode 100644 admin/imagens/41.png create mode 100644 admin/js/importar.js delete mode 100644 admin/js/menutemas.js create mode 100644 aplicmap/ogc_wmc_output.cml diff --git a/admin/html/admin.css b/admin/html/admin.css index f3e5879..90fb37f 100644 --- a/admin/html/admin.css +++ b/admin/html/admin.css @@ -39,6 +39,15 @@ input width: 20px; height: 20px; } +.testar +{ + background-image:URL('../imagens/41.png'); + background-repeat: no-repeat; + background-position: 0px 0px; + cursor:pointer; + width: 20px; + height: 20px; +} .mais { background-image:URL('../imagens/05.png'); diff --git a/admin/html/atlas_importar.html b/admin/html/atlas_importar.html index 2eb6389..22b287d 100644 --- a/admin/html/atlas_importar.html +++ b/admin/html/atlas_importar.html @@ -1,15 +1,13 @@ - - - - + + - +

Administração do i3geo - importação de XML

-

Voltar

+

Este programa importa as definições do menu de temas armazenadas em um arquivo XML

O menu é baseado no banco admin.db.

diff --git a/admin/html/i3geoadmin_importarmenu.html b/admin/html/i3geoadmin_importarmenu.html deleted file mode 100644 index bf19b96..0000000 --- a/admin/html/i3geoadmin_importarmenu.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - -
-

Administração do i3geo - importação de menu XML

-

Voltar

-

Este programa importa as definições do menu de temas armazenadas em um arquivo XML

-

O menu é baseado no banco admin.db.

-
-

Digite o nome do arquivo xml armazenado no servidor - utilize o caminho completo -

Por padrão, o arquivo utilizado é i3geo/menutemas/menutemas.xml

- -

Nome do novo menu:

-

- -
- - \ No newline at end of file diff --git a/admin/html/identifica_importar.html b/admin/html/identifica_importar.html index e62f0f7..f6bc668 100644 --- a/admin/html/identifica_importar.html +++ b/admin/html/identifica_importar.html @@ -1,15 +1,13 @@ - - - - + + - +

Administração do i3geo - importação da lista de funções da ferramenta identifica

-

Voltar

+

Este programa importa as definições das funções armazenadas em um arquivo XML

O menu é baseado no banco admin.db.

diff --git a/admin/html/importarmenu.html b/admin/html/importarmenu.html new file mode 100644 index 0000000..4729d50 --- /dev/null +++ b/admin/html/importarmenu.html @@ -0,0 +1,21 @@ + + + + + + + +
+

Administração do i3geo - importação de menu XML

+

Este programa importa as definições do menu de temas armazenadas em um arquivo XML

+

O menu é baseado no banco admin.db.

+

+

Digite o nome do arquivo xml armazenado no servidor - utilize o caminho completo +

Normalmente, o arquivo utilizado é i3geo/menutemas/menutemas.xml

+ +

Nome do novo menu:

+

+ +
+ + \ No newline at end of file diff --git a/admin/html/mapas_importar.html b/admin/html/mapas_importar.html index 0b88e40..7cc011e 100644 --- a/admin/html/mapas_importar.html +++ b/admin/html/mapas_importar.html @@ -1,15 +1,13 @@ - - - - + + - +

Administração do i3geo - importação da lista de mapas

-

Voltar

+

Este programa importa as definições do menu de temas armazenadas em um arquivo XML

O menu é baseado no banco admin.db.

diff --git a/admin/html/sistemas_importar.html b/admin/html/sistemas_importar.html index ca93f1a..1ca91f6 100644 --- a/admin/html/sistemas_importar.html +++ b/admin/html/sistemas_importar.html @@ -1,15 +1,13 @@ - - - - + + - +

Administração do i3geo - importação da lista de sistemas

-

Voltar

+

Este programa importa as definições dos sistemas e funções armazenadas em um arquivo XML

O menu é baseado no banco admin.db.

diff --git a/admin/html/webservices_importar.html b/admin/html/webservices_importar.html index 99a567c..1cc1d22 100644 --- a/admin/html/webservices_importar.html +++ b/admin/html/webservices_importar.html @@ -2,14 +2,13 @@ - - - + + - +

Administração do i3geo - importação da lista de mapas

-

Voltar

+

Este programa importa as definições dos webservices armazenadas em um arquivo XML

O menu é baseado no banco admin.db.

diff --git a/admin/imagens/41.png b/admin/imagens/41.png new file mode 100644 index 0000000..9269217 Binary files /dev/null and b/admin/imagens/41.png differ diff --git a/admin/index.html b/admin/index.html index 664eb02..8d4fc6a 100644 --- a/admin/index.html +++ b/admin/index.html @@ -16,11 +16,12 @@ Você precisará se inscrever no Portal e ingressar na comunidade i3geo. Na página da comunidade, existem vários documentos que explicam como instalar e configurar o i3geo.

De forma geral, você deverá seguir as seguintes etapas na configuração:

1 - instalação e configuração -

2 - criação das camadas (layers) -

3 - organização das camadas em grupos e sub-grupos -

4 - configuração de mapas e atlas -

5 - edição do cadastro de web services e sistemas especiais -

6 - customização das ferramentas e interface +

2 - criação dos mapfiles no editor de mapfiles +

3 - Edição dos temas, vinculando um tema a um detereminado mapfile +

4 - organização das camadas em grupos e sub-grupos +

5 - configuração de mapas e atlas +

6 - edição do cadastro de web services e sistemas especiais +

7 - customização das ferramentas e interface

Antes da versão 4.0 o i3geo utilizava arquivos armazenados em disco (arquivos XML) para organizar as camadas e outras listagens. Com a nova estrutura de administração, esses arquivos podem ser substituídos por registros em bancos de dados. @@ -59,7 +60,7 @@ dos arquivos XML.

-Editor de temas +Editor de mapfiles

@@ -171,7 +172,7 @@ que por sua vez contém temas.

- + diff --git a/admin/js/core.js b/admin/js/core.js index 4e3e7b0..b870369 100644 --- a/admin/js/core.js +++ b/admin/js/core.js @@ -871,7 +871,7 @@ function core_pegaDados(mensagem,sUrl,funcaoRetorno) { try {eval(funcaoRetorno+"(YAHOO.lang.JSON.parse(o.responseText))");} - catch(e){core_handleFailure(o,o.responseText);} + catch(e){core_carregando("desativa");core_handleFailure(o,o.responseText);} }, failure:core_handleFailure, argument: { foo:"foo", bar:"bar" } diff --git a/admin/js/editormapfile.js b/admin/js/editormapfile.js index 873ec40..5e3cffd 100644 --- a/admin/js/editormapfile.js +++ b/admin/js/editormapfile.js @@ -177,8 +177,8 @@ function montaNosRaiz(redesenha) var nos = new Array() for (var i=0, j=$mapfiles.length; i "+$mapfiles[i]+"" - //conteudo += "  "+$mapfiles[i]+"" + conteudo = " " + conteudo += "  "+$mapfiles[i]+"" var d = {html:conteudo,id:$mapfiles[i],codigoMap:$mapfiles[i]}; var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); @@ -188,6 +188,10 @@ function montaNosRaiz(redesenha) tree.draw(); return nos; } +function testarMapfile(codigoMap) +{ + window.open("../../testamapfile.php?map="+codigoMap+".map") +} function montaRaizTema(no,dados) { var codigoMap = no.data.codigoMap; @@ -230,8 +234,8 @@ function montaRaizTema(no,dados) } for (var i=0, j=dados.layers.length; i" - conteudo += " " + var conteudo = " " + conteudo += " " conteudo += "  "+dados.layers[i]+"" var d = {html:conteudo,id:codigoMap+"_"+dados.layers[i],codigoMap:codigoMap,codigoLayer:dados.layers[i]} var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); @@ -306,8 +310,8 @@ function montaParametrosTemas(no,dados,redesenha) } for (var i=0, j=dados.length; i" - conteudo += " " + var conteudo = " " + conteudo += " " conteudo += "  "+dados[i].indice+" "+dados[i].nome+"" //conteudo += " "+dados[i].indice+" "+dados[i].nome+"" var d = {classes:codigoMap+"_"+codigoLayer,html:conteudo,id:codigoMap+"_"+codigoLayer+"_"+dados[i].indice,codigoMap:codigoMap,codigoLayer:codigoLayer,indiceClasse:dados[i].indice} @@ -332,11 +336,10 @@ function montaParametrosClasses(no,dados,redesenha) if(!tree.getNodeByProperty("etiquetaClasseLabel",no.data.id)) { var conteudo = "" - var d = {tipo:"etiquetaClasseLabel",etiquetaClasseGeral:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:conteudo+" Editar etiquetas"} + var d = {tipo:"etiquetaClasseLabel",etiquetaClasseLabel:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:conteudo+" Editar etiquetas"} var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); tempNode.isLeaf = true; } - if(!tree.getNodeByProperty("etiquetaEstilo",no.data.id)) { var conteudo = " " @@ -346,8 +349,8 @@ function montaParametrosClasses(no,dados,redesenha) } for (var i=0, j=dados.length; i" - conteudo += " " + var conteudo = " " + conteudo += " " conteudo += "  " conteudo += " "+dados[i].estilo+"" var d = {estilos:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:conteudo,id:codigoMap+"_"+codigoLayer+"_"+indiceClasse+"_"+dados[i].estilo,codigoMap:codigoMap,codigoLayer:codigoLayer,indiceClasse:indiceClasse,indiceEstilo:dados[i].estilo} @@ -645,6 +648,12 @@ function editorClasseLabel(codigoMap,codigoLayer,indiceClasse) var sUrl = "../php/editormapfile.php?funcao=pegaClasseLabel&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse; core_pegaDados("Obtendo dados...",sUrl,"montaEditorClasseLabel") } +function editorEstilo(codigoMap,codigoLayer,indiceClasse,indiceEstilo) +{ + core_montaEditor("","600px","500px") + var sUrl = "../php/editormapfile.php?funcao=pegaEstilo&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo; + core_pegaDados("Obtendo dados...",sUrl,"montaEditorEstilo") +} function montaEditorConexao(dados) { var param = { @@ -869,8 +878,60 @@ function montaEditorClasseLabel(dados) { var param = { "linhas":[ - {ajuda:"Nome da classe para ser mostrada na legenda", - titulo:"Name",id:"name",value:dados.name,tipo:"text"}, + {ajuda:"Color to draw text with.", + titulo:"Color",id:"color",value:dados.color,tipo:"text"}, + {ajuda:"Text size. Use integer to give the size in pixels of your TrueType font based label, or any of theother 5 listed keywords to bitmap fonts.", + titulo:"Size",id:"size",value:dados.size,tipo:"text"}, + {ajuda:"Position of the label relative to the labeling point (layers only). First letter is Y position, second letter is X position. Auto tells MapServer to calculate a label position that will not interfere with other labels. With points and polygons, MapServer selects from the 8 outer positions (i.e. excluding cc). With lines, it only uses lc or uc, until it finds a position that doesn't collide with labels that have already been drawn. If all positions cause a conflict, then the label is not drawn (Unless the label's FORCE a parameter is set to true). Auto placement is only available with cached labels.", + titulo:"Position",id:"position",value:dados.position,tipo:"text"}, + {ajuda:"Padding, in pixels, around labels. Useful for maintaining spacing around text to enhance readability. Available only for cached labels. Default is 0.", + titulo:"Buffer",id:"buffer",value:dados.buffer,tipo:"text"}, + {ajuda:"Font alias (as defined in the FONTSET) to use for labeling", + titulo:"Font",id:"",value:dados.font,tipo:"text",div:"
"}, + {ajuda:"Type of font to use. Generally bitmap fonts are faster to draw then TrueType fonts. However,TrueType fonts are scalable and available in a variety of faces. Be sure to set the FONT parameter ifyou select TrueType", + titulo:"Type",id:"",value:dados.type,tipo:"text",div:"
"}, + {ajuda:"Can text run off the edge of the map? Default is true", + titulo:"Partials",id:"",value:dados.partials,tipo:"text",div:"
"}, + {ajuda:"Forces labels for a particular class on, regardless of collisions. Available only for cached labels. Default is false.", + titulo:"Force",id:"",value:dados.force,tipo:"text",div:"
"}, + {ajuda:"Color to draw a background rectangle (i.e. billboard). Off by default.", + titulo:"Backgroundcolor",id:"backgroundcolor",value:dados.backgroundcolor,tipo:"text"}, + {ajuda:"Color to draw a background rectangle (i.e. billboard) shadow. Off by default.", + titulo:"Backgroundshadowcolor",id:"backgroundshadowcolor",value:dados.backgroundshadowcolor,tipo:"text"}, + {ajuda:"Color to draw a one pixel outline around the text.", + titulo:"Outlinecolor",id:"outlinecolor",value:dados.outlinecolor,tipo:"text"}, + {ajuda:"Color of drop shadow.", + titulo:"Shadowcolor",id:"shadowcolor",value:dados.shadowcolor,tipo:"text"}, + {ajuda:"Shadow offset in pixels.", + titulo:"Shadowsizex",id:"shadowsizex",value:dados.shadowsizex,tipo:"text"}, + {ajuda:"Shadow offset in pixels.", + titulo:"Shadowsizey",id:"shadowsizey",value:dados.shadowsizey,tipo:"text"}, + {ajuda:"How far should the background rectangle be offset? Default is 1.", + titulo:"Backgroundshadowsizex",id:"backgroundshadowsizex",value:dados.backgroundshadowsizex,tipo:"text"}, + {ajuda:"How far should the background rectangle be offset? Default is 1.", + titulo:"Backgroundshadowsizey",id:"backgroundshadowsizey",value:dados.backgroundshadowsizey,tipo:"text"}, + {ajuda:"Minimum font size to use when scaling text (pixels). Default is 4.", + titulo:"Minsize",id:"minsize",value:dados.minsize,tipo:"text"}, + {ajuda:"Maximum font size to use when scaling text (pixels). Default is 256.", + titulo:"Maxsize",id:"maxsize",value:dados.maxsize,tipo:"text"}, + {ajuda:"Offset values for labels, relative to the lower left hand corner of the label and the label point. Given in pixels. In the case of rotated text specify the values as if all labels are horizontal and any rotation will be compensated for.", + titulo:"Offsetx",id:"offsetx",value:dados.offsetx,tipo:"text"}, + {ajuda:"Offset values for labels, relative to the lower left hand corner of the label and the label point. Given in pixels. In the case of rotated text specify the values as if all labels are horizontal and any rotation will be compensated for.", + titulo:"Offsety",id:"offsety",value:dados.offsety,tipo:"text"}, + {ajuda:"Angle, given in degrees, to draw the label or AUTO to allow the software to compute the angle, AUTO is valid for LINE layers only. FOLLOW was introduced in version 4.10 and tells map server to compute a curved label for appropriate linear features", + titulo:"Angle (utilize MS_FOLLOW para textos curvos)",id:"angle",value:dados.angle,tipo:"text"}, + {ajuda:"Cálculo automático do ângulo quando os elementos forem lineares", + titulo:"Autoangle",id:"",value:dados.angle,tipo:"text",div:"
"}, + {ajuda:"Should text be antialiased? Note that this requires more available colors, decreased drawing performance, and results in slightly larger output images.", + titulo:"Antialias",id:"antialias",value:dados.antialias,tipo:"text"}, + {ajuda:"Character that represents an end-of-line condition in label text, thus resulting in a multi-line label.", + titulo:"Wrap",id:"wrap",value:dados.wrap,tipo:"text"}, + {ajuda:"Minimum size a feature must be to be labeled. Given in pixels. For line data the overall length of the displayed line is used, for polygons features the smallest dimension of the bounding box is used. Auto keyword tells MapServer to only label features that are larger than their corresponding label. Available for cached labels only.", + titulo:"Minfeaturesize",id:"minfeaturesize",value:dados.minfeaturesize,tipo:"text"}, + {ajuda:"Minimum distance between duplicate labels. Given in pixels.", + titulo:"Mindistance",id:"mindistance",value:dados.mindistance,tipo:"text"}, + {ajuda:"Supported encoding format to be used for labels. If the format is not supported, the label will not be drawn. Requires the iconv library (present on most systems). The library is always detected if present on the system, but if not the label will not be drawn. Required for displaying international characters in MapServer. More information can be found at: http://www.foss4g.org/FOSS4G/MAPSERVER/mpsnf-i18n-en.html.", + titulo:"Encoding",id:"encoding",value:dados.encoding,tipo:"text"} ] } var ins = "" @@ -882,17 +943,78 @@ function montaEditorClasseLabel(dados) ins += core_geraLinhas(param) ins += "


" $i("editor_bd").innerHTML = ins -/* - temp = "

" + temp += core_comboObjeto(dados.fontes,"","",dados.font) temp += "" - $i("cStatus").innerHTML = temp -*/ + $i("cFont").innerHTML = temp + + temp = "

" + $i("cType").innerHTML = temp + + temp = "

" + $i("cPartials").innerHTML = temp + + temp = "

" + $i("cForce").innerHTML = temp + + temp = "

" + $i("cAutoangle").innerHTML = temp + var temp = function() {salvarDadosEditor('classeLabel',dados.codigoMap,dados.codigoLayer,dados.indiceClasse)} new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }}); } - +function montaEditorEstilo(dados) +{ + var param = { + "linhas":[ + {ajuda:"The symbol name or number to use for all features if attribute tables are not used. The number is the index of the symbol in the symbol file, starting at 1, the 5th symbol in the file is therefore symbol number 5. You can also give your symbols names using the NAME keyword in the symbol definition file, and use those to refer to them. Default is 0, which results in a single pixel, single width line, or solid polygon fill, depending on layer type.You can also specify a gif or png filename. The path is relative to the location of the mapfile.", + titulo:"Symbolname",id:"symbolname",value:dados.symbolname,tipo:"text"}, + {ajuda:"Color to use for drawing features.", + titulo:"Color",id:"color",value:dados.color,tipo:"text"}, + {ajuda:"Background-color to use for drawing features.", + titulo:"Backgroundcolorolor",id:"backgroundcolor",value:dados.backgroundcolor,tipo:"text"}, + {ajuda:"Height, in pixels, of the symbol/pattern to be used. Only useful with scalable symbols. Default is 1. For symbols of Type HATCH, the SIZE is the distance between hatched lines. For its use with hatched lines, see Example#8 in the SYMBOL examples.", + titulo:"Size",id:"size",value:dados.size,tipo:"text"}, + {ajuda:"Color to use for outlining polygons and certain marker symbols. Line symbols do not support outline colors.", + titulo:"Outlinecolor",id:"outlinecolor",value:dados.outlinecolor,tipo:"text"}, + {ajuda:"Width refers to the thickness of line work drawn, in pixels. Default is 1. For symbols of Type HATCH, the WIDTH is how thick the hatched lines are. For its use with hatched lines, see Example#8 in the SYMBOL examples.", + titulo:"Width",id:"width",value:dados.width,tipo:"text"}, + {ajuda:"Height, in pixels, of the symbol/pattern to be used. Only useful with scalable symbols. Default is 1. For symbols of Type HATCH, the SIZE is the distance between hatched lines. For its use with hatched lines, see Example#8 in the SYMBOL examples.", + titulo:"Minsize",id:"minsize",value:dados.minsize,tipo:"text"}, + {ajuda:"Maximum size in pixels to draw a symbol. Default is 50.", + titulo:"Maxsize",id:"maxsize",value:dados.maxsize,tipo:"text"}, + {ajuda:"Offset values for shadows, hollow symbols, etc ...", + titulo:"Offsetx",id:"offsetx",value:dados.offsetx,tipo:"text"}, + {ajuda:"Offset values for shadows, hollow symbols, etc ...", + titulo:"Offsety",id:"offsety",value:dados.offsety,tipo:"text"}, + {ajuda:"Should TrueType fonts and Cartoline symbols be antialiased.", + titulo:"Antialias",id:"antialias",value:dados.antialias,tipo:"text"}, + {ajuda:"Minimum width in pixels to draw the line work.", + titulo:"Minwidth",id:"minwidth",value:dados.minwidth,tipo:"text"}, + {ajuda:"Maximun width in pixels to draw the line work.", + titulo:"Maxwidth",id:"maxwidth",value:dados.maxwidth,tipo:"text"}, + {ajuda:"Angle, given in degrees, to draw the line work. Default is 0. For symbols of Type HATCH, this is the angle of the hatched lines. For its use with hatched lines, see Example#8 in the SYMBOL examples.", + titulo:"Angle",id:"angle",value:dados.angle,tipo:"text"} + ] + } + var ins = "" + ins += core_geraLinhas(param) + ins += "


" + $i("editor_bd").innerHTML = ins + var temp = function() + {salvarDadosEditor('estilo',dados.codigoMap,dados.codigoLayer,dados.indiceClasse,dados.indiceEstilo)} + new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }}); +} function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) { if(tipo == "conexao") @@ -919,6 +1041,19 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse var prog = "../php/editormapfile.php?funcao=alterarClasseGeral" } + if(tipo == "classeLabel") + { + var campos = new Array("encoding","force","partials","mindistance","minfeaturesize","wrap","antialias","buffer","autoangle","angle","offsety","offsetx","position","maxsize","minsize","size","backgroundshadowsizey","backgroundshadowsizex","shadowsizey","shadowsizex","shadowcolor","outlinecolor","color","backgroundshadowcolor","backgroundcolor","type","font") + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse + var prog = "../php/editormapfile.php?funcao=alterarClasseLabel" + } + if(tipo == "estilo") + { + var campos = new Array("angle","maxwidth","minwidth","width","outlinecolor","backgroundcolor","antialias","offsety","offsetx","maxsize","minsize","size","color","symbolname") + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo + var prog = "../php/editormapfile.php?funcao=alterarEstilo" + } + for (i=0;i

" + ins += "


" return(ins) } function excluiLinha(id,row) diff --git a/admin/js/menutemas.js b/admin/js/menutemas.js deleted file mode 100644 index 10d3518..0000000 --- a/admin/js/menutemas.js +++ /dev/null @@ -1,493 +0,0 @@ -/* -Title: Menutemas - -Funções javascript utilizadas no sistema de administração do menu de temas - -File: i3geo/admin/menutemas.js - -About: Licença - -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet - -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br - -Este programa é software livre; você pode redistribuí-lo -e/ou modificá-lo sob os termos da Licença Pública Geral -GNU conforme publicada pela Free Software Foundation; -tanto a versão 2 da Licença. -Este programa é distribuído na expectativa de que seja útil, -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. -Consulte a Licença Pública Geral do GNU para mais detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral do -GNU junto com este programa; se não, escreva para a -Free Software Foundation, Inc., no endereço -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. -*/ -/* -Function: iniciaAdmin - -Inicializa as variáveis globais e checa o cadastro do editor do sistema de administração -*/ -function iniciaAdmin() -{ - verificaEditores() -} -/* -Function: importarXmlMenu - -Importa um arquivo xml para o banco de dados. - -O xml deve ser estruturado no padrão menutemas.xml -*/ -function importarXmlMenu() -{ - $i("resultado").innerHTML = $mensagemAguarde - var retorna = function(retorno) - {$i("resultado").innerHTML = retorno.data} - var p = "../php/menutemas.php?funcao=importarXmlMenu&nomemenu="+$i("nome").value+"&xml="+$i("arquivo").value; - cPaint.call(p,"",retorna); -} -/* -Function: montaParametros - -Monta o html com os parametros e os divs que receberão os dados dos formulários. - -Para cada registro na variável $parametrs, é montado um formulário. -*/ -function montaParametros() -{ - var ins = "" - for (i=0;i<$parametros.simples.length;i++) - { - ins += "
"+$parametros.simples[i].cabeca+"" - ins += "

" - ins += " Filtro:

" - ins += "

" - ins += "
" - ins += "

"+$parametros.simples[i].mensagem+"

" - ins += "

" - ins += "

" - } - document.body.innerHTML += ins - $i("aguarde").style.display="none" - //pegaParametros() -} -/* -Function: pegaParametros - -Pega os parâmetros do mapfiles.php - -*/ -function pegaParametros(tipo) -{ - if(tipo == "perfis" || arguments.length == 0 && $i("perfis")) - { - var retornaPerfis = function(retorno) - { - var r = retorno.data - var ins = "
Descrição do banco padrão (SQLITE)
Gera as miniaturas (thumbnails) para os temas existentes no diretório i3geo/temas
Ver xml com a árvore de temas
Ver xml com a árvore de temas
Ver xml com os Atlas
Ver xml com os sistemas utilizados na ferramenta de identificação
Ver xml com a lista de mapas
"; - for (i=0;i" - ins += "" - ins += "" - ins += "" - } - ins += "
Nome
" - ins += "
" - ins += "
" - $i("perfis").innerHTML = ins; - } - var p = "../php/menutemas.php?funcao=pegaPerfis"; - cPaint.call(p,"pegaPerfis",retornaPerfis); - } - if(tipo == "tags" || arguments.length == 0 && $i("tags")) - { - var retornaTags = function(retorno) - { - var r = retorno.data - var ins = ""; - for (i=0;i" - ins += "" - ins += "" - ins += "" - } - ins += "
Nome
" - ins += "
" - ins += "
" - $i("tags").innerHTML = ins; - } - var p = "../php/menutemas.php?funcao=pegaTags"; - cPaint.call(p,"pegaTags",retornaTags); - } - if(tipo == "menus" || arguments.length == 0 && $i("menus")) - { - var retornaMenus = function(retorno) - { - var r = retorno.data - var ins = ""; - for (i=0;i" - ins += "" - ins += "" - ins += "" - ins += "" - ins += "" - ins += "" - var idtemp = 'perfilmenu_'+r[i].id_menu - ins += "" - ins += "" - } - ins += "
PublicadoNomeDescriçãoAbertoPerfil
" - ins += "
" - $i("menus").innerHTML = ins; - } - var p = "../php/menutemas.php?funcao=pegaMenus"; - cPaint.call(p,"pegaMenus",retornaMenus); - } - if(tipo == "grupos" || arguments.length == 0 && $i("grupos")) - { - var retornaGrupos = function(retorno) - { - var r = retorno.data - var ins = ""; - for (i=0;i" - var temp = montaDivTemas(r[j]) - ins += temp+"" - } - $i("temas").innerHTML = ins; - ativaLegenda() - } - var p = "../php/menutemas.php?funcao=pegaTemas&filtro="+$i("filtro").value; - cPaint.call(p,"pegaTemas",retornaTemas); - } - - if(tipo == "arvore" || arguments.length == 0 && $i("arvore")) - { - var retornaArvore = function(retorno) - { - var r = retorno.data - var ins = "
NomeDescrição
"; - for (i=0;i" - ins += "" - ins += "" - ins += "" - } - ins += "
NomeDescrição
" - $i("subgrupos").innerHTML = ins; - } - var p = "../php/menutemas.php?funcao=pegaSubXGrupos"; - cPaint.call(p,"pegaSubXGrupos",retornaSubXGrupos); - } -} -/* -Function: montaOpcoes -*/ -function montaOpcoes(prefixo,id,nome,desc,opc) -{ - var ins = "" - ins += "
" - ins += "
" - ins += "" - ins += "" - return (ins) -} -/* -Function: montaDivTemas - -Preenche a div com os dados de um tema específico na edição da lista de temas - -Parameters: - -i - objeto json com os dados para montar o formulário -*/ -function montaDivTemas(i) -{ - var ins = "
+- "+i.nome_tema+"" - ins += "
"; - var param = { - "linhas":[ - {titulo:"Nome do tema",prefixoid:"nometema_",id:"id_tema",valor:"nome_tema"}, - {titulo:"Descrição",prefixoid:"desctema_",id:"id_tema",valor:"desc_tema"}, - {titulo:"Link para a fonte",prefixoid:"linktema_",id:"id_tema",valor:"link_tema"} - ] - } - ins += (geraLinhas(i,param,2)); - - ins += "" - - ins += "" - - ins += "" - - ins += "" - - ins += "" - - ins += "
Tags (separe com espaço):" - ins += "" - ins += "
Tipo:" - ins += "
Permite acesso via WMS/WFS?" - ins += "
Permite o download na aplicação datadownload.htm?" - ins += "
Permite acesso via kml?" - ins += "
" - ins += ""; - ins += "" - ins += "
" - - ins += "
" - return(ins) -} -function registraTag(id,tag) -{ - var tags = $i(id).value - if(tag == "") - $i(id).value = tag - else - $i(id).value = $i(id).value+" "+tag -} - -/* -Function: alterar - -Altera o valor de uma variável -*/ -function alterar(prefixo,id) -{ - //if(confirm("Você realmente quer fazer isso?")) - //{ - var retorna = function() - {pegaParametros(prefixo);} - if(prefixo == "perfis") - { - if (id != "") - { - var nome = $i("nomeperfil_"+id).value - } - else - { - var nome = ""; - } - $i(prefixo).innerHTML =$mensagemAguarde - var p = "../php/menutemas.php?funcao=alteraPerfis&perfil="+nome+"&id="+id; - } - if(prefixo == "tags") - { - if (id != "") - { - var nome = $i("nometag_"+id).value - } - else - { - var nome = ""; - } - $i(prefixo).innerHTML =$mensagemAguarde - var p = "../php/menutemas.php?funcao=alteraTags&nome="+nome+"&id="+id; - //window.open(p) - } - if(prefixo == "menus") - { - if (id != "") - { - var nome = $i("nomemenu_"+id).value - var desc = $i("descmenu_"+id).value - var aberto = $i("abertomenu_"+id).value - var perfil = $i("perfilmenu_"+id).value - var publicado_menu = $i("publicadomenu_"+id).value - if(nome == "null"){var nome = "";} - if(desc == "null"){var desc = "";} - if(aberto == "null"){var aberto = "";} - if(perfil == "null"){var perfil = "";} - } - else - { - var nome = ""; - var desc = ""; - var aberto = ""; - var perfil = ""; - var publicado_menu = ""; - } - $i(prefixo).innerHTML =$mensagemAguarde - var p = "../php/menutemas.php?funcao=alteraMenus&publicado_menu="+publicado_menu+"&perfil="+perfil+"&nome="+nome+"&desc="+desc+"&id="+id+"&aberto="+aberto; - } - if(prefixo == "grupos") - { - if (id != "") - { - var nome = $i("nomegrupo_"+id).value - var desc = $i("descgrupo_"+id).value - if(nome == "null"){var nome = "";} - if(desc == "null"){var desc = "";} - } - else - { - var nome = ""; - var desc = ""; - } - $i(prefixo).innerHTML =$mensagemAguarde - var p = "../php/menutemas.php?funcao=alteraGrupos&nome="+nome+"&desc="+desc+"&id="+id; - } - if(prefixo == "subgrupos") - { - if (id != "") - { - var nome = $i("nomesubgrupo_"+id).value - var desc = $i("descsubgrupo_"+id).value - if(nome == "null"){var nome = "";} - if(desc == "null"){var desc = "";} - } - else - { - var nome = ""; - var desc = ""; - } - $i(prefixo).innerHTML =$mensagemAguarde - var p = "../php/menutemas.php?funcao=alteraSubGrupos&nome="+nome+"&desc="+desc+"&id="+id; - } - if(prefixo == "temas") - { - if (id != "") - { - var nome = $i("nometema_"+id).value - var codigo = $i("codigotema_"+id).value - var desc = $i("desctema_"+id).value - var tipoa = $i("tipoatema_"+id).value - var link = $i("linktema_"+id).value - var ogc = $i("ogctema_"+id).value - var kml = $i("kmltema_"+id).value - var download = $i("downloadtema_"+id).value - var tags = $i("tagstema_"+id).value - if(nome == "null"){var nome = "";} - if(codigo == "null"){var codigo = "";} - if(desc == "null"){var desc = "";} - if(tipoa == "null"){var tipoa = "";} - if(link == "null"){var link = "";} - if(ogc == "null"){var ogc = "";} - if(kml == "null"){var kml = "";} - if(download == "null"){var download = "";} - if(tags == "null"){var tags = "";} - } - else - { - var nome = ""; - var codigo = ""; - var desc = ""; - var link = ""; - var tipoa = ""; - var ogc = ""; - var kml = ""; - var download = ""; - var tags = ""; - } - $i(prefixo).innerHTML =$mensagemAguarde - var p = "../php/menutemas.php?funcao=alteraTemas&tags="+tags+"&download="+download+"&kml="+kml+"&ogc="+ogc+"&tipoa="+tipoa+"&desc="+desc+"&link="+link+"&nome="+nome+"&codigo="+codigo+"&id="+id; - } - - cPaint.call(p,"",retorna); - //} -} -/* -Function: excluir - -Exclui um registro -*/ -function excluir(prefixo,id) -{ - if(confirm("Você realmente quer fazer isso?")) - { - var retorna = function() - {pegaParametros(prefixo);} - $i(prefixo).innerHTML = $mensagemAguarde - var p = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela="+prefixo; - cPaint.call(p,"",retorna); - } -} - -/* -Function: pegaMapfiles - -Pega a lista de mapfiles existentes no i3geo - -Parameters: - -retorna - nome da função que processará o resultado -*/ -function pegaMapfiles(retorna) -{ - var cPaint = new cpaint(); - //cPaint.set_async("true"); - cPaint.set_response_type("JSON"); - var p = "../php/menutemas.php?funcao=listaMapsTemas"; - cPaint.call(p,"listaMapsTemas",retorna); -} diff --git a/admin/js/temasold.js b/admin/js/temasold.js index 69bb6b4..254b543 100644 --- a/admin/js/temasold.js +++ b/admin/js/temasold.js @@ -59,88 +59,13 @@ function pegaClasses(codigoMap,codigoLayer) ins += "
+- Label (para ativar, defina LABELITEM em caract. gerais)
" var param = { "linhas":[ - {texto:"Color to draw text with.", - titulo:"color",prefixoid:"label_color_",id:codigoLayer+"_"+d.id,valor:"label.color"}, - {texto:"Text size. Use integer to give the size in pixels of your TrueType font based label, or any of theother 5 listed keywords to bitmap fonts.", - titulo:"size",prefixoid:"label_size_",id:codigoLayer+"_"+d.id,valor:"label.size"}, - {texto:"Position of the label relative to the labeling point (layers only). First letter is Y position, second letter is X position. Auto tells MapServer to calculate a label position that will not interfere with other labels. With points and polygons, MapServer selects from the 8 outer positions (i.e. excluding cc). With lines, it only uses lc or uc, until it finds a position that doesn't collide with labels that have already been drawn. If all positions cause a conflict, then the label is not drawn (Unless the label's FORCE a parameter is set to true). Auto placement is only available with cached labels.", - titulo:"position",prefixoid:"label_position_",id:codigoLayer+"_"+d.id,valor:"label.position"}, - {texto:"Padding, in pixels, around labels. Useful for maintaining spacing around text to enhance readability. Available only for cached labels. Default is 0.", - titulo:"buffer",prefixoid:"label_buffer_",id:codigoLayer+"_"+d.id,valor:"label.buffer"} ] } - ins += "
+- font
" - ins += "

Font alias (as defined in the FONTSET) to use for labeling.

" - ins += "

" - ins += "" - ins += "

" - - ins += "
+- type
" - ins += "

Type of font to use. Generally bitmap fonts are faster to draw then TrueType fonts. However,TrueType fonts are scalable and available in a variety of faces. Be sure to set the FONT parameter ifyou select TrueType.

" - ins += "

" - ins += "" - ins += "

" - - ins += "
+- partials
" - ins += "

Can text run off the edge of the map? Default is true.

" - ins += "

" - ins += "" - ins += "

" - - ins += "
+- force
" - ins += "

Forces labels for a particular class on, regardless of collisions. Available only for cached labels. Default is false.

" - ins += "

" - ins += "" - ins += "

" ins += (geraLinhas2(d.dados,param,"salvarClasseLabel")); var param = { "linhas":[ - {texto:"Color to draw a background rectangle (i.e. billboard). Off by default.", - titulo:"backgroundcolor",prefixoid:"label_backgroundcolor_",id:codigoLayer+"_"+d.id,valor:"label.backgroundcolor"}, - {texto:"Color to draw a background rectangle (i.e. billboard) shadow. Off by default.", - titulo:"backgroundshadowcolor",prefixoid:"label_backgroundshadowcolor_",id:codigoLayer+"_"+d.id,valor:"label.backgroundshadowcolor"}, - {texto:"Color to draw a one pixel outline around the text.", - titulo:"outlinecolor",prefixoid:"label_outlinecolor_",id:codigoLayer+"_"+d.id,valor:"label.outlinecolor"}, - {texto:"Color of drop shadow.", - titulo:"shadowcolor",prefixoid:"label_shadowcolor_",id:codigoLayer+"_"+d.id,valor:"label.shadowcolor"}, - {texto:"Shadow offset in pixels.", - titulo:"shadowsizex",prefixoid:"label_shadowsizex_",id:codigoLayer+"_"+d.id,valor:"label.shadowsizex"}, - {texto:"Shadow offset in pixels.", - titulo:"shadowsizey",prefixoid:"label_shadowsizey_",id:codigoLayer+"_"+d.id,valor:"label.shadowsizey"}, - {texto:"How far should the background rectangle be offset? Default is 1.", - titulo:"backgroundshadowsizex",prefixoid:"label_backgroundshadowsizex_",id:codigoLayer+"_"+d.id,valor:"label.backgroundshadowsizex"}, - {texto:"How far should the background rectangle be offset? Default is 1.", - titulo:"backgroundshadowsizey",prefixoid:"label_backgroundshadowsizey_",id:codigoLayer+"_"+d.id,valor:"label.backgroundshadowsizey"}, - {texto:"Minimum font size to use when scaling text (pixels). Default is 4.", - titulo:"minsize",prefixoid:"label_minsize_",id:codigoLayer+"_"+d.id,valor:"label.minsize"}, - {texto:"Maximum font size to use when scaling text (pixels). Default is 256.", - titulo:"maxsize",prefixoid:"label_maxsize_",id:codigoLayer+"_"+d.id,valor:"label.maxsize"}, - {texto:"Offset values for labels, relative to the lower left hand corner of the label and the label point. Given in pixels. In the case of rotated text specify the values as if all labels are horizontal and any rotation will be compensated for.", - titulo:"offsetx",prefixoid:"label_offsetx_",id:codigoLayer+"_"+d.id,valor:"label.offsetx"}, - {texto:"Offset values for labels, relative to the lower left hand corner of the label and the label point. Given in pixels. In the case of rotated text specify the values as if all labels are horizontal and any rotation will be compensated for.", - titulo:"offsety",prefixoid:"label_offsety_",id:codigoLayer+"_"+d.id,valor:"label.offsety"}, - {texto:"Angle, given in degrees, to draw the label or AUTO to allow the software to compute the angle, AUTO is valid for LINE layers only. FOLLOW was introduced in version 4.10 and tells map server to compute a curved label for appropriate linear features", - titulo:"angle",prefixoid:"label_angle_",id:codigoLayer+"_"+d.id,valor:"label.angle"}, - {texto:"Should text be antialiased? Note that this requires more available colors, decreased drawing performance, and results in slightly larger output images.", - titulo:"antialias",prefixoid:"label_antialias_",id:codigoLayer+"_"+d.id,valor:"label.antialias"}, - {texto:"Character that represents an end-of-line condition in label text, thus resulting in a multi-line label.", - titulo:"wrap",prefixoid:"label_wrap_",id:codigoLayer+"_"+d.id,valor:"label.wrap"}, - {texto:"Minimum size a feature must be to be labeled. Given in pixels. For line data the overall length of the displayed line is used, for polygons features the smallest dimension of the bounding box is used. Auto keyword tells MapServer to only label features that are larger than their corresponding label. Available for cached labels only.", - titulo:"minfeaturesize",prefixoid:"label_minfeaturesize_",id:codigoLayer+"_"+d.id,valor:"label.minfeaturesize"}, - {texto:"Minimum distance between duplicate labels. Given in pixels.", - titulo:"mindistance",prefixoid:"label_mindistance_",id:codigoLayer+"_"+d.id,valor:"label.mindistance"}, - {texto:"Supported encoding format to be used for labels. If the format is not supported, the label will not be drawn. Requires the iconv library (present on most systems). The library is always detected if present on the system, but if not the label will not be drawn. Required for displaying international characters in MapServer. More information can be found at: http://www.foss4g.org/FOSS4G/MAPSERVER/mpsnf-i18n-en.html.", - titulo:"encoding",prefixoid:"label_encoding_",id:codigoLayer+"_"+d.id,valor:"label.encoding"} ] } ins += "
+- Mais...
" @@ -165,67 +90,7 @@ function pegaClasses(codigoMap,codigoLayer) } function pegaEstilos(codigoMap,codigoLayer) { - var retorna = function(retorno) - { - var nc = retorno.data.length - for(c=0;c" - ins += (geraLinhas2(d,param,"salvarEstilo")); - - var param = { - "linhas":[ - {texto:"Height, in pixels, of the symbol/pattern to be used. Only useful with scalable symbols. Default is 1. For symbols of Type HATCH, the SIZE is the distance between hatched lines. For its use with hatched lines, see Example#8 in the SYMBOL examples.", - titulo:"minsize",prefixoid:"",id:"minsize_"+preid,valor:"minsize"}, - {texto:"Maximum size in pixels to draw a symbol. Default is 50.", - titulo:"maxsize",prefixoid:"",id:"maxsize_"+preid,valor:"maxsize"}, - {texto:"Offset values for shadows, hollow symbols, etc ...", - titulo:"offsetx",prefixoid:"",id:"offsetx_"+preid,valor:"offsetx"}, - {texto:"Offset values for shadows, hollow symbols, etc ...", - titulo:"offsety",prefixoid:"",id:"offsety_"+preid,valor:"offsety"}, - {texto:"Should TrueType fonts and Cartoline symbols be antialiased.", - titulo:"antialias",prefixoid:"",id:"antialias_"+preid,valor:"antialias"}, - {texto:"Minimum width in pixels to draw the line work.", - titulo:"minwidth",prefixoid:"",id:"minwidth_"+preid,valor:"minwidth"}, - {texto:"Angle, given in degrees, to draw the line work. Default is 0. For symbols of Type HATCH, this is the angle of the hatched lines. For its use with hatched lines, see Example#8 in the SYMBOL examples.", - titulo:"angle",prefixoid:"",id:"angle_"+preid,valor:"angle"}, - {texto:"For MapServer versions <5, this is the attribute/field that stores the angle to be used in rendering. Angle is given in degrees with 0 meaning no rotation.", - titulo:"angleitem",prefixoid:"",id:"angleitem_"+preid,valor:"angleitem"}, - {texto:"For MapServer versions <5, this is the attribute/field that stores the size to be used in rendering. Value is given in pixels.", - titulo:"sizeitem",prefixoid:"",id:"sizeitem_"+preid,valor:"sizeitem"} - ] - } - ins += "
+- Mais...
" - ins += (geraLinhas2(d,param,"salvarEstilo")); - ins += "
" - ins += "
" - $i(divestilos).innerHTML = ins - } - } - ativaLegenda() + } var p = "../php/temas.php?funcao=pegaEstilos&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer; cPaint.call(p,"",retorna); diff --git a/admin/php/admin.php b/admin/php/admin.php index 31185a4..d2be65d 100644 --- a/admin/php/admin.php +++ b/admin/php/admin.php @@ -51,6 +51,7 @@ error_reporting(E_ALL); //carrega o phpmapscript // include_once ($locaplic."/classesphp/carrega_ext.php"); +include_once ($locaplic."/classesphp/funcoes_gerais.php"); // //verifica se o cliente pode editar //se funcao for verificaEditores vai para case específico diff --git a/admin/php/atlas.php b/admin/php/atlas.php index 4a29ff3..04fcd76 100644 --- a/admin/php/atlas.php +++ b/admin/php/atlas.php @@ -29,7 +29,6 @@ File: i3geo/admin/sistemas.php */ include_once("admin.php"); -$cp = new cpaint(); //faz a busca da função que deve ser executada switch ($funcao) { @@ -103,8 +102,8 @@ switch ($funcao) break; case "importarXmlAtlas": - $cp->set_data(importarXmlAtlas()); - $cp->return_data(); + retornaJSON(importarXmlAtlas()); + exit; break; } function movimentaNo() diff --git a/admin/php/editormapfile.php b/admin/php/editormapfile.php index b4121c9..03c8351 100644 --- a/admin/php/editormapfile.php +++ b/admin/php/editormapfile.php @@ -31,7 +31,7 @@ File: i3geo/admin/sistemas.php include_once("admin.php"); include_once("../../ms_configura.php"); include_once("../../classesphp/funcoes_gerais.php"); -error_reporting(0); +error_reporting(E_ALL); //faz a busca da função que deve ser executada switch ($funcao) { @@ -97,6 +97,15 @@ switch ($funcao) retornaJSON(listaEstilos()); exit; break; + case "pegaEstilo": + retornaJSON(pegaEstilo()); + exit; + break; + case "alterarEstilo": + alterarEstilo(); + retornaJSON(pegaEstilo()); + exit; + break; case "pegaConexao": retornaJSON(pegaConexao()); exit; @@ -138,6 +147,61 @@ switch ($funcao) retornaJSON(pegaClasseLabel()); exit; break; + case "alterarClasseLabel": + alterarClasseLabel(); + retornaJSON(pegaClasseLabel()); + exit; + break; + case "movimentaNo": + $res = sobeDesce(); + retornaJSON($res); + exit; + break; +} +function sobeDesce() +{ + global $movimento,$tipo,$codigoMap,$codigoLayer,$indiceClasse,$indiceEstilo,$locaplic; + $mapfile = $locaplic."/temas/".$codigoMap.".map"; + $mapa = ms_newMapObj($mapfile); + $layer = $mapa->getlayerbyname($codigoLayer); + if($movimento == "sobe") + { + if($tipo == "layer") + { + $indice = $layer->index; + $mapa->moveLayerUp($indice); + } + if($tipo == "classe") + { + $layer->moveclassup($indiceClasse); + } + if($tipo == "estilo") + { + $classe = $layer->getclass($indiceClasse); + $classe->movestyleup($indiceEstilo); + } + + } + if($movimento == "desce") + { + if($tipo == "layer") + { + $indice = $layer->index; + $mapa->moveLayerDown($indice); + } + if($tipo == "classe") + { + $layer->moveclassdown($indiceClasse); + } + if($tipo == "estilo") + { + $classe = $layer->getclass($indiceClasse); + $classe->movestyledown($indiceEstilo); + } + } + $mapa->save($mapfile); + removeCabecalho($mapfile); + return "ok"; } function criarNovoMap() { @@ -345,18 +409,7 @@ function pegaMetadados() $dados["aplicaextensao"] = $layer->getmetadata("aplicaextensao"); $dados["codigoMap"] = $codigoMap; $dados["codigoLayer"] = $codigoLayer; - $colunas = ""; - if($layer->type < 3) - { - if(@$layer->open()) - { - $layer->open(); - $colunas = implode(", ",$layer->getitems()); - $layer->close(); - } - } - $dados["colunas"] = $colunas; - + $dados["colunas"] = implode(" ,",pegaItens($layer)); return $dados; } function alterarMetadados() @@ -417,21 +470,11 @@ function pegaGeral() $dados["sizeunits"] = $layer->sizeunits; $dados["projection"] = $layer->getProjection(); $dados["name"] = $layer->name; - $colunas = ""; - if($layer->type < 3) - { - if(@$layer->open()) - { - $layer->open(); - $colunas = implode(", ",$layer->getitems()); - $layer->close(); - } - } if($dados["projection"] == "null") $dados["projection"] = ""; - $dados["colunas"] = $colunas; $dados["codigoMap"] = $codigoMap; $dados["codigoLayer"] = $codigoLayer; + $dados["colunas"] = implode(" ,",pegaItens($layer)); return $dados; } function alterarGeral() @@ -496,16 +539,7 @@ function pegaClasseGeral() $dados["codigoMap"] = $codigoMap; $dados["codigoLayer"] = $codigoLayer; $dados["indiceClasse"] = $indiceClasse; - $colunas = ""; - if($layer->type < 3) - { - if(@$layer->open()) - { - $layer->open(); - $colunas = implode(", ",$layer->getitems()); - $layer->close(); - } - } + $dados["colunas"] = implode(" ,",pegaItens($layer)); return $dados; } function alterarClasseGeral() @@ -569,144 +603,118 @@ function pegaClasseLabel() $dados["codigoMap"] = $codigoMap; $dados["codigoLayer"] = $codigoLayer; $dados["indiceClasse"] = $indiceClasse; - $colunas = ""; - if($layer->type < 3) - { - if(@$layer->open()) - { - $layer->open(); - $colunas = implode(", ",$layer->getitems()); - $layer->close(); - } - } - return $dados; -} - - - - - - - - - - - - - - - - - - -function pegaFontes() -{ - $arq = "../../symbols/fontes.txt"; + $dados["colunas"] = implode(" ,",pegaItens($layer)); + $arq = $locaplic."/symbols/fontes.txt"; $h = fopen ($arq,"r"); while ($i = fscanf ($h, "%s\t%s\t")) { list ($f,$g) = $i; $nome[] = $f; } - return $nome; + $dados["fontes"] = $nome; + return $dados; } -function alteraEstilo() +function alterarClasseLabel() { - global $codigoMap,$codigoLayer,$classe,$estilo,$parametro,$valor; - $mapfile = "../../temas/".$codigoMap.".map"; + global $codigoMap,$codigoLayer,$indiceClasse,$locaplic,$autoangle,$encoding,$force,$partials,$mindistance,$minfeaturesize,$wrap,$antialias,$buffer,$angle,$offsety,$offsetx,$position,$maxsize,$minsize,$size,$backgroundshadowsizey,$backgroundshadowsizex,$shadowsizey,$shadowsizex,$shadowcolor,$outlinecolor,$color,$backgroundshadowcolor,$backgroundcolor,$type,$font; + $dados = array(); + $mapfile = $locaplic."/temas/".$codigoMap.".map"; $mapa = ms_newMapObj($mapfile); $layer = $mapa->getlayerbyname($codigoLayer); - $classe = $layer->getclass($classe); - $estilo = $classe->getstyle($estilo); - $ok = false; - $cor = ""; - switch ($parametro) - { - case "backgroundcolor": - $cor = $estilo->backgroundcolor; - $ok = true; - break; - case "color": - $cor = $estilo->color; - $ok = true; - break; - case "outlinecolor": - $cor = $estilo->outlinecolor; - $ok = true; - break; - default: - if(!$ok)$estilo->set($parametro,$valor); - } - if ($cor != "") + $classe = $layer->getclass($indiceClasse); + $label = $classe->label; + if ($label != "") { - $c = explode(",",$valor); - if(count($c) < 3) - $c = explode(" ",$valor); - $cor->setrgb($c[0],$c[1],$c[2]); + $label->set("font",$font); + $label->set("type",$type); + corE($label,$backgroundcolor,"backgroundcolor"); + corE($label,$backgroundshadowcolor,"backgroundshadowcolor"); + corE($label,$color,"color"); + corE($label,$outlinecolor,"outlinecolor"); + corE($label,$shadowcolor,"shadowcolor"); + $label->set("shadowsizex",$shadowsizex); + $label->set("shadowsizey",$shadowsizey); + $label->set("backgroundshadowsizex",$backgroundshadowsizex); + $label->set("backgroundshadowsizey",$backgroundshadowsizey); + $label->set("size",$size); + $label->set("minsize",$minsize); + $label->set("maxsize",$maxsize); + $label->set("position",$position); + $label->set("offsetx",$offsetx); + $label->set("offsety",$offsety); + $label->set("angle",$angle); + $label->set("autoangle",$autoangle); + $label->set("buffer",$buffer); + $label->set("antialias",$antialias); + $label->set("wrap",$wrap); + $label->set("minfeaturesize",$minfeaturesize); + //$label->set("autominfeaturesize",$autominfeaturesize); + $label->set("mindistance",$mindistance); + $label->set("partials",$partials); + $label->set("force",$force); + $label->set("encoding",$encoding); + $label->set("autoangle",$autoangle); } $mapa->save($mapfile); removeCabecalho($mapfile); return "ok"; } - -function alteraClasseLabel() +function pegaEstilo() { - global $codigoMap,$codigoLayer,$classe,$parametro,$valor; - $mapfile = "../../temas/".$codigoMap.".map"; + global $codigoMap,$codigoLayer,$indiceClasse,$indiceEstilo,$locaplic; + $dados = array(); + $mapfile = $locaplic."/temas/".$codigoMap.".map"; $mapa = ms_newMapObj($mapfile); $layer = $mapa->getlayerbyname($codigoLayer); - $classe = $layer->getclass($classe); - $label = $classe->label; - $ok = false; - $cor = ""; - switch ($parametro) - { - case "backgroundcolor": - $cor = $label->backgroundcolor; - $ok = true; - break; - case "backgroundshadowcolor": - $cor = $label->backgroundshadowcolor; - $ok = true; - break; - case "color": - $cor = $label->color; - $ok = true; - break; - case "outlinecolor": - $cor = $label->outlinecolor; - $ok = true; - break; - case "shadowcolor": - $cor = $label->shadowcolor; - $ok = true; - break; - case "shadowsizex": - $cor = $label->shadowsizex; - $ok = true; - break; - case "shadowsizey": - $cor = $label->shadowsizey; - $ok = true; - break; - case "backgroundshadowsizex": - $cor = $label->backgroundshadowsizex; - $ok = true; - break; - case "backgroundshadowsizey": - $cor = $label->backgroundshadowsizey; - $ok = true; - break; - default: - if(!$ok)$label->set($parametro,$valor); - } - if ($cor != "") - { - $c = explode(",",$valor); - if(count($c) < 3) - $c = explode(" ",$valor); - $cor->setrgb($c[0],$c[1],$c[2]); - } + $nclasses = $layer->numclasses; + $classe = $layer->getclass($indiceClasse); + $estilo = $classe->getstyle($indiceEstilo); + $dados["symbolname"] = $estilo->symbolname; + $dados["color"] = $estilo->color->red.",".$estilo->color->green.",".$estilo->color->blue; + $dados["size"] = $estilo->size; + $dados["minsize"] = $estilo->minsize; + $dados["maxsize"] = $estilo->maxsize; + $dados["offsetx"] = $estilo->offsetx; + $dados["offsety"] = $estilo->offsety; + $dados["antialias"] = $estilo->antialias; + $dados["backgroundcolor"] = $estilo->backgroundcolor->red.",".$estilo->backgroundcolor->green.",".$estilo->backgroundcolor->blue; + $dados["outlinecolor"] = $estilo->outlinecolor->red.",".$estilo->outlinecolor->green.",".$estilo->outlinecolor->blue; + $dados["width"] = $estilo->width; + $dados["minwidth"] = $estilo->minwidth; + $dados["maxwidth"] = $estilo->maxwidth; + $dados["angle"] = $estilo->angle; + $dados["codigoMap"] = $codigoMap; + $dados["codigoLayer"] = $codigoLayer; + $dados["indiceClasse"] = $indiceClasse; + $dados["indiceEstilo"] = $indiceEstilo; + //$dados["opacity"] = $estilo->opacity; + return $dados; +} +function alterarEstilo() +{ + global $codigoMap,$codigoLayer,$indiceClasse,$indiceEstilo,$locaplic,$angle,$maxwidth,$minwidth,$width,$outlinecolor,$backgroundcolor,$antialias,$offsety,$offsetx,$maxsize,$minsize,$size,$color,$symbolname; + $dados = array(); + $mapfile = $locaplic."/temas/".$codigoMap.".map"; + $mapa = ms_newMapObj($mapfile); + $layer = $mapa->getlayerbyname($codigoLayer); + $nclasses = $layer->numclasses; + $classe = $layer->getclass($indiceClasse); + $estilo = $classe->getstyle($indiceEstilo); + $estilo->set("symbolname",$symbolname); + corE($estilo,$color,"color"); + $estilo->set("size",$size); + $estilo->set("minsize",$minsize); + $estilo->set("maxsize",$maxsize); + $estilo->set("offsetx",$offsetx); + $estilo->set("offsety",$offsety); + $estilo->set("antialias",$antialias); + corE($estilo,$backgroundcolor,"backgroundcolor"); + corE($estilo,$outlinecolor,"outlinecolor"); + $estilo->set("width",$width); + $estilo->set("minwidth",$minwidth); + $estilo->set("maxwidth",$maxwidth); + $estilo->set("angle",$angle); + //$estilo->set("opacity",$opacity); $mapa->save($mapfile); removeCabecalho($mapfile); return "ok"; @@ -728,58 +736,30 @@ function removeCabecalho($arq) if(strtoupper(trim($linha)) == "LAYER") {$grava = true;} if($grava) - {$final[] = rtrim($linha, "\r\n") . PHP_EOL;}//$linha."\n";} + {$final[] = rtrim($linha, "\r\n") . PHP_EOL;} } fclose($handle); } $handle = fopen($arq, "w+"); foreach ($final as $f) { - if(($f != "") && ($f != 'FILTERITEM ""') && ($f != 'LABELITEM ""')) + // + //remove resultados em branco + //e grava a linha + // + $teste = strtoupper($f); + $teste = trim($teste); + $teste = str_replace(" ","",$teste); + $teste = str_replace("'","",$teste); + $teste = str_replace('"',"",$teste); + $teste = preg_replace('/[\n\r\t ]*/', '', $teste); + $testar = array("SYMBOL","LABELITEM","FILTERITEM","GROUP","ENCODING","TIP","CLASSE","ITENSDESC","CLASSESNOME","ITENSLINK","ESCALA","CLASSESSIMBOLO","MENSAGEM","EXTENSAO","CLASSESITEM","ESCONDIDO","CLASSESCOR","DOWNLOAD","CLASSESTAMANHO","ITENS","TEMA","APLICAEXTENSAO","IDENTIFICA"); + $passou = true; + foreach ($testar as $t) + {if($teste == $t){$passou = false;}} + if($passou) fwrite($handle,$f); } fclose($handle); } - -function pegaDadosEstilo() -{ - global $codigoMap,$codigoLayer; - $dados = array(); - $mapfile = "../../temas/".$codigoMap.".map"; - $mapa = ms_newMapObj($mapfile); - $layer = $mapa->getlayerbyname($codigoLayer); - $nclasses = $layer->numclasses; - for($i=0;$i<$nclasses;++$i) - { - $classe = $layer->getclass($i); - $numestilos = $classe->numstyles; - $estilos = array(); - for($j=0;$j<$numestilos;++$j) - { - $estilo = $classe->getstyle($j); - $temp["symbolname"] = $estilo->symbolname; - $temp["color"] = $estilo->color->red.",".$estilo->color->green.",".$estilo->color->blue; - $temp["size"] = $estilo->size; - $temp["minsize"] = $estilo->minsize; - $temp["maxsize"] = $estilo->maxsize; - $temp["offsetx"] = $estilo->offsetx; - $temp["offsety"] = $estilo->offsety; - $temp["antialias"] = $estilo->antialias; - $temp["backgroundcolor"] = $estilo->backgroundcolor->red.",".$estilo->backgroundcolor->green.",".$estilo->backgroundcolor->blue; - $temp["outlinecolor"] = $estilo->outlinecolor->red.",".$estilo->outlinecolor->green.",".$estilo->outlinecolor->blue; - $temp["width"] = $estilo->width; - $temp["minwidth"] = $estilo->minwidth; - $temp["maxwidth"] = $estilo->maxwidth; - $temp["angle"] = $estilo->angle; - $temp["angleitem"] = $estilo->angleitem; - $temp["sizeitem"] = $estilo->sizeitem; - $temp["minvalue"] = $estilo->minvalue; - $temp["maxvalue"] = $estilo->maxvalue; - $estilos[] = array("estilo"=>$j,"dados"=>$temp); - } - $dados[] = array("classe"=>$i,"estilos"=>$estilos); - } - return $dados; -} - ?> \ No newline at end of file diff --git a/admin/php/identifica.php b/admin/php/identifica.php index d6ff910..9adc26c 100644 --- a/admin/php/identifica.php +++ b/admin/php/identifica.php @@ -28,7 +28,6 @@ File: i3geo/admin/identifica.php */ include_once("admin.php"); -$cp = new cpaint(); //faz a busca da função que deve ser executada switch ($funcao) { @@ -57,8 +56,8 @@ switch ($funcao) break; case "importarXmlI": - $cp->set_data(importarXmlI()); - $cp->return_data(); + retornaJSON(importarXmlI()); + exit;; break; } /* diff --git a/admin/php/mapas.php b/admin/php/mapas.php index bd0ecc0..e2f7514 100644 --- a/admin/php/mapas.php +++ b/admin/php/mapas.php @@ -31,12 +31,6 @@ include_once("admin.php"); //faz a busca da função que deve ser executada switch ($funcao) { - //verifica os editores - case "verificaEditores": - $cp->set_data(verificaEditores($editores)); - $cp->return_data(); - break; - case "pegaMapas": retornaJSON(pegaDados('SELECT id_mapa,nome_mapa,ordem_mapa from i3geoadmin_mapas order by ordem_mapa')); exit; @@ -61,8 +55,8 @@ switch ($funcao) break; case "importarXmlMapas": - $cp->set_data(importarXmlMapas()); - $cp->return_data(); + retornaJSON(importarXmlMapas()); + exit; break; } /* diff --git a/admin/php/menutemas.php b/admin/php/menutemas.php index 418748f..0138afe 100644 --- a/admin/php/menutemas.php +++ b/admin/php/menutemas.php @@ -39,8 +39,8 @@ switch ($funcao) break; case "importarXmlMenu": - $cp->set_data(importarXmlMenu()); - $cp->return_data(); + retornaJSON(importarXmlMenu()); + exit; break; case "pegaMenus": @@ -57,6 +57,7 @@ switch ($funcao) case "pegaPerfis": $dados = pegaDados('SELECT * from i3geoadmin_perfis order by perfil'); + if(count($dados) == 0){$dados[] = "nenhum";} retornaJSON($dados); break; @@ -777,10 +778,13 @@ function importarXmlMenu() //importa os temas // $temasExistentes = array(); - $q = $dbhw->query("select * from i3geoadmin_subgrupos"); + $q = $dbhw->query("select * from i3geoadmin_temas"); $resultado = $q->fetchAll(); foreach($resultado as $r) - {$temasExistentes[$r["codigo_tema"]] = 0;} + { + if($r["codigo_tema"]) + $temasExistentes[$r["codigo_tema"]] = 0; + } foreach($xml->TEMA as $tema) { $nome = ixml($tema,"TNOME"); @@ -896,7 +900,7 @@ function importarXmlMenu() $listaDeTags = array_unique($listaDeTags); foreach ($listaDeTags as $t) { - if(!(verificaDuplicados("select * from i3geoadmin_tags where nome = '$t'",$dbh))) + if($t != "" && !(verificaDuplicados("select * from i3geoadmin_tags where nome = '$t'",$dbh))) $dbhw->query("INSERT INTO i3geoadmin_tags (nome) VALUES ('$t')"); } $dbhw = null; diff --git a/admin/php/parsemapfile.php b/admin/php/parsemapfile.php index a5234a4..75d50a7 100644 --- a/admin/php/parsemapfile.php +++ b/admin/php/parsemapfile.php @@ -321,6 +321,7 @@ function mapfile() $dstring = $d[0]; $dstring = str_replace("the_geom","",$dstring); $dstring = str_replace("*",$colunas,$dstring); + $xml .= "$colunas"; $xml .= "\n"; $string = preg_replace('/.*from\s*(.+).*/i', '\1', $d[0]); $s = explode("WHERE",$string); diff --git a/admin/php/sistemas.php b/admin/php/sistemas.php index b33fe1b..9ea251e 100644 --- a/admin/php/sistemas.php +++ b/admin/php/sistemas.php @@ -28,7 +28,6 @@ File: i3geo/admin/sistemas.php */ include_once("admin.php"); -$cp = new cpaint(); //faz a busca da função que deve ser executada switch ($funcao) { @@ -88,8 +87,8 @@ switch ($funcao) break; case "importarXmlSistemas": - $cp->set_data(importarXmlSistemas()); - $cp->return_data(); + retornaJSON(importarXmlSistemas()); + exit; break; } /* diff --git a/admin/php/webservices.php b/admin/php/webservices.php index 6762cac..0a116c0 100644 --- a/admin/php/webservices.php +++ b/admin/php/webservices.php @@ -27,7 +27,7 @@ File: i3geo/admin/webservices.php 19/6/2007 */ -error_reporting(E_ALL); +error_reporting(0); include_once("admin.php"); //faz a busca da função que deve ser executada switch ($funcao) @@ -55,8 +55,8 @@ switch ($funcao) break; case "importarXmlWS": - $cp->set_data(importarXmlWS()); - $cp->return_data(); + retornaJSON(importarXmlWS()); + exit; break; } /* diff --git a/aplicmap/ogc_wmc_output.cml b/aplicmap/ogc_wmc_output.cml new file mode 100644 index 0000000..34aeaaf --- /dev/null +++ b/aplicmap/ogc_wmc_output.cml @@ -0,0 +1,28 @@ + + + + + + + + I3Geo Brasil MMA + + + + + + + + +
+ + + + +
+ +
+
+ + +
diff --git a/aplicmap/ogcws.map b/aplicmap/ogcws.map index 1f0b670..5e5207f 100644 --- a/aplicmap/ogcws.map +++ b/aplicmap/ogcws.map @@ -39,6 +39,7 @@ WEB TEMPLATE "none.htm" METADATA "ows_title" "I3Geo Brasil MMA" + "wms_title" "I3Geo Brasil MMA" "ows_abstract" "Web services gerados da base de dados do I3Geo. Para chamar um tema especificamente, veja o sistema de ajuda, digitando ogc.php?ajuda=" "ows_keywordlist" "" "ows_onlineresource" "" diff --git a/classesphp/funcoes_gerais.php b/classesphp/funcoes_gerais.php index feeeda4..b16a3d4 100644 --- a/classesphp/funcoes_gerais.php +++ b/classesphp/funcoes_gerais.php @@ -1197,13 +1197,20 @@ $layer - objeto layer */ function pegaItens($layer) { - global $locaplic,$imgdir,$dir_tmp; + $sopen = $layer->open(); + if($sopen != MS_FAILURE) + $items = $layer->getItems(); + else + $items = array(); + return $items; +/* if ($layer->type != 3) {$layer->open();} $items = $layer->getItems(); if ($layer->type != 3) {$layer->close();} - return $items; + return $items; +*/ } /* function: buscaRapida diff --git a/menutemas/admin.db b/menutemas/admin.db index c9a8d43..e58e3db 100644 Binary files a/menutemas/admin.db and b/menutemas/admin.db differ diff --git a/menutemas/geopr.xml b/menutemas/geopr.xml index b02d62a..0c5285f 100644 --- a/menutemas/geopr.xml +++ b/menutemas/geopr.xml @@ -6,7 +6,7 @@ Agência Nacional de Energia Elétrica - GSI WMS + ANEEL geopr_aneel_reservatorios Reservat&oacute;rios @@ -259,7 +259,7 @@ geopr_ana_reghidro1 Região Hidrográfica Nível 1 - http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1 + http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1&service=wms WMS rio @@ -267,7 +267,7 @@ geopr_ana_microbacias Micro-bacias - http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1 + http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1&service=wms WMS bacia @@ -275,7 +275,7 @@ geopr_ana_federais Rios Federais - http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1 + http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1&service=wms WMS rio diff --git a/temas/atlas_biomas.map b/temas/atlas_biomas.map index 351ab8e..a6965b5 100644 --- a/temas/atlas_biomas.map +++ b/temas/atlas_biomas.map @@ -7,31 +7,15 @@ FONTSET "../symbols/fontes.txt" METADATA "wms_srs" "EPSG:4291 EPSG:4326" "wms_exceptions_format" "application/vnd.ogc.se_xml" - "tip" "" "CLASSE" "SIM" - "itensdesc" "" - "itenslink" "" - "escala" "" - "classesnome" "" "wms_force_separate_request" "1" "wms_name" "bioma" "formatosinfo" "text/plain,application/vnd.ogc.gml" - "extensao" "" - "mensagem" "" - "classessimbolo" "" - "classesitem" "" - "escondido" "" "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff" "wms_format" "image/png" - "download" "" - "classescor" "" - "classestamanho" "" "wms_connectiontimeout" "30" - "itens" "" "TEMA" "Biomas segundo IBGE-MMA" "wms_server_version" "1.1.0" - "identifica" "" - "aplicaextensao" "" "wms_style" "default" END NAME "atlas_biomas" @@ -44,8 +28,6 @@ FONTSET "../symbols/fontes.txt" NAME "testevvvvv" KEYIMAGE "" END - CLASS - END END END diff --git a/temas/bioma.map b/temas/bioma.map index 77a72e6..a88222e 100644 --- a/temas/bioma.map +++ b/temas/bioma.map @@ -1,207 +1,91 @@ SYMBOLSET ../symbols/simbolos.sym FONTSET "../symbols/fontes.txt" LAYER - CONNECTION "user=geodados password=geodados dbname=geodados host=pgsql1.mma.gov.br port=5432" - CONNECTIONTYPE POSTGIS - DATA "the_geom FROM (select * FROM brasil.brareg1) as foo USING UNIQUE gid USING SRID=4291" - + LABELITEM "cd_legenda" METADATA - "CLASSE" "SIM" - "ITENSDESC" "Nome" - "ESCALA" "5000000" - "EXTENSAO" "-75.233614607 -33.7515829981 -27.592958622 5.272156" - "ITENS" "cd_legenda" - "TEMA" "Bioma" - END - NAME "bioma" - STATUS OFF - TEMPLATE "none.htm" - OPACITY 80 - TYPE POLYGON - UNITS METERS - CLASS - - NAME "Amazônia" - - EXPRESSION ('[id]'eq '1') - + NAME "Cerrado" + EXPRESSION ('[id]'eq '3') STYLE - ANGLE 360 - - BACKGROUNDCOLOR 255 0 0 - - COLOR 255 0 0 - + COLOR 244 214 0 + OPACITY 100 + OUTLINECOLOR 50 50 50 + SYMBOL 0 + END + END + CLASS + NAME "Pantanal" + EXPRESSION ('[id]'eq '6') + STYLE + ANGLE 360 + COLOR 200 200 241 OPACITY 100 - - OUTLINECOLOR 255 0 0 - + OUTLINECOLOR 50 50 50 SYMBOL 0 - - WIDTH 5 - - OFFSET -20 -20 - END - END - CLASS - - NAME "Caatingaxxxx" - - EXPRESSION ('[id]'eq '2') - + NAME "Amaz" + EXPRESSION ('[id]'eq '1') + KEYIMAGE "" LABEL - - SIZE TINY - + SIZE MEDIUM TYPE BITMAP - BUFFER 0 - - COLOR 0 0 255 - + COLOR 0 255 0 FORCE FALSE - MINDISTANCE -1 - MINFEATURESIZE -1 - OFFSET 0 0 - PARTIALS TRUE - POSITION CC - END - STYLE - ANGLE 360 - - COLOR 0 0 246 - - OPACITY 100 - - OUTLINECOLOR 255 255 255 - - SYMBOL 0 - - END - - END - - CLASS - - NAME "Cerrado" - - EXPRESSION ('[id]'eq '3') - - STYLE - - ANGLE 360 - - COLOR 244 214 0 - - OPACITY 100 - - OUTLINECOLOR 50 50 50 - - SYMBOL 0 - - END - - END - - CLASS - - NAME "Pantanal" - - EXPRESSION ('[id]'eq '6') - - STYLE - - ANGLE 360 - - COLOR 200 200 241 - + COLOR 255 0 0 OPACITY 100 - - OUTLINECOLOR 50 50 50 - - SYMBOL 0 - END - END - CLASS - NAME "Pampa" - EXPRESSION ('[id]'eq '5') - STYLE - ANGLE 360 - COLOR 143 189 192 - OPACITY 100 - OUTLINECOLOR 50 50 50 - SYMBOL 0 - END - END - CLASS - NAME "Mata Atlântica" - EXPRESSION ('[id]'eq '4') - STYLE - ANGLE 360 - COLOR 218 255 216 - OPACITY 100 - OUTLINECOLOR 50 50 50 - SYMBOL 0 - END - END - END - - END - - + -- libgit2 0.21.2