Commit 7da5365ce260f63c7cfebb895dd8e1bdebc94528
1 parent
6dc6505c
Exists in
master
and in
7 other branches
Concluido o novo sistema de administração baseado em banco de dados
Showing
33 changed files
with
569 additions
and
1097 deletions
Show diff stats
admin/html/admin.css
... | ... | @@ -39,6 +39,15 @@ input |
39 | 39 | width: 20px; |
40 | 40 | height: 20px; |
41 | 41 | } |
42 | +.testar | |
43 | +{ | |
44 | + background-image:URL('../imagens/41.png'); | |
45 | + background-repeat: no-repeat; | |
46 | + background-position: 0px 0px; | |
47 | + cursor:pointer; | |
48 | + width: 20px; | |
49 | + height: 20px; | |
50 | +} | |
42 | 51 | .mais |
43 | 52 | { |
44 | 53 | background-image:URL('../imagens/05.png'); | ... | ... |
admin/html/atlas_importar.html
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
4 | -<link rel="stylesheet" type="text/css" href="admin.css"> | |
5 | -<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
6 | -<script src="../js/admin.js" type="text/javascript"></script> | |
7 | -<script src="../js/atlas.js" type="text/javascript"></script> | |
4 | +<script src="../js/core.js" type="text/javascript"></script> | |
5 | +<script src="../js/importar.js" type="text/javascript"></script> | |
8 | 6 | </head> |
9 | -<body> | |
7 | +<body class=" yui-skin-sam"> | |
10 | 8 | <div style=width:80%;text-align:center;> |
11 | 9 | <h1>Administração do i3geo - importação de XML</h1> |
12 | -<p><a href="../index.html">Voltar</a></p> | |
10 | + | |
13 | 11 | <p>Este programa importa as definições do menu de temas armazenadas em um arquivo XML</p> |
14 | 12 | <p>O menu é baseado no banco admin.db.</p> |
15 | 13 | </div> | ... | ... |
admin/html/i3geoadmin_importarmenu.html
... | ... | @@ -1,24 +0,0 @@ |
1 | -<html> | |
2 | -<head> | |
3 | -<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
4 | -<link rel="stylesheet" type="text/css" href="admin.css"> | |
5 | -<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
6 | -<script src="../js/admin.js" type="text/javascript"></script> | |
7 | -<script src="../js/menutemas.js" type="text/javascript"></script> | |
8 | -</head> | |
9 | -<body> | |
10 | -<div style=width:80%;text-align:center;> | |
11 | -<h1>Administração do i3geo - importação de menu XML</h1> | |
12 | -<p><a href="../index.html">Voltar</a></p> | |
13 | -<p>Este programa importa as definições do menu de temas armazenadas em um arquivo XML</p> | |
14 | -<p>O menu é baseado no banco admin.db.</p> | |
15 | -</div> | |
16 | -<p>Digite o nome do arquivo xml armazenado no servidor - utilize o caminho completo | |
17 | -<p>Por padrão, o arquivo utilizado é i3geo/menutemas/menutemas.xml</p> | |
18 | -<input type=text size=50 id=arquivo /> | |
19 | -<p>Nome do novo menu:</p> | |
20 | -<input type=text size=50 id=nome /><br><br> | |
21 | -<input type=button value="Importar" onclick="importarXmlMenu()"/> | |
22 | -<div id=resultado ></div> | |
23 | -</body> | |
24 | -</html> | |
25 | 0 | \ No newline at end of file |
admin/html/identifica_importar.html
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
4 | -<link rel="stylesheet" type="text/css" href="admin.css"> | |
5 | -<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
6 | -<script src="../js/admin.js" type="text/javascript"></script> | |
7 | -<script src="../js/identifica.js" type="text/javascript"></script> | |
4 | +<script src="../js/core.js" type="text/javascript"></script> | |
5 | +<script src="../js/importar.js" type="text/javascript"></script> | |
8 | 6 | </head> |
9 | -<body> | |
7 | +<body class=" yui-skin-sam"> | |
10 | 8 | <div style=width:80%;text-align:center;> |
11 | 9 | <h1>Administração do i3geo - importação da lista de funções da ferramenta identifica</h1> |
12 | -<p><a href="../index.html">Voltar</a></p> | |
10 | + | |
13 | 11 | <p>Este programa importa as definições das funções armazenadas em um arquivo XML</p> |
14 | 12 | <p>O menu é baseado no banco admin.db.</p> |
15 | 13 | </div> | ... | ... |
... | ... | @@ -0,0 +1,21 @@ |
1 | +<html> | |
2 | +<head> | |
3 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
4 | +<script src="../js/core.js" type="text/javascript"></script> | |
5 | +<script src="../js/importar.js" type="text/javascript"></script> | |
6 | +</head> | |
7 | +<body class=" yui-skin-sam"> | |
8 | +<div style=width:80%;text-align:center;> | |
9 | +<h1>Administração do i3geo - importação de menu XML</h1> | |
10 | +<p>Este programa importa as definições do menu de temas armazenadas em um arquivo XML</p> | |
11 | +<p>O menu é baseado no banco admin.db.</p> | |
12 | +</div><br> | |
13 | +<p>Digite o nome do arquivo xml armazenado no servidor - utilize o caminho completo | |
14 | +<p>Normalmente, o arquivo utilizado é i3geo/menutemas/menutemas.xml</p> | |
15 | +<input type=text size=50 id=arquivo /> | |
16 | +<p>Nome do novo menu:</p> | |
17 | +<input type=text size=50 id=nome /><br><br> | |
18 | +<input type=button value="Importar" onclick="importarXmlMenu()"/> | |
19 | +<div id=resultado ></div> | |
20 | +</body> | |
21 | +</html> | |
0 | 22 | \ No newline at end of file | ... | ... |
admin/html/mapas_importar.html
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
4 | -<link rel="stylesheet" type="text/css" href="admin.css"> | |
5 | -<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
6 | -<script src="../js/admin.js" type="text/javascript"></script> | |
7 | -<script src="../js/mapas.js" type="text/javascript"></script> | |
4 | +<script src="../js/core.js" type="text/javascript"></script> | |
5 | +<script src="../js/importar.js" type="text/javascript"></script> | |
8 | 6 | </head> |
9 | -<body> | |
7 | +<body class=" yui-skin-sam"> | |
10 | 8 | <div style=width:80%;text-align:center;> |
11 | 9 | <h1>Administração do i3geo - importação da lista de mapas</h1> |
12 | -<p><a href="../index.html">Voltar</a></p> | |
10 | + | |
13 | 11 | <p>Este programa importa as definições do menu de temas armazenadas em um arquivo XML</p> |
14 | 12 | <p>O menu é baseado no banco admin.db.</p> |
15 | 13 | </div> | ... | ... |
admin/html/sistemas_importar.html
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
4 | -<link rel="stylesheet" type="text/css" href="admin.css"> | |
5 | -<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
6 | -<script src="../js/admin.js" type="text/javascript"></script> | |
7 | -<script src="../js/sistemas.js" type="text/javascript"></script> | |
4 | +<script src="../js/core.js" type="text/javascript"></script> | |
5 | +<script src="../js/importar.js" type="text/javascript"></script> | |
8 | 6 | </head> |
9 | -<body> | |
7 | +<body class=" yui-skin-sam"> | |
10 | 8 | <div style=width:80%;text-align:center;> |
11 | 9 | <h1>Administração do i3geo - importação da lista de sistemas</h1> |
12 | -<p><a href="../index.html">Voltar</a></p> | |
10 | + | |
13 | 11 | <p>Este programa importa as definições dos sistemas e funções armazenadas em um arquivo XML</p> |
14 | 12 | <p>O menu é baseado no banco admin.db.</p> |
15 | 13 | </div> | ... | ... |
admin/html/webservices_importar.html
... | ... | @@ -2,14 +2,13 @@ |
2 | 2 | <head> |
3 | 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
4 | 4 | <link rel="stylesheet" type="text/css" href="admin.css"> |
5 | -<script src="../../pacotes/cpaint/cpaint2.inc.compressed.js" type="text/javascript"></script> | |
6 | -<script src="../js/admin.js" type="text/javascript"></script> | |
7 | -<script src="../js/webservices.js" type="text/javascript"></script> | |
5 | +<script src="../js/core.js" type="text/javascript"></script> | |
6 | +<script src="../js/importar.js" type="text/javascript"></script> | |
8 | 7 | </head> |
9 | -<body> | |
8 | +<body class=" yui-skin-sam"> | |
10 | 9 | <div style=width:80%;text-align:center;> |
11 | 10 | <h1>Administração do i3geo - importação da lista de mapas</h1> |
12 | -<p><a href="../index.html">Voltar</a></p> | |
11 | + | |
13 | 12 | <p>Este programa importa as definições dos webservices armazenadas em um arquivo XML</p> |
14 | 13 | <p>O menu é baseado no banco admin.db.</p> |
15 | 14 | </div> | ... | ... |
671 Bytes
admin/index.html
... | ... | @@ -16,11 +16,12 @@ |
16 | 16 | 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.</p> |
17 | 17 | <p>De forma geral, você deverá seguir as seguintes etapas na configuração:</p> |
18 | 18 | <p>1 - instalação e configuração |
19 | -<p>2 - criação das camadas (layers) | |
20 | -<p>3 - organização das camadas em grupos e sub-grupos | |
21 | -<p>4 - configuração de mapas e atlas | |
22 | -<p>5 - edição do cadastro de web services e sistemas especiais | |
23 | -<p>6 - customização das ferramentas e interface | |
19 | +<p>2 - criação dos mapfiles no editor de mapfiles | |
20 | +<p>3 - Edição dos temas, vinculando um tema a um detereminado mapfile | |
21 | +<p>4 - organização das camadas em grupos e sub-grupos | |
22 | +<p>5 - configuração de mapas e atlas | |
23 | +<p>6 - edição do cadastro de web services e sistemas especiais | |
24 | +<p>7 - customização das ferramentas e interface | |
24 | 25 | <p>Antes da versão 4.0 o i3geo utilizava arquivos armazenados em disco (arquivos XML) para organizar |
25 | 26 | as camadas e outras listagens. |
26 | 27 | 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. |
59 | 60 | </fieldset> |
60 | 61 | <br> |
61 | 62 | <fieldset> |
62 | -<legend>Editor de temas</legend> | |
63 | +<legend>Editor de mapfiles</legend> | |
63 | 64 | <div id=a8 style=display:none;background-color:beige > |
64 | 65 | <p>As camadas disponíveis no i3geo são mantidas em arquivos na estrutura mapfile armazenados no diretório i3geo/temas |
65 | 66 | <p>Esses arquivos são utilizados na formação da árvore de adição de temas e em vários aplicativos do i3geo. |
... | ... | @@ -87,7 +88,7 @@ que por sua vez contém temas.</p> |
87 | 88 | <tr onclick="abre('html/tags.html')"><td><div class=aplicar ></div></td><td>Editar a lista de tags (palavras-chave)</td></tr> |
88 | 89 | <tr onclick="abre('html/listatemas.html')"><td><div class=aplicar ></div></td><td>Editar a lista de temas</td></tr> |
89 | 90 | <tr onclick="abre('html/arvore.html')"><td><div class=aplicar ></div></td><td>Editar a árvore dos menus</td></tr> |
90 | -<tr onclick="abre('html/i3geoadmin_importarmenu.html')"><td><div class=aplicar ></div></td><td>Importar XML</td></tr> | |
91 | +<tr onclick="abre('html/importarmenu.html')"><td><div class=aplicar ></div></td><td>Importar XML</td></tr> | |
91 | 92 | </table> |
92 | 93 | </fieldset> |
93 | 94 | <br> |
... | ... | @@ -171,7 +172,7 @@ que por sua vez contém temas.</p> |
171 | 172 | <table class=lista1 > |
172 | 173 | <tr onclick="abre('php/sqlite.php')"><td><div class=aplicar ></div></td><td>Descrição do banco padrão (SQLITE)</td></tr> |
173 | 174 | <tr onclick="abre('../geraminiatura.php')"><td><div class=aplicar ></div></td><td>Gera as miniaturas (thumbnails) para os temas existentes no diretório i3geo/temas</td></tr> |
174 | -<tr onclick="abre('xmlmenutemas.php')"><td><div class=aplicar ></div></td><td>Ver xml com a árvore de temas</td></tr> | |
175 | +<tr onclick="abre('xmlmenutemas.php?id_menu=0')"><td><div class=aplicar ></div></td><td>Ver xml com a árvore de temas</td></tr> | |
175 | 176 | <tr onclick="abre('xmlatlas.php')"><td><div class=aplicar ></div></td><td>Ver xml com os Atlas</td></tr> |
176 | 177 | <tr onclick="abre('xmlidentifica.php')"><td><div class=aplicar ></div></td><td>Ver xml com os sistemas utilizados na ferramenta de identificação</td></tr> |
177 | 178 | <tr onclick="abre('xmlmapas.php')"><td><div class=aplicar ></div></td><td>Ver xml com a lista de mapas</td></tr> | ... | ... |
admin/js/core.js
... | ... | @@ -871,7 +871,7 @@ function core_pegaDados(mensagem,sUrl,funcaoRetorno) |
871 | 871 | { |
872 | 872 | try |
873 | 873 | {eval(funcaoRetorno+"(YAHOO.lang.JSON.parse(o.responseText))");} |
874 | - catch(e){core_handleFailure(o,o.responseText);} | |
874 | + catch(e){core_carregando("desativa");core_handleFailure(o,o.responseText);} | |
875 | 875 | }, |
876 | 876 | failure:core_handleFailure, |
877 | 877 | argument: { foo:"foo", bar:"bar" } | ... | ... |
admin/js/editormapfile.js
... | ... | @@ -177,8 +177,8 @@ function montaNosRaiz(redesenha) |
177 | 177 | var nos = new Array() |
178 | 178 | for (var i=0, j=$mapfiles.length; i<j; i++) |
179 | 179 | { |
180 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"excluirMapfile('"+$mapfiles[i]+"')\" title=excluir src=\"../imagens/01.png\" /><b> <span>"+$mapfiles[i]+"</span>" | |
181 | - //conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editorDeTexto('"+$mapfiles[i]+"')\" title='editor de texto' src=\"../imagens/06.png\" /><b> <span>"+$mapfiles[i]+"</span>" | |
180 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"excluirMapfile('"+$mapfiles[i]+"')\" title=excluir src=\"../imagens/01.png\" />" | |
181 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"testarMapfile('"+$mapfiles[i]+"')\" title='testar!' src=\"../imagens/41.png\" /><b> <span>"+$mapfiles[i]+"</span>" | |
182 | 182 | |
183 | 183 | var d = {html:conteudo,id:$mapfiles[i],codigoMap:$mapfiles[i]}; |
184 | 184 | var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true); |
... | ... | @@ -188,6 +188,10 @@ function montaNosRaiz(redesenha) |
188 | 188 | tree.draw(); |
189 | 189 | return nos; |
190 | 190 | } |
191 | +function testarMapfile(codigoMap) | |
192 | +{ | |
193 | + window.open("../../testamapfile.php?map="+codigoMap+".map") | |
194 | +} | |
191 | 195 | function montaRaizTema(no,dados) |
192 | 196 | { |
193 | 197 | var codigoMap = no.data.codigoMap; |
... | ... | @@ -230,8 +234,8 @@ function montaRaizTema(no,dados) |
230 | 234 | } |
231 | 235 | for (var i=0, j=dados.layers.length; i<j; i++) |
232 | 236 | { |
233 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('sobe')\" title=sobe src=\"../imagens/34.png\" />" | |
234 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('desce')\" title=desce src=\"../imagens/33.png\" />" | |
237 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('sobe','layer','"+no.data.codigoMap+"','"+dados.layers[i]+"')\" title=sobe src=\"../imagens/34.png\" />" | |
238 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('desce','layer','"+no.data.codigoMap+"','"+dados.layers[i]+"')\" title=desce src=\"../imagens/33.png\" />" | |
235 | 239 | conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluirLayer('"+no.data.codigoMap+"','"+dados.layers[i]+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" /> <span>"+dados.layers[i]+"</span>" |
236 | 240 | var d = {html:conteudo,id:codigoMap+"_"+dados.layers[i],codigoMap:codigoMap,codigoLayer:dados.layers[i]} |
237 | 241 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
... | ... | @@ -306,8 +310,8 @@ function montaParametrosTemas(no,dados,redesenha) |
306 | 310 | } |
307 | 311 | for (var i=0, j=dados.length; i<j; i++) |
308 | 312 | { |
309 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('sobe')\" title=sobe src=\"../imagens/34.png\" />" | |
310 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('desce')\" title=desce src=\"../imagens/33.png\" />" | |
313 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('sobe','classe','"+no.data.codigoMap+"','"+codigoLayer+"','"+dados[i].indice+"')\" title=sobe src=\"../imagens/34.png\" />" | |
314 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('desce','classe','"+no.data.codigoMap+"','"+codigoLayer+"','"+dados[i].indice+"')\" title=desce src=\"../imagens/33.png\" />" | |
311 | 315 | conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluirClasse('"+codigoMap+"','"+codigoLayer+"','"+dados[i].indice+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" /> <span>"+dados[i].indice+" "+dados[i].nome+"</span>" |
312 | 316 | //conteudo += "<img width='10px' heigth='10px' style=\"position:relative;cursor:pointer;top:0px\" onclick=\"editorClasse('"+codigoMap+"','"+codigoLayer+"','"+dados[i].indice+"')\" title='classes' src=\"../imagens/06.png\" /> <span>"+dados[i].indice+" "+dados[i].nome+"</span>" |
313 | 317 | 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) |
332 | 336 | if(!tree.getNodeByProperty("etiquetaClasseLabel",no.data.id)) |
333 | 337 | { |
334 | 338 | var conteudo = "<img width='10px' heigth='10px' style=\"position:relative;cursor:pointer;top:0px\" onclick=\"editorClasseLabel('"+codigoMap+"','"+codigoLayer+"','"+indiceClasse+"')\" title='edita características da classe' src=\"../imagens/06.png\" />" |
335 | - var d = {tipo:"etiquetaClasseLabel",etiquetaClasseGeral:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:conteudo+" Editar etiquetas"} | |
339 | + var d = {tipo:"etiquetaClasseLabel",etiquetaClasseLabel:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:conteudo+" Editar etiquetas"} | |
336 | 340 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
337 | 341 | tempNode.isLeaf = true; |
338 | 342 | } |
339 | - | |
340 | 343 | if(!tree.getNodeByProperty("etiquetaEstilo",no.data.id)) |
341 | 344 | { |
342 | 345 | var conteudo = "<img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"adicionaNovoEstilo('"+codigoMap+"','"+codigoLayer+"','"+indiceClasse+"')\" title='adiciona estilo' src=\"../imagens/05.png\" /> " |
... | ... | @@ -346,8 +349,8 @@ function montaParametrosClasses(no,dados,redesenha) |
346 | 349 | } |
347 | 350 | for (var i=0, j=dados.length; i<j; i++) |
348 | 351 | { |
349 | - var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('sobe')\" title=sobe src=\"../imagens/34.png\" />" | |
350 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('desce')\" title=desce src=\"../imagens/33.png\" />" | |
352 | + var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('sobe','estilo','"+no.data.codigoMap+"','"+codigoLayer+"','"+indiceClasse+"','"+dados[i].estilo+"')\" title=sobe src=\"../imagens/34.png\" />" | |
353 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('desce','estilo','"+no.data.codigoMap+"','"+codigoLayer+"','"+indiceClasse+"','"+dados[i].estilo+"')\" title=desce src=\"../imagens/33.png\" />" | |
351 | 354 | conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluirEstilo('"+codigoMap+"','"+codigoLayer+"','"+indiceClasse+"','"+dados[i].estilo+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" /> " |
352 | 355 | conteudo += "<img width='10px' heigth='10px' style=\"position:relative;cursor:pointer;top:0px\" onclick=\"editorEstilo('"+codigoMap+"','"+codigoLayer+"','"+indiceClasse+"','"+dados[i].estilo+"')\" title='classes' src=\"../imagens/06.png\" /> <span>"+dados[i].estilo+"</span>" |
353 | 356 | 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) |
645 | 648 | var sUrl = "../php/editormapfile.php?funcao=pegaClasseLabel&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse; |
646 | 649 | core_pegaDados("Obtendo dados...",sUrl,"montaEditorClasseLabel") |
647 | 650 | } |
651 | +function editorEstilo(codigoMap,codigoLayer,indiceClasse,indiceEstilo) | |
652 | +{ | |
653 | + core_montaEditor("","600px","500px") | |
654 | + var sUrl = "../php/editormapfile.php?funcao=pegaEstilo&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo; | |
655 | + core_pegaDados("Obtendo dados...",sUrl,"montaEditorEstilo") | |
656 | +} | |
648 | 657 | function montaEditorConexao(dados) |
649 | 658 | { |
650 | 659 | var param = { |
... | ... | @@ -869,8 +878,60 @@ function montaEditorClasseLabel(dados) |
869 | 878 | { |
870 | 879 | var param = { |
871 | 880 | "linhas":[ |
872 | - {ajuda:"Nome da classe para ser mostrada na legenda", | |
873 | - titulo:"Name",id:"name",value:dados.name,tipo:"text"}, | |
881 | + {ajuda:"Color to draw text with.", | |
882 | + titulo:"Color",id:"color",value:dados.color,tipo:"text"}, | |
883 | + {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.", | |
884 | + titulo:"Size",id:"size",value:dados.size,tipo:"text"}, | |
885 | + {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.", | |
886 | + titulo:"Position",id:"position",value:dados.position,tipo:"text"}, | |
887 | + {ajuda:"Padding, in pixels, around labels. Useful for maintaining spacing around text to enhance readability. Available only for cached labels. Default is 0.", | |
888 | + titulo:"Buffer",id:"buffer",value:dados.buffer,tipo:"text"}, | |
889 | + {ajuda:"Font alias (as defined in the FONTSET) to use for labeling", | |
890 | + titulo:"Font",id:"",value:dados.font,tipo:"text",div:"<div id=cFont ></div>"}, | |
891 | + {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", | |
892 | + titulo:"Type",id:"",value:dados.type,tipo:"text",div:"<div id=cType ></div>"}, | |
893 | + {ajuda:"Can text run off the edge of the map? Default is true", | |
894 | + titulo:"Partials",id:"",value:dados.partials,tipo:"text",div:"<div id=cPartials ></div>"}, | |
895 | + {ajuda:"Forces labels for a particular class on, regardless of collisions. Available only for cached labels. Default is false.", | |
896 | + titulo:"Force",id:"",value:dados.force,tipo:"text",div:"<div id=cForce ></div>"}, | |
897 | + {ajuda:"Color to draw a background rectangle (i.e. billboard). Off by default.", | |
898 | + titulo:"Backgroundcolor",id:"backgroundcolor",value:dados.backgroundcolor,tipo:"text"}, | |
899 | + {ajuda:"Color to draw a background rectangle (i.e. billboard) shadow. Off by default.", | |
900 | + titulo:"Backgroundshadowcolor",id:"backgroundshadowcolor",value:dados.backgroundshadowcolor,tipo:"text"}, | |
901 | + {ajuda:"Color to draw a one pixel outline around the text.", | |
902 | + titulo:"Outlinecolor",id:"outlinecolor",value:dados.outlinecolor,tipo:"text"}, | |
903 | + {ajuda:"Color of drop shadow.", | |
904 | + titulo:"Shadowcolor",id:"shadowcolor",value:dados.shadowcolor,tipo:"text"}, | |
905 | + {ajuda:"Shadow offset in pixels.", | |
906 | + titulo:"Shadowsizex",id:"shadowsizex",value:dados.shadowsizex,tipo:"text"}, | |
907 | + {ajuda:"Shadow offset in pixels.", | |
908 | + titulo:"Shadowsizey",id:"shadowsizey",value:dados.shadowsizey,tipo:"text"}, | |
909 | + {ajuda:"How far should the background rectangle be offset? Default is 1.", | |
910 | + titulo:"Backgroundshadowsizex",id:"backgroundshadowsizex",value:dados.backgroundshadowsizex,tipo:"text"}, | |
911 | + {ajuda:"How far should the background rectangle be offset? Default is 1.", | |
912 | + titulo:"Backgroundshadowsizey",id:"backgroundshadowsizey",value:dados.backgroundshadowsizey,tipo:"text"}, | |
913 | + {ajuda:"Minimum font size to use when scaling text (pixels). Default is 4.", | |
914 | + titulo:"Minsize",id:"minsize",value:dados.minsize,tipo:"text"}, | |
915 | + {ajuda:"Maximum font size to use when scaling text (pixels). Default is 256.", | |
916 | + titulo:"Maxsize",id:"maxsize",value:dados.maxsize,tipo:"text"}, | |
917 | + {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.", | |
918 | + titulo:"Offsetx",id:"offsetx",value:dados.offsetx,tipo:"text"}, | |
919 | + {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.", | |
920 | + titulo:"Offsety",id:"offsety",value:dados.offsety,tipo:"text"}, | |
921 | + {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", | |
922 | + titulo:"Angle (utilize MS_FOLLOW para textos curvos)",id:"angle",value:dados.angle,tipo:"text"}, | |
923 | + {ajuda:"Cálculo automático do ângulo quando os elementos forem lineares", | |
924 | + titulo:"Autoangle",id:"",value:dados.angle,tipo:"text",div:"<div id=cAutoangle ></div>"}, | |
925 | + {ajuda:"Should text be antialiased? Note that this requires more available colors, decreased drawing performance, and results in slightly larger output images.", | |
926 | + titulo:"Antialias",id:"antialias",value:dados.antialias,tipo:"text"}, | |
927 | + {ajuda:"Character that represents an end-of-line condition in label text, thus resulting in a multi-line label.", | |
928 | + titulo:"Wrap",id:"wrap",value:dados.wrap,tipo:"text"}, | |
929 | + {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.", | |
930 | + titulo:"Minfeaturesize",id:"minfeaturesize",value:dados.minfeaturesize,tipo:"text"}, | |
931 | + {ajuda:"Minimum distance between duplicate labels. Given in pixels.", | |
932 | + titulo:"Mindistance",id:"mindistance",value:dados.mindistance,tipo:"text"}, | |
933 | + {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.", | |
934 | + titulo:"Encoding",id:"encoding",value:dados.encoding,tipo:"text"} | |
874 | 935 | ] |
875 | 936 | } |
876 | 937 | var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />" |
... | ... | @@ -882,17 +943,78 @@ function montaEditorClasseLabel(dados) |
882 | 943 | ins += core_geraLinhas(param) |
883 | 944 | ins += "<br><br><br>" |
884 | 945 | $i("editor_bd").innerHTML = ins |
885 | -/* | |
886 | - temp = "<p><select id='status' >" | |
887 | - temp += core_comboObjeto(objstatus,"valor","texto",dados.status) | |
946 | + | |
947 | + temp = "<p><select id='font' >" | |
948 | + temp += core_comboObjeto(dados.fontes,"","",dados.font) | |
888 | 949 | temp += "</select>" |
889 | - $i("cStatus").innerHTML = temp | |
890 | -*/ | |
950 | + $i("cFont").innerHTML = temp | |
951 | + | |
952 | + temp = "<p><select id='type' >" | |
953 | + temp += core_comboObjeto(objfonttypes,"valor","texto",dados.type) | |
954 | + temp += "</select>" | |
955 | + $i("cType").innerHTML = temp | |
956 | + | |
957 | + temp = "<p><select id='partials' >" | |
958 | + temp += core_comboObjeto(objbool_tf,"valor","texto",dados.partials) | |
959 | + temp += "</select>" | |
960 | + $i("cPartials").innerHTML = temp | |
961 | + | |
962 | + temp = "<p><select id='force' >" | |
963 | + temp += core_comboObjeto(objbool_tf,"valor","texto",dados.force) | |
964 | + temp += "</select>" | |
965 | + $i("cForce").innerHTML = temp | |
966 | + | |
967 | + temp = "<p><select id='autoangle' >" | |
968 | + temp += core_comboObjeto(objbool_tf,"valor","texto",dados.autoangle) | |
969 | + temp += "</select>" | |
970 | + $i("cAutoangle").innerHTML = temp | |
971 | + | |
891 | 972 | var temp = function() |
892 | 973 | {salvarDadosEditor('classeLabel',dados.codigoMap,dados.codigoLayer,dados.indiceClasse)} |
893 | 974 | new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }}); |
894 | 975 | } |
895 | - | |
976 | +function montaEditorEstilo(dados) | |
977 | +{ | |
978 | + var param = { | |
979 | + "linhas":[ | |
980 | + {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.", | |
981 | + titulo:"Symbolname",id:"symbolname",value:dados.symbolname,tipo:"text"}, | |
982 | + {ajuda:"Color to use for drawing features.", | |
983 | + titulo:"Color",id:"color",value:dados.color,tipo:"text"}, | |
984 | + {ajuda:"Background-color to use for drawing features.", | |
985 | + titulo:"Backgroundcolorolor",id:"backgroundcolor",value:dados.backgroundcolor,tipo:"text"}, | |
986 | + {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.", | |
987 | + titulo:"Size",id:"size",value:dados.size,tipo:"text"}, | |
988 | + {ajuda:"Color to use for outlining polygons and certain marker symbols. Line symbols do not support outline colors.", | |
989 | + titulo:"Outlinecolor",id:"outlinecolor",value:dados.outlinecolor,tipo:"text"}, | |
990 | + {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.", | |
991 | + titulo:"Width",id:"width",value:dados.width,tipo:"text"}, | |
992 | + {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.", | |
993 | + titulo:"Minsize",id:"minsize",value:dados.minsize,tipo:"text"}, | |
994 | + {ajuda:"Maximum size in pixels to draw a symbol. Default is 50.", | |
995 | + titulo:"Maxsize",id:"maxsize",value:dados.maxsize,tipo:"text"}, | |
996 | + {ajuda:"Offset values for shadows, hollow symbols, etc ...", | |
997 | + titulo:"Offsetx",id:"offsetx",value:dados.offsetx,tipo:"text"}, | |
998 | + {ajuda:"Offset values for shadows, hollow symbols, etc ...", | |
999 | + titulo:"Offsety",id:"offsety",value:dados.offsety,tipo:"text"}, | |
1000 | + {ajuda:"Should TrueType fonts and Cartoline symbols be antialiased.", | |
1001 | + titulo:"Antialias",id:"antialias",value:dados.antialias,tipo:"text"}, | |
1002 | + {ajuda:"Minimum width in pixels to draw the line work.", | |
1003 | + titulo:"Minwidth",id:"minwidth",value:dados.minwidth,tipo:"text"}, | |
1004 | + {ajuda:"Maximun width in pixels to draw the line work.", | |
1005 | + titulo:"Maxwidth",id:"maxwidth",value:dados.maxwidth,tipo:"text"}, | |
1006 | + {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.", | |
1007 | + titulo:"Angle",id:"angle",value:dados.angle,tipo:"text"} | |
1008 | + ] | |
1009 | + } | |
1010 | + var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />" | |
1011 | + ins += core_geraLinhas(param) | |
1012 | + ins += "<br><br><br>" | |
1013 | + $i("editor_bd").innerHTML = ins | |
1014 | + var temp = function() | |
1015 | + {salvarDadosEditor('estilo',dados.codigoMap,dados.codigoLayer,dados.indiceClasse,dados.indiceEstilo)} | |
1016 | + new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }}); | |
1017 | +} | |
896 | 1018 | function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) |
897 | 1019 | { |
898 | 1020 | if(tipo == "conexao") |
... | ... | @@ -919,6 +1041,19 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) |
919 | 1041 | var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse |
920 | 1042 | var prog = "../php/editormapfile.php?funcao=alterarClasseGeral" |
921 | 1043 | } |
1044 | + if(tipo == "classeLabel") | |
1045 | + { | |
1046 | + 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") | |
1047 | + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse | |
1048 | + var prog = "../php/editormapfile.php?funcao=alterarClasseLabel" | |
1049 | + } | |
1050 | + if(tipo == "estilo") | |
1051 | + { | |
1052 | + var campos = new Array("angle","maxwidth","minwidth","width","outlinecolor","backgroundcolor","antialias","offsety","offsetx","maxsize","minsize","size","color","symbolname") | |
1053 | + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo | |
1054 | + var prog = "../php/editormapfile.php?funcao=alterarEstilo" | |
1055 | + } | |
1056 | + | |
922 | 1057 | for (i=0;i<campos.length;i++) |
923 | 1058 | {par += "&"+campos[i]+"="+($i(campos[i]).value)} |
924 | 1059 | core_carregando("ativa"); |
... | ... | @@ -945,7 +1080,6 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) |
945 | 1080 | { |
946 | 1081 | var d = YAHOO.lang.JSON.parse(o.responseText) |
947 | 1082 | montaEditorGeral(d); |
948 | - //var no = tree.getNodeByProperty("id",codigoMap+"_"+codigoLayer) | |
949 | 1083 | if(d.name != codigoLayer) |
950 | 1084 | { |
951 | 1085 | core_pegaMapfiles("montaArvore()") |
... | ... | @@ -955,7 +1089,10 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) |
955 | 1089 | } |
956 | 1090 | if(tipo=="classeGeral") |
957 | 1091 | {montaEditorClasseGeral(YAHOO.lang.JSON.parse(o.responseText));} |
958 | - | |
1092 | + if(tipo=="classeLabel") | |
1093 | + {montaEditorClasseLabel(YAHOO.lang.JSON.parse(o.responseText));} | |
1094 | + if(tipo=="estilo") | |
1095 | + {montaEditorEstilo(YAHOO.lang.JSON.parse(o.responseText));} | |
959 | 1096 | core_carregando("desativa"); |
960 | 1097 | } |
961 | 1098 | } |
... | ... | @@ -966,5 +1103,55 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) |
966 | 1103 | }; |
967 | 1104 | core_makeRequest(sUrl,callback,'POST') |
968 | 1105 | } |
1106 | +function sobeDesce(movimento,tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo) | |
1107 | +{ | |
1108 | + if(tipo == "layer") | |
1109 | + { | |
1110 | + var no = tree.getNodeByProperty("id",codigoMap+"_"+codigoLayer); | |
1111 | + var movimenta = core_movimentaNo(movimento,no); | |
1112 | + var indiceClasse = ""; | |
1113 | + var indiceEstilo = ""; | |
1114 | + } | |
1115 | + if(tipo == "classe") | |
1116 | + { | |
1117 | + var no = tree.getNodeByProperty("id",codigoMap+"_"+codigoLayer+"_"+indiceClasse); | |
1118 | + var movimenta = true; | |
1119 | + var indiceEstilo = ""; | |
1120 | + } | |
1121 | + if(tipo == "estilo") | |
1122 | + { | |
1123 | + var no = tree.getNodeByProperty("id",codigoMap+"_"+codigoLayer+"_"+indiceClasse+"_"+indiceEstilo); | |
1124 | + var movimenta = true; | |
1125 | + } | |
969 | 1126 | |
1127 | + var callback = | |
1128 | + { | |
1129 | + success: function(o) | |
1130 | + { | |
1131 | + core_carregando("desativa"); | |
1132 | + if(tipo == "classe") | |
1133 | + { | |
1134 | + var no = tree.getNodeByProperty("id",codigoMap+"_"+codigoLayer) | |
1135 | + tree.removeChildren(no) | |
1136 | + no.expand(); | |
1137 | + } | |
1138 | + if(tipo == "estilo") | |
1139 | + { | |
1140 | + var no = tree.getNodeByProperty("id",codigoMap+"_"+codigoLayer+"_"+indiceClasse) | |
1141 | + tree.removeChildren(no) | |
1142 | + no.expand(); | |
1143 | + } | |
1144 | + | |
1145 | + }, | |
1146 | + failure:core_handleFailure, | |
1147 | + argument: { foo:"foo", bar:"bar" } | |
1148 | + }; | |
1149 | + if(movimenta) | |
1150 | + { | |
1151 | + var sUrl = "../php/editormapfile.php?funcao=movimentaNo&tipo="+tipo+"&movimento="+movimento+"&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo; | |
1152 | + core_carregando("ativa"); | |
1153 | + core_carregando(" modificando a ordem"); | |
1154 | + core_makeRequest(sUrl,callback) | |
1155 | + } | |
1156 | +} | |
970 | 1157 | YAHOO.util.Event.addListener(window, "load", initMenu); |
971 | 1158 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,35 @@ |
1 | +YAHOO.namespace("example.container"); | |
2 | +function fim () | |
3 | +{ | |
4 | + core_carregando("desativa") | |
5 | +} | |
6 | +function importarXmlMenu() | |
7 | +{ | |
8 | + core_carregando("ativa") | |
9 | + core_pegaDados("importando...","../php/menutemas.php?funcao=importarXmlMenu&nomemenu="+$i("nome").value+"&xml="+$i("arquivo").value,"fim()") | |
10 | +} | |
11 | +function importarXmlMapas() | |
12 | +{ | |
13 | + core_carregando("ativa") | |
14 | + core_pegaDados("importando...","../php/mapas.php?funcao=importarXmlMapas&xml="+$i("arquivo").value,"fim()") | |
15 | +} | |
16 | +function importarXmlAtlas() | |
17 | +{ | |
18 | + core_carregando("ativa") | |
19 | + core_pegaDados("importando...","../php/atlas.php?funcao=importarXmlAtlas&xml="+$i("arquivo").value,"fim()") | |
20 | +} | |
21 | +function importarXmlWS() | |
22 | +{ | |
23 | + core_carregando("ativa") | |
24 | + core_pegaDados("importando...","../php/webservices.php?funcao=importarXmlWS&xml="+$i("arquivo").value+"&tipo="+$i("tipo").value,"fim()") | |
25 | +} | |
26 | +function importarXmlI() | |
27 | +{ | |
28 | + core_carregando("ativa") | |
29 | + core_pegaDados("importando...","../php/identifica.php?funcao=importarXmlI&xml="+$i("arquivo").value,"fim()") | |
30 | +} | |
31 | +function importarXmlSistemas() | |
32 | +{ | |
33 | + core_carregando("ativa") | |
34 | + core_pegaDados("importando...","../php/sistemas.php?funcao=importarXmlSistemas&xml="+$i("arquivo").value,"fim()") | |
35 | +} | ... | ... |
admin/js/listatemas.js
... | ... | @@ -192,7 +192,7 @@ function montaDivTemas(i) |
192 | 192 | ins += "<p>Permite acesso via kml?<br>" |
193 | 193 | ins += "<select id='Ekml_tema' >" |
194 | 194 | ins += core_combosimnao(i.kml_tema) |
195 | - ins += "</select></p>" | |
195 | + ins += "</select></p><br><br><br>" | |
196 | 196 | return(ins) |
197 | 197 | } |
198 | 198 | function excluiLinha(id,row) | ... | ... |
admin/js/mapas.js
... | ... | @@ -199,6 +199,7 @@ function montaDivMapas(i) |
199 | 199 | |
200 | 200 | ins += "<p>Link direto para abertura do mapa (despreza os outros parâmetros):<br>"; |
201 | 201 | ins += "<input size=50 type=text id=Elinkdireto_mapa value='"+i.linkdireto_mapa+"' /></p>" |
202 | + ins += "<br><br><br>" | |
202 | 203 | return(ins) |
203 | 204 | } |
204 | 205 | function excluiLinha(id,row) | ... | ... |
admin/js/menutemas.js
... | ... | @@ -1,493 +0,0 @@ |
1 | -/* | |
2 | -Title: Menutemas | |
3 | - | |
4 | -Funções javascript utilizadas no sistema de administração do menu de temas | |
5 | - | |
6 | -File: i3geo/admin/menutemas.js | |
7 | - | |
8 | -About: Licença | |
9 | - | |
10 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
11 | - | |
12 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
13 | -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
14 | - | |
15 | -Este programa é software livre; você pode redistribuí-lo | |
16 | -e/ou modificá-lo sob os termos da Licença Pública Geral | |
17 | -GNU conforme publicada pela Free Software Foundation; | |
18 | -tanto a versão 2 da Licença. | |
19 | -Este programa é distribuído na expectativa de que seja útil, | |
20 | -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
21 | -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
22 | -Consulte a Licença Pública Geral do GNU para mais detalhes. | |
23 | -Você deve ter recebido uma cópia da Licença Pública Geral do | |
24 | -GNU junto com este programa; se não, escreva para a | |
25 | -Free Software Foundation, Inc., no endereço | |
26 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
27 | -*/ | |
28 | -/* | |
29 | -Function: iniciaAdmin | |
30 | - | |
31 | -Inicializa as variáveis globais e checa o cadastro do editor do sistema de administração | |
32 | -*/ | |
33 | -function iniciaAdmin() | |
34 | -{ | |
35 | - verificaEditores() | |
36 | -} | |
37 | -/* | |
38 | -Function: importarXmlMenu | |
39 | - | |
40 | -Importa um arquivo xml para o banco de dados. | |
41 | - | |
42 | -O xml deve ser estruturado no padrão menutemas.xml | |
43 | -*/ | |
44 | -function importarXmlMenu() | |
45 | -{ | |
46 | - $i("resultado").innerHTML = $mensagemAguarde | |
47 | - var retorna = function(retorno) | |
48 | - {$i("resultado").innerHTML = retorno.data} | |
49 | - var p = "../php/menutemas.php?funcao=importarXmlMenu&nomemenu="+$i("nome").value+"&xml="+$i("arquivo").value; | |
50 | - cPaint.call(p,"",retorna); | |
51 | -} | |
52 | -/* | |
53 | -Function: montaParametros | |
54 | - | |
55 | -Monta o html com os parametros e os divs que receberão os dados dos formulários. | |
56 | - | |
57 | -Para cada registro na variável $parametrs, é montado um formulário. | |
58 | -*/ | |
59 | -function montaParametros() | |
60 | -{ | |
61 | - var ins = "" | |
62 | - for (i=0;i<$parametros.simples.length;i++) | |
63 | - { | |
64 | - ins += "<fieldset><legend><b>"+$parametros.simples[i].cabeca+"</b></legend>" | |
65 | - ins += "<p><input style=font-size:10px onclick='pegaParametros()' type=button value='Listar existentes' />" | |
66 | - ins += " Filtro:<input id=filtro style=font-size:10px type=text value='' size=30 title='Texto para filtrar' /></p>" | |
67 | - ins += "<p><input onclick='alterar(\""+$parametros.simples[i].variavel+"\",\"\")' type=button value='Adicionar um novo' /></p>" | |
68 | - ins += "<div id='"+$parametros.simples[i].variavel+"' ></div>" | |
69 | - ins += "<p class=mensagem >"+$parametros.simples[i].mensagem+"</p>" | |
70 | - ins += "<p><input onclick='alterar(\""+$parametros.simples[i].variavel+"\",\"\")' type=button value='Adicionar um novo' /></p>" | |
71 | - ins += "</fieldset><br>" | |
72 | - } | |
73 | - document.body.innerHTML += ins | |
74 | - $i("aguarde").style.display="none" | |
75 | - //pegaParametros() | |
76 | -} | |
77 | -/* | |
78 | -Function: pegaParametros | |
79 | - | |
80 | -Pega os parâmetros do mapfiles.php | |
81 | - | |
82 | -*/ | |
83 | -function pegaParametros(tipo) | |
84 | -{ | |
85 | - if(tipo == "perfis" || arguments.length == 0 && $i("perfis")) | |
86 | - { | |
87 | - var retornaPerfis = function(retorno) | |
88 | - { | |
89 | - var r = retorno.data | |
90 | - var ins = "<table class=lista ><tr><td></td><td></td><td><b>Nome</td><td></td><td></td></tr>"; | |
91 | - for (i=0;i<r.length;i++) | |
92 | - { | |
93 | - ins += "<tr>" | |
94 | - ins += "<td><div class=excluir title='Excluir' onclick='excluir(\"perfis\",\""+r[i].id_perfil+"\")'/></td>" | |
95 | - ins += "<td>" | |
96 | - ins += "<div class=aplicar title='Aplicar' onclick='alterar(\"perfis\",\""+r[i].id_perfil+"\")'/>" | |
97 | - ins += "</td>" | |
98 | - ins += "<td><input onchange=this.style.color='blue' id='nomeperfil_"+r[i].id_perfil+"' type=text size=40 value='"+r[i].perfil+"'/></td>" | |
99 | - ins += "</tr>" | |
100 | - } | |
101 | - ins += "</table>" | |
102 | - $i("perfis").innerHTML = ins; | |
103 | - } | |
104 | - var p = "../php/menutemas.php?funcao=pegaPerfis"; | |
105 | - cPaint.call(p,"pegaPerfis",retornaPerfis); | |
106 | - } | |
107 | - if(tipo == "tags" || arguments.length == 0 && $i("tags")) | |
108 | - { | |
109 | - var retornaTags = function(retorno) | |
110 | - { | |
111 | - var r = retorno.data | |
112 | - var ins = "<table class=lista ><tr><td></td><td></td><td><b>Nome</td><td></td><td></td></tr>"; | |
113 | - for (i=0;i<r.length;i++) | |
114 | - { | |
115 | - ins += "<tr>" | |
116 | - ins += "<td><div class=excluir title='Excluir' onclick='excluir(\"tags\",\""+r[i].id_tag+"\")'/></td>" | |
117 | - ins += "<td>" | |
118 | - ins += "<div class=aplicar title='Aplicar' onclick='alterar(\"tags\",\""+r[i].id_tag+"\")'/>" | |
119 | - ins += "</td>" | |
120 | - ins += "<td><input onchange=this.style.color='blue' id='nometag_"+r[i].id_tag+"' type=text size=40 value='"+r[i].nome+"'/></td>" | |
121 | - ins += "</tr>" | |
122 | - } | |
123 | - ins += "</table>" | |
124 | - $i("tags").innerHTML = ins; | |
125 | - } | |
126 | - var p = "../php/menutemas.php?funcao=pegaTags"; | |
127 | - cPaint.call(p,"pegaTags",retornaTags); | |
128 | - } | |
129 | - if(tipo == "menus" || arguments.length == 0 && $i("menus")) | |
130 | - { | |
131 | - var retornaMenus = function(retorno) | |
132 | - { | |
133 | - var r = retorno.data | |
134 | - var ins = "<table class=lista ><tr><td></td><td></td><td><b>Publicado</td><td><b>Nome</td><td><b>Descrição</td><td><b>Aberto</td><td><b>Perfil</td><td></td></tr>"; | |
135 | - for (i=0;i<r.length;i++) | |
136 | - { | |
137 | - ins += "<tr>" | |
138 | - ins += "<td>id= "+r[i].id_menu+"<div class=excluir title='Excluir' onclick='excluir(\"menus\",\""+r[i].id_menu+"\")'/></td>" | |
139 | - ins += "<td><div class=aplicar title='Aplicar' onclick='alterar(\"menus\",\""+r[i].id_menu+"\")'/></td>" | |
140 | - ins += "<td><select onchange=this.style.color='blue' id='publicadomenu_"+r[i].id_menu+"' >" | |
141 | - ins += combosimnao(r[i].publicado_menu) | |
142 | - ins += "</td>" | |
143 | - ins += "<td><input onchange=this.style.color='blue' id='nomemenu_"+r[i].id_menu+"' type=text size=40 value='"+r[i].nome_menu+"'/></td>" | |
144 | - ins += "<td><input onchange=this.style.color='blue' id='descmenu_"+r[i].id_menu+"' type=text size=20 value='"+r[i].desc_menu+"' /></td>" | |
145 | - ins += "<td><select onchange=this.style.color='blue' id='abertomenu_"+r[i].id_menu+"' >" | |
146 | - ins += combosimnao(r[i].aberto) | |
147 | - ins += "</td>" | |
148 | - ins += "<td><input onchange=this.style.color='blue' id='perfilmenu_"+r[i].id_menu+"' type=text size=20 value='"+r[i].perfil_menu+"' /></td>" | |
149 | - var idtemp = 'perfilmenu_'+r[i].id_menu | |
150 | - ins += "<td><select onchange=\"registraPerfil('"+idtemp+"',this.value);this.style.color='blue'\" id='escolhePerfilMenu_"+r[i].id_menu+"' >" | |
151 | - ins += comboObjeto($perfis,"perfil","perfil","") | |
152 | - ins += "</select>" | |
153 | - ins += "</td>" | |
154 | - ins += "</tr>" | |
155 | - } | |
156 | - ins += "</table>" | |
157 | - $i("menus").innerHTML = ins; | |
158 | - } | |
159 | - var p = "../php/menutemas.php?funcao=pegaMenus"; | |
160 | - cPaint.call(p,"pegaMenus",retornaMenus); | |
161 | - } | |
162 | - if(tipo == "grupos" || arguments.length == 0 && $i("grupos")) | |
163 | - { | |
164 | - var retornaGrupos = function(retorno) | |
165 | - { | |
166 | - var r = retorno.data | |
167 | - var ins = "<table class=lista ><tr><td></td><td></td><td><b>Nome</td><td><b>Descrição</td></tr>"; | |
168 | - for (i=0;i<r.length;i++) | |
169 | - { | |
170 | - ins += montaOpcoes("grupo",r[i].id_grupo,r[i].nome_grupo,r[i].desc_grupo) | |
171 | - } | |
172 | - | |
173 | - ins += "</table>" | |
174 | - $i("grupos").innerHTML = ins; | |
175 | - } | |
176 | - var p = "../php/menutemas.php?funcao=pegaGrupos"; | |
177 | - cPaint.call(p,"pegaGrupos",retornaGrupos); | |
178 | - } | |
179 | - if(tipo == "subgrupos" || arguments.length == 0 && $i("subgrupos")) | |
180 | - { | |
181 | - var retornaSubGrupos = function(retorno) | |
182 | - { | |
183 | - var r = retorno.data | |
184 | - var ins = "<table class=lista ><tr><td></td><td></td><td><b>Nome</td><td><b>Descrição</td></tr>"; | |
185 | - for (i=0;i<r.length;i++) | |
186 | - { | |
187 | - ins += montaOpcoes("subgrupo",r[i].id_subgrupo,r[i].nome_subgrupo,r[i].desc_subgrupo) | |
188 | - } | |
189 | - ins += "</table>" | |
190 | - $i("subgrupos").innerHTML = ins; | |
191 | - } | |
192 | - var p = "../php/menutemas.php?funcao=pegaSubGrupos"; | |
193 | - cPaint.call(p,"pegaSubGrupos",retornaSubGrupos); | |
194 | - } | |
195 | - if(tipo == "temas" || arguments.length == 0 && $i("temas")) | |
196 | - { | |
197 | - var retornaTemas = function(retorno) | |
198 | - { | |
199 | - var r = retorno.data | |
200 | - ins = "" | |
201 | - for (var j=0;j<r.length;j++) | |
202 | - { | |
203 | - ins += "<div id=div_"+r[j].id_tema+" >" | |
204 | - var temp = montaDivTemas(r[j]) | |
205 | - ins += temp+"</div>" | |
206 | - } | |
207 | - $i("temas").innerHTML = ins; | |
208 | - ativaLegenda() | |
209 | - } | |
210 | - var p = "../php/menutemas.php?funcao=pegaTemas&filtro="+$i("filtro").value; | |
211 | - cPaint.call(p,"pegaTemas",retornaTemas); | |
212 | - } | |
213 | - | |
214 | - if(tipo == "arvore" || arguments.length == 0 && $i("arvore")) | |
215 | - { | |
216 | - var retornaArvore = function(retorno) | |
217 | - { | |
218 | - var r = retorno.data | |
219 | - var ins = "<table class=lista ><tr><td></td><td></td><td><b>Nome</td><td><b>Descrição</td></tr>"; | |
220 | - for (i=0;i<r.length;i++) | |
221 | - { | |
222 | - ins += "<tr>" | |
223 | - ins += "<td><div class=excluir title='Excluir' onclick='excluir(\"subgrupos\",\""+r[i].id_subgrupo+"\")'/></td>" | |
224 | - ins += "<td><div class=aplicar title='Aplicar' onclick='alterar(\"subgrupos\",\""+r[i].id_subgrupo+"\")'/></td>" | |
225 | - ins += "<td><input onchange=this.style.color='blue' id='nomesubgrupo_"+r[i].id_subgrupo+"' type=text size=40 value='"+r[i].nome_subgrupo+"'/></td>" | |
226 | - ins += "<td><input onchange=this.style.color='blue' id='descsubgrupo_"+r[i].id_subgrupo+"' type=text size=20 value='"+r[i].desc_subgrupo+"' /></td></tr>" | |
227 | - } | |
228 | - ins += "</table>" | |
229 | - $i("subgrupos").innerHTML = ins; | |
230 | - } | |
231 | - var p = "../php/menutemas.php?funcao=pegaSubXGrupos"; | |
232 | - cPaint.call(p,"pegaSubXGrupos",retornaSubXGrupos); | |
233 | - } | |
234 | -} | |
235 | -/* | |
236 | -Function: montaOpcoes | |
237 | -*/ | |
238 | -function montaOpcoes(prefixo,id,nome,desc,opc) | |
239 | -{ | |
240 | - var ins = "<tr>" | |
241 | - ins += "<td><div class=excluir title='Excluir' onclick='excluir(\""+prefixo+"s\",\""+id+"\")'/></td>" | |
242 | - ins += "<td><div class=aplicar title='Aplicar' onclick='alterar(\""+prefixo+"s\",\""+id+"\")'/></td>" | |
243 | - ins += "<td><input onchange=this.style.color='blue' id='nome"+prefixo+"_"+id+"' type=text size=40 value='"+nome+"'/></td>" | |
244 | - ins += "<td><input onchange=this.style.color='blue' id='desc"+prefixo+"_"+id+"' type=text size=20 value='"+desc+"' /></td></tr>" | |
245 | - return (ins) | |
246 | -} | |
247 | -/* | |
248 | -Function: montaDivTemas | |
249 | - | |
250 | -Preenche a div com os dados de um tema específico na edição da lista de temas | |
251 | - | |
252 | -Parameters: | |
253 | - | |
254 | -i - objeto json com os dados para montar o formulário | |
255 | -*/ | |
256 | -function montaDivTemas(i) | |
257 | -{ | |
258 | - var ins = "<br><fieldset><legend>+- "+i.nome_tema+"</legend>" | |
259 | - ins += "<div style=display:none > <table class=lista ><tr><td></td></tr>"; | |
260 | - var param = { | |
261 | - "linhas":[ | |
262 | - {titulo:"Nome do tema",prefixoid:"nometema_",id:"id_tema",valor:"nome_tema"}, | |
263 | - {titulo:"Descrição",prefixoid:"desctema_",id:"id_tema",valor:"desc_tema"}, | |
264 | - {titulo:"Link para a fonte",prefixoid:"linktema_",id:"id_tema",valor:"link_tema"} | |
265 | - ] | |
266 | - } | |
267 | - ins += (geraLinhas(i,param,2)); | |
268 | - | |
269 | - ins += "<tr><td>Tags (separe com espaço):</td><td>" | |
270 | - ins += "<input type=text size=40 value='"+i.tags_tema+"' id='tagstema_"+i.id_tema+"' >" | |
271 | - ins += "<select onchange='registraTag(\"tagstema_"+i.id_tema+"\",this.value)'>" | |
272 | - ins += comboObjeto($listaTags,"nome","nome","") | |
273 | - ins += "</select></td></tr>" | |
274 | - | |
275 | - ins += "<tr><td>Tipo:</td><td>" | |
276 | - ins += "<select id='tipoatema_"+i.id_tema+"' />" | |
277 | - ins += "<option value='' " | |
278 | - if (i.tipoa_tema == ""){ins += "selected";} | |
279 | - ins += ">---</option>" | |
280 | - ins += "<option value='WMS' " | |
281 | - if (i.tipoa_tema == "WMS"){ins += "selected";} | |
282 | - ins += " >WMS<option>" | |
283 | - | |
284 | - ins += "<tr><td>Mapfile:</td><td>" | |
285 | - ins += "<select id='codigotema_"+i.id_tema+"' >" | |
286 | - ins += combolista($listaDeMapfiles,i.codigo_tema) | |
287 | - ins += "</select></td></tr>" | |
288 | - | |
289 | - ins += "<tr><td>Permite acesso via WMS/WFS?</td><td>" | |
290 | - ins += "<select id='ogctema_"+i.id_tema+"' >" | |
291 | - ins += combosimnao(i.ogc_tema) | |
292 | - ins += "</select></td></tr>" | |
293 | - | |
294 | - ins += "<tr><td>Permite o download na aplicação datadownload.htm?</td><td>" | |
295 | - ins += "<select id='downloadtema_"+i.id_tema+"' >" | |
296 | - ins += combosimnao(i.download_tema) | |
297 | - ins += "</select></td></tr>" | |
298 | - | |
299 | - ins += "<tr><td>Permite acesso via kml?</td><td>" | |
300 | - ins += "<select id='kmltema_"+i.id_tema+"' >" | |
301 | - ins += combosimnao(i.kml_tema) | |
302 | - ins += "</select></td></tr>" | |
303 | - | |
304 | - ins += "</table>" | |
305 | - ins += "<table><tr>"; | |
306 | - ins += "<td><div class=excluir title='Excluir' onclick='excluir(\"temas\",\""+i.id_tema+"\")'/></td>" | |
307 | - ins += "<td><div class=aplicar title='Aplicar' onclick='alterar(\"temas\",\""+i.id_tema+"\")'/></td></table>" | |
308 | - | |
309 | - ins += "</div></fieldset>" | |
310 | - return(ins) | |
311 | -} | |
312 | -function registraTag(id,tag) | |
313 | -{ | |
314 | - var tags = $i(id).value | |
315 | - if(tag == "") | |
316 | - $i(id).value = tag | |
317 | - else | |
318 | - $i(id).value = $i(id).value+" "+tag | |
319 | -} | |
320 | - | |
321 | -/* | |
322 | -Function: alterar | |
323 | - | |
324 | -Altera o valor de uma variável | |
325 | -*/ | |
326 | -function alterar(prefixo,id) | |
327 | -{ | |
328 | - //if(confirm("Você realmente quer fazer isso?")) | |
329 | - //{ | |
330 | - var retorna = function() | |
331 | - {pegaParametros(prefixo);} | |
332 | - if(prefixo == "perfis") | |
333 | - { | |
334 | - if (id != "") | |
335 | - { | |
336 | - var nome = $i("nomeperfil_"+id).value | |
337 | - } | |
338 | - else | |
339 | - { | |
340 | - var nome = ""; | |
341 | - } | |
342 | - $i(prefixo).innerHTML =$mensagemAguarde | |
343 | - var p = "../php/menutemas.php?funcao=alteraPerfis&perfil="+nome+"&id="+id; | |
344 | - } | |
345 | - if(prefixo == "tags") | |
346 | - { | |
347 | - if (id != "") | |
348 | - { | |
349 | - var nome = $i("nometag_"+id).value | |
350 | - } | |
351 | - else | |
352 | - { | |
353 | - var nome = ""; | |
354 | - } | |
355 | - $i(prefixo).innerHTML =$mensagemAguarde | |
356 | - var p = "../php/menutemas.php?funcao=alteraTags&nome="+nome+"&id="+id; | |
357 | - //window.open(p) | |
358 | - } | |
359 | - if(prefixo == "menus") | |
360 | - { | |
361 | - if (id != "") | |
362 | - { | |
363 | - var nome = $i("nomemenu_"+id).value | |
364 | - var desc = $i("descmenu_"+id).value | |
365 | - var aberto = $i("abertomenu_"+id).value | |
366 | - var perfil = $i("perfilmenu_"+id).value | |
367 | - var publicado_menu = $i("publicadomenu_"+id).value | |
368 | - if(nome == "null"){var nome = "";} | |
369 | - if(desc == "null"){var desc = "";} | |
370 | - if(aberto == "null"){var aberto = "";} | |
371 | - if(perfil == "null"){var perfil = "";} | |
372 | - } | |
373 | - else | |
374 | - { | |
375 | - var nome = ""; | |
376 | - var desc = ""; | |
377 | - var aberto = ""; | |
378 | - var perfil = ""; | |
379 | - var publicado_menu = ""; | |
380 | - } | |
381 | - $i(prefixo).innerHTML =$mensagemAguarde | |
382 | - var p = "../php/menutemas.php?funcao=alteraMenus&publicado_menu="+publicado_menu+"&perfil="+perfil+"&nome="+nome+"&desc="+desc+"&id="+id+"&aberto="+aberto; | |
383 | - } | |
384 | - if(prefixo == "grupos") | |
385 | - { | |
386 | - if (id != "") | |
387 | - { | |
388 | - var nome = $i("nomegrupo_"+id).value | |
389 | - var desc = $i("descgrupo_"+id).value | |
390 | - if(nome == "null"){var nome = "";} | |
391 | - if(desc == "null"){var desc = "";} | |
392 | - } | |
393 | - else | |
394 | - { | |
395 | - var nome = ""; | |
396 | - var desc = ""; | |
397 | - } | |
398 | - $i(prefixo).innerHTML =$mensagemAguarde | |
399 | - var p = "../php/menutemas.php?funcao=alteraGrupos&nome="+nome+"&desc="+desc+"&id="+id; | |
400 | - } | |
401 | - if(prefixo == "subgrupos") | |
402 | - { | |
403 | - if (id != "") | |
404 | - { | |
405 | - var nome = $i("nomesubgrupo_"+id).value | |
406 | - var desc = $i("descsubgrupo_"+id).value | |
407 | - if(nome == "null"){var nome = "";} | |
408 | - if(desc == "null"){var desc = "";} | |
409 | - } | |
410 | - else | |
411 | - { | |
412 | - var nome = ""; | |
413 | - var desc = ""; | |
414 | - } | |
415 | - $i(prefixo).innerHTML =$mensagemAguarde | |
416 | - var p = "../php/menutemas.php?funcao=alteraSubGrupos&nome="+nome+"&desc="+desc+"&id="+id; | |
417 | - } | |
418 | - if(prefixo == "temas") | |
419 | - { | |
420 | - if (id != "") | |
421 | - { | |
422 | - var nome = $i("nometema_"+id).value | |
423 | - var codigo = $i("codigotema_"+id).value | |
424 | - var desc = $i("desctema_"+id).value | |
425 | - var tipoa = $i("tipoatema_"+id).value | |
426 | - var link = $i("linktema_"+id).value | |
427 | - var ogc = $i("ogctema_"+id).value | |
428 | - var kml = $i("kmltema_"+id).value | |
429 | - var download = $i("downloadtema_"+id).value | |
430 | - var tags = $i("tagstema_"+id).value | |
431 | - if(nome == "null"){var nome = "";} | |
432 | - if(codigo == "null"){var codigo = "";} | |
433 | - if(desc == "null"){var desc = "";} | |
434 | - if(tipoa == "null"){var tipoa = "";} | |
435 | - if(link == "null"){var link = "";} | |
436 | - if(ogc == "null"){var ogc = "";} | |
437 | - if(kml == "null"){var kml = "";} | |
438 | - if(download == "null"){var download = "";} | |
439 | - if(tags == "null"){var tags = "";} | |
440 | - } | |
441 | - else | |
442 | - { | |
443 | - var nome = ""; | |
444 | - var codigo = ""; | |
445 | - var desc = ""; | |
446 | - var link = ""; | |
447 | - var tipoa = ""; | |
448 | - var ogc = ""; | |
449 | - var kml = ""; | |
450 | - var download = ""; | |
451 | - var tags = ""; | |
452 | - } | |
453 | - $i(prefixo).innerHTML =$mensagemAguarde | |
454 | - 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; | |
455 | - } | |
456 | - | |
457 | - cPaint.call(p,"",retorna); | |
458 | - //} | |
459 | -} | |
460 | -/* | |
461 | -Function: excluir | |
462 | - | |
463 | -Exclui um registro | |
464 | -*/ | |
465 | -function excluir(prefixo,id) | |
466 | -{ | |
467 | - if(confirm("Você realmente quer fazer isso?")) | |
468 | - { | |
469 | - var retorna = function() | |
470 | - {pegaParametros(prefixo);} | |
471 | - $i(prefixo).innerHTML = $mensagemAguarde | |
472 | - var p = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela="+prefixo; | |
473 | - cPaint.call(p,"",retorna); | |
474 | - } | |
475 | -} | |
476 | - | |
477 | -/* | |
478 | -Function: pegaMapfiles | |
479 | - | |
480 | -Pega a lista de mapfiles existentes no i3geo | |
481 | - | |
482 | -Parameters: | |
483 | - | |
484 | -retorna - nome da função que processará o resultado | |
485 | -*/ | |
486 | -function pegaMapfiles(retorna) | |
487 | -{ | |
488 | - var cPaint = new cpaint(); | |
489 | - //cPaint.set_async("true"); | |
490 | - cPaint.set_response_type("JSON"); | |
491 | - var p = "../php/menutemas.php?funcao=listaMapsTemas"; | |
492 | - cPaint.call(p,"listaMapsTemas",retorna); | |
493 | -} |
admin/js/temasold.js
... | ... | @@ -59,88 +59,13 @@ function pegaClasses(codigoMap,codigoLayer) |
59 | 59 | ins += "<br><fieldset><legend style=color:brown >+- Label (para ativar, defina LABELITEM em caract. gerais)</legend><div style=display:none >" |
60 | 60 | var param = { |
61 | 61 | "linhas":[ |
62 | - {texto:"Color to draw text with.", | |
63 | - titulo:"color",prefixoid:"label_color_",id:codigoLayer+"_"+d.id,valor:"label.color"}, | |
64 | - {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.", | |
65 | - titulo:"size",prefixoid:"label_size_",id:codigoLayer+"_"+d.id,valor:"label.size"}, | |
66 | - {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.", | |
67 | - titulo:"position",prefixoid:"label_position_",id:codigoLayer+"_"+d.id,valor:"label.position"}, | |
68 | - {texto:"Padding, in pixels, around labels. Useful for maintaining spacing around text to enhance readability. Available only for cached labels. Default is 0.", | |
69 | - titulo:"buffer",prefixoid:"label_buffer_",id:codigoLayer+"_"+d.id,valor:"label.buffer"} | |
70 | 62 | ] |
71 | 63 | } |
72 | 64 | |
73 | - ins += "<br><fieldset><legend>+- font</legend><div style=display:none >" | |
74 | - ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>Font alias (as defined in the FONTSET) to use for labeling.</p>" | |
75 | - ins += "<p><select onchange='this.style.color=\"blue\"' id='label_font_"+codigoLayer+"_"+d.id+"' >" | |
76 | - ins += combolista(fontes,d.dados.label.font) | |
77 | - ins += "</select>" | |
78 | - ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarClasseLabel(\""+codigoLayer+"_"+d.id+"\",\".font\",this)'/>" | |
79 | - ins += "</p></div></fieldset>" | |
80 | - | |
81 | - ins += "<br><fieldset><legend>+- type</legend><div style=display:none >" | |
82 | - ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>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.</p>" | |
83 | - ins += "<p><select onchange='this.style.color=\"blue\"' id='label_type_"+codigoLayer+"_"+d.id+"' >" | |
84 | - ins += comboObjeto(objfonttypes,"valor","texto",d.dados.label.type) | |
85 | - ins += "</select>" | |
86 | - ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarClasseLabel(\""+codigoLayer+"_"+d.id+"\",\".type\",this)'/>" | |
87 | - ins += "</p></div></fieldset>" | |
88 | - | |
89 | - ins += "<br><fieldset><legend>+- partials</legend><div style=display:none >" | |
90 | - ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>Can text run off the edge of the map? Default is true.</p>" | |
91 | - ins += "<p><select onchange='this.style.color=\"blue\"' id='label_type_"+codigoLayer+"_"+d.id+"' >" | |
92 | - ins += comboObjeto(objbool_tf,"valor","texto",d.dados.label.partials) | |
93 | - ins += "</select>" | |
94 | - ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarClasseLabel(\""+codigoLayer+"_"+d.id+"\",\".partials\",this)'/>" | |
95 | - ins += "</p></div></fieldset>" | |
96 | - | |
97 | - ins += "<br><fieldset><legend>+- force</legend><div style=display:none >" | |
98 | - ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>Forces labels for a particular class on, regardless of collisions. Available only for cached labels. Default is false.</p>" | |
99 | - ins += "<p><select onchange='this.style.color=\"blue\"' id='label_type_"+codigoLayer+"_"+d.id+"' >" | |
100 | - ins += comboObjeto(objbool_tf,"valor","texto",d.dados.label.force) | |
101 | - ins += "</select>" | |
102 | - ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarClasseLabel(\""+codigoLayer+"_"+d.id+"\",\".force\",this)'/>" | |
103 | - ins += "</p></div></fieldset>" | |
104 | 65 | |
105 | 66 | ins += (geraLinhas2(d.dados,param,"salvarClasseLabel")); |
106 | 67 | var param = { |
107 | 68 | "linhas":[ |
108 | - {texto:"Color to draw a background rectangle (i.e. billboard). Off by default.", | |
109 | - titulo:"backgroundcolor",prefixoid:"label_backgroundcolor_",id:codigoLayer+"_"+d.id,valor:"label.backgroundcolor"}, | |
110 | - {texto:"Color to draw a background rectangle (i.e. billboard) shadow. Off by default.", | |
111 | - titulo:"backgroundshadowcolor",prefixoid:"label_backgroundshadowcolor_",id:codigoLayer+"_"+d.id,valor:"label.backgroundshadowcolor"}, | |
112 | - {texto:"Color to draw a one pixel outline around the text.", | |
113 | - titulo:"outlinecolor",prefixoid:"label_outlinecolor_",id:codigoLayer+"_"+d.id,valor:"label.outlinecolor"}, | |
114 | - {texto:"Color of drop shadow.", | |
115 | - titulo:"shadowcolor",prefixoid:"label_shadowcolor_",id:codigoLayer+"_"+d.id,valor:"label.shadowcolor"}, | |
116 | - {texto:"Shadow offset in pixels.", | |
117 | - titulo:"shadowsizex",prefixoid:"label_shadowsizex_",id:codigoLayer+"_"+d.id,valor:"label.shadowsizex"}, | |
118 | - {texto:"Shadow offset in pixels.", | |
119 | - titulo:"shadowsizey",prefixoid:"label_shadowsizey_",id:codigoLayer+"_"+d.id,valor:"label.shadowsizey"}, | |
120 | - {texto:"How far should the background rectangle be offset? Default is 1.", | |
121 | - titulo:"backgroundshadowsizex",prefixoid:"label_backgroundshadowsizex_",id:codigoLayer+"_"+d.id,valor:"label.backgroundshadowsizex"}, | |
122 | - {texto:"How far should the background rectangle be offset? Default is 1.", | |
123 | - titulo:"backgroundshadowsizey",prefixoid:"label_backgroundshadowsizey_",id:codigoLayer+"_"+d.id,valor:"label.backgroundshadowsizey"}, | |
124 | - {texto:"Minimum font size to use when scaling text (pixels). Default is 4.", | |
125 | - titulo:"minsize",prefixoid:"label_minsize_",id:codigoLayer+"_"+d.id,valor:"label.minsize"}, | |
126 | - {texto:"Maximum font size to use when scaling text (pixels). Default is 256.", | |
127 | - titulo:"maxsize",prefixoid:"label_maxsize_",id:codigoLayer+"_"+d.id,valor:"label.maxsize"}, | |
128 | - {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.", | |
129 | - titulo:"offsetx",prefixoid:"label_offsetx_",id:codigoLayer+"_"+d.id,valor:"label.offsetx"}, | |
130 | - {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.", | |
131 | - titulo:"offsety",prefixoid:"label_offsety_",id:codigoLayer+"_"+d.id,valor:"label.offsety"}, | |
132 | - {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", | |
133 | - titulo:"angle",prefixoid:"label_angle_",id:codigoLayer+"_"+d.id,valor:"label.angle"}, | |
134 | - {texto:"Should text be antialiased? Note that this requires more available colors, decreased drawing performance, and results in slightly larger output images.", | |
135 | - titulo:"antialias",prefixoid:"label_antialias_",id:codigoLayer+"_"+d.id,valor:"label.antialias"}, | |
136 | - {texto:"Character that represents an end-of-line condition in label text, thus resulting in a multi-line label.", | |
137 | - titulo:"wrap",prefixoid:"label_wrap_",id:codigoLayer+"_"+d.id,valor:"label.wrap"}, | |
138 | - {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.", | |
139 | - titulo:"minfeaturesize",prefixoid:"label_minfeaturesize_",id:codigoLayer+"_"+d.id,valor:"label.minfeaturesize"}, | |
140 | - {texto:"Minimum distance between duplicate labels. Given in pixels.", | |
141 | - titulo:"mindistance",prefixoid:"label_mindistance_",id:codigoLayer+"_"+d.id,valor:"label.mindistance"}, | |
142 | - {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.", | |
143 | - titulo:"encoding",prefixoid:"label_encoding_",id:codigoLayer+"_"+d.id,valor:"label.encoding"} | |
144 | 69 | ] |
145 | 70 | } |
146 | 71 | ins += "<br><fieldset style=background-color:#f0e68c ><legend style=color:brown >+- Mais...</legend><div style=display:none >" |
... | ... | @@ -165,67 +90,7 @@ function pegaClasses(codigoMap,codigoLayer) |
165 | 90 | } |
166 | 91 | function pegaEstilos(codigoMap,codigoLayer) |
167 | 92 | { |
168 | - var retorna = function(retorno) | |
169 | - { | |
170 | - var nc = retorno.data.length | |
171 | - for(c=0;c<nc;c++) | |
172 | - { | |
173 | - var idclasse = retorno.data[c].classe | |
174 | - var estilos = retorno.data[c].estilos | |
175 | - var divestilos = "estilos_"+codigoLayer+"_"+idclasse; | |
176 | - var nes = retorno.data[c].estilos.length | |
177 | - for(est=0;est<nes;est++) | |
178 | - { | |
179 | - var ins = "" | |
180 | - var d = retorno.data[c].estilos[est].dados | |
181 | - var preid = codigoLayer+"_"+idclasse+"_"+est | |
182 | - var param = { | |
183 | - "linhas":[ | |
184 | - {texto:"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.", | |
185 | - titulo:"symbolname",prefixoid:"",id:"symbolname_"+preid,valor:"symbolname"}, | |
186 | - {texto:"Color to use for drawing features.", | |
187 | - titulo:"color",prefixoid:"",id:"color_"+preid,valor:"color"}, | |
188 | - {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.", | |
189 | - titulo:"size",prefixoid:"",id:"size_"+preid,valor:"size"}, | |
190 | - {texto:"Color to use for outlining polygons and certain marker symbols. Line symbols do not support outline colors.", | |
191 | - titulo:"outlinecolor",prefixoid:"",id:"outlinecolor_"+preid,valor:"outlinecolor"}, | |
192 | - {texto:"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.", | |
193 | - titulo:"width",prefixoid:"",id:"width_"+preid,valor:"width"}, | |
194 | - ] | |
195 | - } | |
196 | - ins += "<br><fieldset style='background-color:rgb(240,240,240)'><legend>+- "+est+"</legend>" | |
197 | - ins += (geraLinhas2(d,param,"salvarEstilo")); | |
198 | - | |
199 | - var param = { | |
200 | - "linhas":[ | |
201 | - {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.", | |
202 | - titulo:"minsize",prefixoid:"",id:"minsize_"+preid,valor:"minsize"}, | |
203 | - {texto:"Maximum size in pixels to draw a symbol. Default is 50.", | |
204 | - titulo:"maxsize",prefixoid:"",id:"maxsize_"+preid,valor:"maxsize"}, | |
205 | - {texto:"Offset values for shadows, hollow symbols, etc ...", | |
206 | - titulo:"offsetx",prefixoid:"",id:"offsetx_"+preid,valor:"offsetx"}, | |
207 | - {texto:"Offset values for shadows, hollow symbols, etc ...", | |
208 | - titulo:"offsety",prefixoid:"",id:"offsety_"+preid,valor:"offsety"}, | |
209 | - {texto:"Should TrueType fonts and Cartoline symbols be antialiased.", | |
210 | - titulo:"antialias",prefixoid:"",id:"antialias_"+preid,valor:"antialias"}, | |
211 | - {texto:"Minimum width in pixels to draw the line work.", | |
212 | - titulo:"minwidth",prefixoid:"",id:"minwidth_"+preid,valor:"minwidth"}, | |
213 | - {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.", | |
214 | - titulo:"angle",prefixoid:"",id:"angle_"+preid,valor:"angle"}, | |
215 | - {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.", | |
216 | - titulo:"angleitem",prefixoid:"",id:"angleitem_"+preid,valor:"angleitem"}, | |
217 | - {texto:"For MapServer versions <5, this is the attribute/field that stores the size to be used in rendering. Value is given in pixels.", | |
218 | - titulo:"sizeitem",prefixoid:"",id:"sizeitem_"+preid,valor:"sizeitem"} | |
219 | - ] | |
220 | - } | |
221 | - ins += "<br><fieldset style=background-color:#f0e68c ><legend style=color:brown >+- Mais...</legend><div style=display:none >" | |
222 | - ins += (geraLinhas2(d,param,"salvarEstilo")); | |
223 | - ins += "</fieldset>" | |
224 | - ins += "</fieldset>" | |
225 | - $i(divestilos).innerHTML = ins | |
226 | - } | |
227 | - } | |
228 | - ativaLegenda() | |
93 | + | |
229 | 94 | } |
230 | 95 | var p = "../php/temas.php?funcao=pegaEstilos&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer; |
231 | 96 | cPaint.call(p,"",retorna); | ... | ... |
admin/php/admin.php
... | ... | @@ -51,6 +51,7 @@ error_reporting(E_ALL); |
51 | 51 | //carrega o phpmapscript |
52 | 52 | // |
53 | 53 | include_once ($locaplic."/classesphp/carrega_ext.php"); |
54 | +include_once ($locaplic."/classesphp/funcoes_gerais.php"); | |
54 | 55 | // |
55 | 56 | //verifica se o cliente pode editar |
56 | 57 | //se funcao for verificaEditores vai para case específico | ... | ... |
admin/php/atlas.php
... | ... | @@ -29,7 +29,6 @@ File: i3geo/admin/sistemas.php |
29 | 29 | */ |
30 | 30 | |
31 | 31 | include_once("admin.php"); |
32 | -$cp = new cpaint(); | |
33 | 32 | //faz a busca da função que deve ser executada |
34 | 33 | switch ($funcao) |
35 | 34 | { |
... | ... | @@ -103,8 +102,8 @@ switch ($funcao) |
103 | 102 | break; |
104 | 103 | |
105 | 104 | case "importarXmlAtlas": |
106 | - $cp->set_data(importarXmlAtlas()); | |
107 | - $cp->return_data(); | |
105 | + retornaJSON(importarXmlAtlas()); | |
106 | + exit; | |
108 | 107 | break; |
109 | 108 | } |
110 | 109 | function movimentaNo() | ... | ... |
admin/php/editormapfile.php
... | ... | @@ -31,7 +31,7 @@ File: i3geo/admin/sistemas.php |
31 | 31 | include_once("admin.php"); |
32 | 32 | include_once("../../ms_configura.php"); |
33 | 33 | include_once("../../classesphp/funcoes_gerais.php"); |
34 | -error_reporting(0); | |
34 | +error_reporting(E_ALL); | |
35 | 35 | //faz a busca da função que deve ser executada |
36 | 36 | switch ($funcao) |
37 | 37 | { |
... | ... | @@ -97,6 +97,15 @@ switch ($funcao) |
97 | 97 | retornaJSON(listaEstilos()); |
98 | 98 | exit; |
99 | 99 | break; |
100 | + case "pegaEstilo": | |
101 | + retornaJSON(pegaEstilo()); | |
102 | + exit; | |
103 | + break; | |
104 | + case "alterarEstilo": | |
105 | + alterarEstilo(); | |
106 | + retornaJSON(pegaEstilo()); | |
107 | + exit; | |
108 | + break; | |
100 | 109 | case "pegaConexao": |
101 | 110 | retornaJSON(pegaConexao()); |
102 | 111 | exit; |
... | ... | @@ -138,6 +147,61 @@ switch ($funcao) |
138 | 147 | retornaJSON(pegaClasseLabel()); |
139 | 148 | exit; |
140 | 149 | break; |
150 | + case "alterarClasseLabel": | |
151 | + alterarClasseLabel(); | |
152 | + retornaJSON(pegaClasseLabel()); | |
153 | + exit; | |
154 | + break; | |
155 | + case "movimentaNo": | |
156 | + $res = sobeDesce(); | |
157 | + retornaJSON($res); | |
158 | + exit; | |
159 | + break; | |
160 | +} | |
161 | +function sobeDesce() | |
162 | +{ | |
163 | + global $movimento,$tipo,$codigoMap,$codigoLayer,$indiceClasse,$indiceEstilo,$locaplic; | |
164 | + $mapfile = $locaplic."/temas/".$codigoMap.".map"; | |
165 | + $mapa = ms_newMapObj($mapfile); | |
166 | + $layer = $mapa->getlayerbyname($codigoLayer); | |
167 | + if($movimento == "sobe") | |
168 | + { | |
169 | + if($tipo == "layer") | |
170 | + { | |
171 | + $indice = $layer->index; | |
172 | + $mapa->moveLayerUp($indice); | |
173 | + } | |
174 | + if($tipo == "classe") | |
175 | + { | |
176 | + $layer->moveclassup($indiceClasse); | |
177 | + } | |
178 | + if($tipo == "estilo") | |
179 | + { | |
180 | + $classe = $layer->getclass($indiceClasse); | |
181 | + $classe->movestyleup($indiceEstilo); | |
182 | + } | |
183 | + | |
184 | + } | |
185 | + if($movimento == "desce") | |
186 | + { | |
187 | + if($tipo == "layer") | |
188 | + { | |
189 | + $indice = $layer->index; | |
190 | + $mapa->moveLayerDown($indice); | |
191 | + } | |
192 | + if($tipo == "classe") | |
193 | + { | |
194 | + $layer->moveclassdown($indiceClasse); | |
195 | + } | |
196 | + if($tipo == "estilo") | |
197 | + { | |
198 | + $classe = $layer->getclass($indiceClasse); | |
199 | + $classe->movestyledown($indiceEstilo); | |
200 | + } | |
201 | + } | |
202 | + $mapa->save($mapfile); | |
203 | + removeCabecalho($mapfile); | |
204 | + return "ok"; | |
141 | 205 | } |
142 | 206 | function criarNovoMap() |
143 | 207 | { |
... | ... | @@ -345,18 +409,7 @@ function pegaMetadados() |
345 | 409 | $dados["aplicaextensao"] = $layer->getmetadata("aplicaextensao"); |
346 | 410 | $dados["codigoMap"] = $codigoMap; |
347 | 411 | $dados["codigoLayer"] = $codigoLayer; |
348 | - $colunas = ""; | |
349 | - if($layer->type < 3) | |
350 | - { | |
351 | - if(@$layer->open()) | |
352 | - { | |
353 | - $layer->open(); | |
354 | - $colunas = implode(", ",$layer->getitems()); | |
355 | - $layer->close(); | |
356 | - } | |
357 | - } | |
358 | - $dados["colunas"] = $colunas; | |
359 | - | |
412 | + $dados["colunas"] = implode(" ,",pegaItens($layer)); | |
360 | 413 | return $dados; |
361 | 414 | } |
362 | 415 | function alterarMetadados() |
... | ... | @@ -417,21 +470,11 @@ function pegaGeral() |
417 | 470 | $dados["sizeunits"] = $layer->sizeunits; |
418 | 471 | $dados["projection"] = $layer->getProjection(); |
419 | 472 | $dados["name"] = $layer->name; |
420 | - $colunas = ""; | |
421 | - if($layer->type < 3) | |
422 | - { | |
423 | - if(@$layer->open()) | |
424 | - { | |
425 | - $layer->open(); | |
426 | - $colunas = implode(", ",$layer->getitems()); | |
427 | - $layer->close(); | |
428 | - } | |
429 | - } | |
430 | 473 | if($dados["projection"] == "null") |
431 | 474 | $dados["projection"] = ""; |
432 | - $dados["colunas"] = $colunas; | |
433 | 475 | $dados["codigoMap"] = $codigoMap; |
434 | 476 | $dados["codigoLayer"] = $codigoLayer; |
477 | + $dados["colunas"] = implode(" ,",pegaItens($layer)); | |
435 | 478 | return $dados; |
436 | 479 | } |
437 | 480 | function alterarGeral() |
... | ... | @@ -496,16 +539,7 @@ function pegaClasseGeral() |
496 | 539 | $dados["codigoMap"] = $codigoMap; |
497 | 540 | $dados["codigoLayer"] = $codigoLayer; |
498 | 541 | $dados["indiceClasse"] = $indiceClasse; |
499 | - $colunas = ""; | |
500 | - if($layer->type < 3) | |
501 | - { | |
502 | - if(@$layer->open()) | |
503 | - { | |
504 | - $layer->open(); | |
505 | - $colunas = implode(", ",$layer->getitems()); | |
506 | - $layer->close(); | |
507 | - } | |
508 | - } | |
542 | + $dados["colunas"] = implode(" ,",pegaItens($layer)); | |
509 | 543 | return $dados; |
510 | 544 | } |
511 | 545 | function alterarClasseGeral() |
... | ... | @@ -569,144 +603,118 @@ function pegaClasseLabel() |
569 | 603 | $dados["codigoMap"] = $codigoMap; |
570 | 604 | $dados["codigoLayer"] = $codigoLayer; |
571 | 605 | $dados["indiceClasse"] = $indiceClasse; |
572 | - $colunas = ""; | |
573 | - if($layer->type < 3) | |
574 | - { | |
575 | - if(@$layer->open()) | |
576 | - { | |
577 | - $layer->open(); | |
578 | - $colunas = implode(", ",$layer->getitems()); | |
579 | - $layer->close(); | |
580 | - } | |
581 | - } | |
582 | - return $dados; | |
583 | -} | |
584 | - | |
585 | - | |
586 | - | |
587 | - | |
588 | - | |
589 | - | |
590 | - | |
591 | - | |
592 | - | |
593 | - | |
594 | - | |
595 | - | |
596 | - | |
597 | - | |
598 | - | |
599 | - | |
600 | - | |
601 | - | |
602 | -function pegaFontes() | |
603 | -{ | |
604 | - $arq = "../../symbols/fontes.txt"; | |
606 | + $dados["colunas"] = implode(" ,",pegaItens($layer)); | |
607 | + $arq = $locaplic."/symbols/fontes.txt"; | |
605 | 608 | $h = fopen ($arq,"r"); |
606 | 609 | while ($i = fscanf ($h, "%s\t%s\t")) |
607 | 610 | { |
608 | 611 | list ($f,$g) = $i; |
609 | 612 | $nome[] = $f; |
610 | 613 | } |
611 | - return $nome; | |
614 | + $dados["fontes"] = $nome; | |
615 | + return $dados; | |
612 | 616 | } |
613 | -function alteraEstilo() | |
617 | +function alterarClasseLabel() | |
614 | 618 | { |
615 | - global $codigoMap,$codigoLayer,$classe,$estilo,$parametro,$valor; | |
616 | - $mapfile = "../../temas/".$codigoMap.".map"; | |
619 | + 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; | |
620 | + $dados = array(); | |
621 | + $mapfile = $locaplic."/temas/".$codigoMap.".map"; | |
617 | 622 | $mapa = ms_newMapObj($mapfile); |
618 | 623 | $layer = $mapa->getlayerbyname($codigoLayer); |
619 | - $classe = $layer->getclass($classe); | |
620 | - $estilo = $classe->getstyle($estilo); | |
621 | - $ok = false; | |
622 | - $cor = ""; | |
623 | - switch ($parametro) | |
624 | - { | |
625 | - case "backgroundcolor": | |
626 | - $cor = $estilo->backgroundcolor; | |
627 | - $ok = true; | |
628 | - break; | |
629 | - case "color": | |
630 | - $cor = $estilo->color; | |
631 | - $ok = true; | |
632 | - break; | |
633 | - case "outlinecolor": | |
634 | - $cor = $estilo->outlinecolor; | |
635 | - $ok = true; | |
636 | - break; | |
637 | - default: | |
638 | - if(!$ok)$estilo->set($parametro,$valor); | |
639 | - } | |
640 | - if ($cor != "") | |
624 | + $classe = $layer->getclass($indiceClasse); | |
625 | + $label = $classe->label; | |
626 | + if ($label != "") | |
641 | 627 | { |
642 | - $c = explode(",",$valor); | |
643 | - if(count($c) < 3) | |
644 | - $c = explode(" ",$valor); | |
645 | - $cor->setrgb($c[0],$c[1],$c[2]); | |
628 | + $label->set("font",$font); | |
629 | + $label->set("type",$type); | |
630 | + corE($label,$backgroundcolor,"backgroundcolor"); | |
631 | + corE($label,$backgroundshadowcolor,"backgroundshadowcolor"); | |
632 | + corE($label,$color,"color"); | |
633 | + corE($label,$outlinecolor,"outlinecolor"); | |
634 | + corE($label,$shadowcolor,"shadowcolor"); | |
635 | + $label->set("shadowsizex",$shadowsizex); | |
636 | + $label->set("shadowsizey",$shadowsizey); | |
637 | + $label->set("backgroundshadowsizex",$backgroundshadowsizex); | |
638 | + $label->set("backgroundshadowsizey",$backgroundshadowsizey); | |
639 | + $label->set("size",$size); | |
640 | + $label->set("minsize",$minsize); | |
641 | + $label->set("maxsize",$maxsize); | |
642 | + $label->set("position",$position); | |
643 | + $label->set("offsetx",$offsetx); | |
644 | + $label->set("offsety",$offsety); | |
645 | + $label->set("angle",$angle); | |
646 | + $label->set("autoangle",$autoangle); | |
647 | + $label->set("buffer",$buffer); | |
648 | + $label->set("antialias",$antialias); | |
649 | + $label->set("wrap",$wrap); | |
650 | + $label->set("minfeaturesize",$minfeaturesize); | |
651 | + //$label->set("autominfeaturesize",$autominfeaturesize); | |
652 | + $label->set("mindistance",$mindistance); | |
653 | + $label->set("partials",$partials); | |
654 | + $label->set("force",$force); | |
655 | + $label->set("encoding",$encoding); | |
656 | + $label->set("autoangle",$autoangle); | |
646 | 657 | } |
647 | 658 | $mapa->save($mapfile); |
648 | 659 | removeCabecalho($mapfile); |
649 | 660 | return "ok"; |
650 | 661 | } |
651 | - | |
652 | -function alteraClasseLabel() | |
662 | +function pegaEstilo() | |
653 | 663 | { |
654 | - global $codigoMap,$codigoLayer,$classe,$parametro,$valor; | |
655 | - $mapfile = "../../temas/".$codigoMap.".map"; | |
664 | + global $codigoMap,$codigoLayer,$indiceClasse,$indiceEstilo,$locaplic; | |
665 | + $dados = array(); | |
666 | + $mapfile = $locaplic."/temas/".$codigoMap.".map"; | |
656 | 667 | $mapa = ms_newMapObj($mapfile); |
657 | 668 | $layer = $mapa->getlayerbyname($codigoLayer); |
658 | - $classe = $layer->getclass($classe); | |
659 | - $label = $classe->label; | |
660 | - $ok = false; | |
661 | - $cor = ""; | |
662 | - switch ($parametro) | |
663 | - { | |
664 | - case "backgroundcolor": | |
665 | - $cor = $label->backgroundcolor; | |
666 | - $ok = true; | |
667 | - break; | |
668 | - case "backgroundshadowcolor": | |
669 | - $cor = $label->backgroundshadowcolor; | |
670 | - $ok = true; | |
671 | - break; | |
672 | - case "color": | |
673 | - $cor = $label->color; | |
674 | - $ok = true; | |
675 | - break; | |
676 | - case "outlinecolor": | |
677 | - $cor = $label->outlinecolor; | |
678 | - $ok = true; | |
679 | - break; | |
680 | - case "shadowcolor": | |
681 | - $cor = $label->shadowcolor; | |
682 | - $ok = true; | |
683 | - break; | |
684 | - case "shadowsizex": | |
685 | - $cor = $label->shadowsizex; | |
686 | - $ok = true; | |
687 | - break; | |
688 | - case "shadowsizey": | |
689 | - $cor = $label->shadowsizey; | |
690 | - $ok = true; | |
691 | - break; | |
692 | - case "backgroundshadowsizex": | |
693 | - $cor = $label->backgroundshadowsizex; | |
694 | - $ok = true; | |
695 | - break; | |
696 | - case "backgroundshadowsizey": | |
697 | - $cor = $label->backgroundshadowsizey; | |
698 | - $ok = true; | |
699 | - break; | |
700 | - default: | |
701 | - if(!$ok)$label->set($parametro,$valor); | |
702 | - } | |
703 | - if ($cor != "") | |
704 | - { | |
705 | - $c = explode(",",$valor); | |
706 | - if(count($c) < 3) | |
707 | - $c = explode(" ",$valor); | |
708 | - $cor->setrgb($c[0],$c[1],$c[2]); | |
709 | - } | |
669 | + $nclasses = $layer->numclasses; | |
670 | + $classe = $layer->getclass($indiceClasse); | |
671 | + $estilo = $classe->getstyle($indiceEstilo); | |
672 | + $dados["symbolname"] = $estilo->symbolname; | |
673 | + $dados["color"] = $estilo->color->red.",".$estilo->color->green.",".$estilo->color->blue; | |
674 | + $dados["size"] = $estilo->size; | |
675 | + $dados["minsize"] = $estilo->minsize; | |
676 | + $dados["maxsize"] = $estilo->maxsize; | |
677 | + $dados["offsetx"] = $estilo->offsetx; | |
678 | + $dados["offsety"] = $estilo->offsety; | |
679 | + $dados["antialias"] = $estilo->antialias; | |
680 | + $dados["backgroundcolor"] = $estilo->backgroundcolor->red.",".$estilo->backgroundcolor->green.",".$estilo->backgroundcolor->blue; | |
681 | + $dados["outlinecolor"] = $estilo->outlinecolor->red.",".$estilo->outlinecolor->green.",".$estilo->outlinecolor->blue; | |
682 | + $dados["width"] = $estilo->width; | |
683 | + $dados["minwidth"] = $estilo->minwidth; | |
684 | + $dados["maxwidth"] = $estilo->maxwidth; | |
685 | + $dados["angle"] = $estilo->angle; | |
686 | + $dados["codigoMap"] = $codigoMap; | |
687 | + $dados["codigoLayer"] = $codigoLayer; | |
688 | + $dados["indiceClasse"] = $indiceClasse; | |
689 | + $dados["indiceEstilo"] = $indiceEstilo; | |
690 | + //$dados["opacity"] = $estilo->opacity; | |
691 | + return $dados; | |
692 | +} | |
693 | +function alterarEstilo() | |
694 | +{ | |
695 | + global $codigoMap,$codigoLayer,$indiceClasse,$indiceEstilo,$locaplic,$angle,$maxwidth,$minwidth,$width,$outlinecolor,$backgroundcolor,$antialias,$offsety,$offsetx,$maxsize,$minsize,$size,$color,$symbolname; | |
696 | + $dados = array(); | |
697 | + $mapfile = $locaplic."/temas/".$codigoMap.".map"; | |
698 | + $mapa = ms_newMapObj($mapfile); | |
699 | + $layer = $mapa->getlayerbyname($codigoLayer); | |
700 | + $nclasses = $layer->numclasses; | |
701 | + $classe = $layer->getclass($indiceClasse); | |
702 | + $estilo = $classe->getstyle($indiceEstilo); | |
703 | + $estilo->set("symbolname",$symbolname); | |
704 | + corE($estilo,$color,"color"); | |
705 | + $estilo->set("size",$size); | |
706 | + $estilo->set("minsize",$minsize); | |
707 | + $estilo->set("maxsize",$maxsize); | |
708 | + $estilo->set("offsetx",$offsetx); | |
709 | + $estilo->set("offsety",$offsety); | |
710 | + $estilo->set("antialias",$antialias); | |
711 | + corE($estilo,$backgroundcolor,"backgroundcolor"); | |
712 | + corE($estilo,$outlinecolor,"outlinecolor"); | |
713 | + $estilo->set("width",$width); | |
714 | + $estilo->set("minwidth",$minwidth); | |
715 | + $estilo->set("maxwidth",$maxwidth); | |
716 | + $estilo->set("angle",$angle); | |
717 | + //$estilo->set("opacity",$opacity); | |
710 | 718 | $mapa->save($mapfile); |
711 | 719 | removeCabecalho($mapfile); |
712 | 720 | return "ok"; |
... | ... | @@ -728,58 +736,30 @@ function removeCabecalho($arq) |
728 | 736 | if(strtoupper(trim($linha)) == "LAYER") |
729 | 737 | {$grava = true;} |
730 | 738 | if($grava) |
731 | - {$final[] = rtrim($linha, "\r\n") . PHP_EOL;}//$linha."\n";} | |
739 | + {$final[] = rtrim($linha, "\r\n") . PHP_EOL;} | |
732 | 740 | } |
733 | 741 | fclose($handle); |
734 | 742 | } |
735 | 743 | $handle = fopen($arq, "w+"); |
736 | 744 | foreach ($final as $f) |
737 | 745 | { |
738 | - if(($f != "") && ($f != 'FILTERITEM ""') && ($f != 'LABELITEM ""')) | |
746 | + // | |
747 | + //remove resultados em branco | |
748 | + //e grava a linha | |
749 | + // | |
750 | + $teste = strtoupper($f); | |
751 | + $teste = trim($teste); | |
752 | + $teste = str_replace(" ","",$teste); | |
753 | + $teste = str_replace("'","",$teste); | |
754 | + $teste = str_replace('"',"",$teste); | |
755 | + $teste = preg_replace('/[\n\r\t ]*/', '', $teste); | |
756 | + $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"); | |
757 | + $passou = true; | |
758 | + foreach ($testar as $t) | |
759 | + {if($teste == $t){$passou = false;}} | |
760 | + if($passou) | |
739 | 761 | fwrite($handle,$f); |
740 | 762 | } |
741 | 763 | fclose($handle); |
742 | 764 | } |
743 | - | |
744 | -function pegaDadosEstilo() | |
745 | -{ | |
746 | - global $codigoMap,$codigoLayer; | |
747 | - $dados = array(); | |
748 | - $mapfile = "../../temas/".$codigoMap.".map"; | |
749 | - $mapa = ms_newMapObj($mapfile); | |
750 | - $layer = $mapa->getlayerbyname($codigoLayer); | |
751 | - $nclasses = $layer->numclasses; | |
752 | - for($i=0;$i<$nclasses;++$i) | |
753 | - { | |
754 | - $classe = $layer->getclass($i); | |
755 | - $numestilos = $classe->numstyles; | |
756 | - $estilos = array(); | |
757 | - for($j=0;$j<$numestilos;++$j) | |
758 | - { | |
759 | - $estilo = $classe->getstyle($j); | |
760 | - $temp["symbolname"] = $estilo->symbolname; | |
761 | - $temp["color"] = $estilo->color->red.",".$estilo->color->green.",".$estilo->color->blue; | |
762 | - $temp["size"] = $estilo->size; | |
763 | - $temp["minsize"] = $estilo->minsize; | |
764 | - $temp["maxsize"] = $estilo->maxsize; | |
765 | - $temp["offsetx"] = $estilo->offsetx; | |
766 | - $temp["offsety"] = $estilo->offsety; | |
767 | - $temp["antialias"] = $estilo->antialias; | |
768 | - $temp["backgroundcolor"] = $estilo->backgroundcolor->red.",".$estilo->backgroundcolor->green.",".$estilo->backgroundcolor->blue; | |
769 | - $temp["outlinecolor"] = $estilo->outlinecolor->red.",".$estilo->outlinecolor->green.",".$estilo->outlinecolor->blue; | |
770 | - $temp["width"] = $estilo->width; | |
771 | - $temp["minwidth"] = $estilo->minwidth; | |
772 | - $temp["maxwidth"] = $estilo->maxwidth; | |
773 | - $temp["angle"] = $estilo->angle; | |
774 | - $temp["angleitem"] = $estilo->angleitem; | |
775 | - $temp["sizeitem"] = $estilo->sizeitem; | |
776 | - $temp["minvalue"] = $estilo->minvalue; | |
777 | - $temp["maxvalue"] = $estilo->maxvalue; | |
778 | - $estilos[] = array("estilo"=>$j,"dados"=>$temp); | |
779 | - } | |
780 | - $dados[] = array("classe"=>$i,"estilos"=>$estilos); | |
781 | - } | |
782 | - return $dados; | |
783 | -} | |
784 | - | |
785 | 765 | ?> |
786 | 766 | \ No newline at end of file | ... | ... |
admin/php/identifica.php
... | ... | @@ -28,7 +28,6 @@ File: i3geo/admin/identifica.php |
28 | 28 | |
29 | 29 | */ |
30 | 30 | include_once("admin.php"); |
31 | -$cp = new cpaint(); | |
32 | 31 | //faz a busca da função que deve ser executada |
33 | 32 | switch ($funcao) |
34 | 33 | { |
... | ... | @@ -57,8 +56,8 @@ switch ($funcao) |
57 | 56 | break; |
58 | 57 | |
59 | 58 | case "importarXmlI": |
60 | - $cp->set_data(importarXmlI()); | |
61 | - $cp->return_data(); | |
59 | + retornaJSON(importarXmlI()); | |
60 | + exit;; | |
62 | 61 | break; |
63 | 62 | } |
64 | 63 | /* | ... | ... |
admin/php/mapas.php
... | ... | @@ -31,12 +31,6 @@ include_once("admin.php"); |
31 | 31 | //faz a busca da função que deve ser executada |
32 | 32 | switch ($funcao) |
33 | 33 | { |
34 | - //verifica os editores | |
35 | - case "verificaEditores": | |
36 | - $cp->set_data(verificaEditores($editores)); | |
37 | - $cp->return_data(); | |
38 | - break; | |
39 | - | |
40 | 34 | case "pegaMapas": |
41 | 35 | retornaJSON(pegaDados('SELECT id_mapa,nome_mapa,ordem_mapa from i3geoadmin_mapas order by ordem_mapa')); |
42 | 36 | exit; |
... | ... | @@ -61,8 +55,8 @@ switch ($funcao) |
61 | 55 | break; |
62 | 56 | |
63 | 57 | case "importarXmlMapas": |
64 | - $cp->set_data(importarXmlMapas()); | |
65 | - $cp->return_data(); | |
58 | + retornaJSON(importarXmlMapas()); | |
59 | + exit; | |
66 | 60 | break; |
67 | 61 | } |
68 | 62 | /* | ... | ... |
admin/php/menutemas.php
... | ... | @@ -39,8 +39,8 @@ switch ($funcao) |
39 | 39 | break; |
40 | 40 | |
41 | 41 | case "importarXmlMenu": |
42 | - $cp->set_data(importarXmlMenu()); | |
43 | - $cp->return_data(); | |
42 | + retornaJSON(importarXmlMenu()); | |
43 | + exit; | |
44 | 44 | break; |
45 | 45 | |
46 | 46 | case "pegaMenus": |
... | ... | @@ -57,6 +57,7 @@ switch ($funcao) |
57 | 57 | |
58 | 58 | case "pegaPerfis": |
59 | 59 | $dados = pegaDados('SELECT * from i3geoadmin_perfis order by perfil'); |
60 | + if(count($dados) == 0){$dados[] = "nenhum";} | |
60 | 61 | retornaJSON($dados); |
61 | 62 | break; |
62 | 63 | |
... | ... | @@ -777,10 +778,13 @@ function importarXmlMenu() |
777 | 778 | //importa os temas |
778 | 779 | // |
779 | 780 | $temasExistentes = array(); |
780 | - $q = $dbhw->query("select * from i3geoadmin_subgrupos"); | |
781 | + $q = $dbhw->query("select * from i3geoadmin_temas"); | |
781 | 782 | $resultado = $q->fetchAll(); |
782 | 783 | foreach($resultado as $r) |
783 | - {$temasExistentes[$r["codigo_tema"]] = 0;} | |
784 | + { | |
785 | + if($r["codigo_tema"]) | |
786 | + $temasExistentes[$r["codigo_tema"]] = 0; | |
787 | + } | |
784 | 788 | foreach($xml->TEMA as $tema) |
785 | 789 | { |
786 | 790 | $nome = ixml($tema,"TNOME"); |
... | ... | @@ -896,7 +900,7 @@ function importarXmlMenu() |
896 | 900 | $listaDeTags = array_unique($listaDeTags); |
897 | 901 | foreach ($listaDeTags as $t) |
898 | 902 | { |
899 | - if(!(verificaDuplicados("select * from i3geoadmin_tags where nome = '$t'",$dbh))) | |
903 | + if($t != "" && !(verificaDuplicados("select * from i3geoadmin_tags where nome = '$t'",$dbh))) | |
900 | 904 | $dbhw->query("INSERT INTO i3geoadmin_tags (nome) VALUES ('$t')"); |
901 | 905 | } |
902 | 906 | $dbhw = null; | ... | ... |
admin/php/parsemapfile.php
... | ... | @@ -321,6 +321,7 @@ function mapfile() |
321 | 321 | $dstring = $d[0]; |
322 | 322 | $dstring = str_replace("the_geom","",$dstring); |
323 | 323 | $dstring = str_replace("*",$colunas,$dstring); |
324 | + $xml .= "<colunas>$colunas</colunas>"; | |
324 | 325 | $xml .= "<select>$dstring</select>\n"; |
325 | 326 | $string = preg_replace('/.*from\s*(.+).*/i', '\1', $d[0]); |
326 | 327 | $s = explode("WHERE",$string); | ... | ... |
admin/php/sistemas.php
... | ... | @@ -28,7 +28,6 @@ File: i3geo/admin/sistemas.php |
28 | 28 | |
29 | 29 | */ |
30 | 30 | include_once("admin.php"); |
31 | -$cp = new cpaint(); | |
32 | 31 | //faz a busca da função que deve ser executada |
33 | 32 | switch ($funcao) |
34 | 33 | { |
... | ... | @@ -88,8 +87,8 @@ switch ($funcao) |
88 | 87 | break; |
89 | 88 | |
90 | 89 | case "importarXmlSistemas": |
91 | - $cp->set_data(importarXmlSistemas()); | |
92 | - $cp->return_data(); | |
90 | + retornaJSON(importarXmlSistemas()); | |
91 | + exit; | |
93 | 92 | break; |
94 | 93 | } |
95 | 94 | /* | ... | ... |
admin/php/webservices.php
... | ... | @@ -27,7 +27,7 @@ File: i3geo/admin/webservices.php |
27 | 27 | 19/6/2007 |
28 | 28 | |
29 | 29 | */ |
30 | -error_reporting(E_ALL); | |
30 | +error_reporting(0); | |
31 | 31 | include_once("admin.php"); |
32 | 32 | //faz a busca da função que deve ser executada |
33 | 33 | switch ($funcao) |
... | ... | @@ -55,8 +55,8 @@ switch ($funcao) |
55 | 55 | break; |
56 | 56 | |
57 | 57 | case "importarXmlWS": |
58 | - $cp->set_data(importarXmlWS()); | |
59 | - $cp->return_data(); | |
58 | + retornaJSON(importarXmlWS()); | |
59 | + exit; | |
60 | 60 | break; |
61 | 61 | } |
62 | 62 | /* | ... | ... |
... | ... | @@ -0,0 +1,28 @@ |
1 | +<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> | |
2 | +<ViewContext version="1.1.0" id="i3geoogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.opengis.net/context" xmlns:sld="http://www.opengis.net/sld" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd"> | |
3 | + <General> | |
4 | + <Window width="450" height="450"/> | |
5 | + <!-- Bounding box corners and spatial reference system --> | |
6 | + <BoundingBox SRS="EPSG:4291" minx="-76.512593" miny="-36.948432" maxx="-29.585185" maxy="7.046013"/> | |
7 | + <!-- Title of Context --> | |
8 | + <Title>I3Geo Brasil MMA</Title> | |
9 | + <ContactInformation> | |
10 | + <ContactPersonPrimary> | |
11 | + <ContactPerson></ContactPerson> | |
12 | + <ContactOrganization></ContactOrganization> | |
13 | + </ContactPersonPrimary> | |
14 | + <ContactPosition></ContactPosition> | |
15 | + <ContactAddress> | |
16 | + <AddressType></AddressType> | |
17 | + <Address></Address> | |
18 | + <City></City> | |
19 | + <StateOrProvince></StateOrProvince> | |
20 | + <PostCode></PostCode> | |
21 | + <Country></Country> | |
22 | + </ContactAddress> | |
23 | + <ContactElectronicMailAddress></ContactElectronicMailAddress> | |
24 | + </ContactInformation> | |
25 | + </General> | |
26 | + <LayerList> | |
27 | + </LayerList> | |
28 | +</ViewContext> | ... | ... |
aplicmap/ogcws.map
... | ... | @@ -39,6 +39,7 @@ WEB |
39 | 39 | TEMPLATE "none.htm" |
40 | 40 | METADATA |
41 | 41 | "ows_title" "I3Geo Brasil MMA" |
42 | + "wms_title" "I3Geo Brasil MMA" | |
42 | 43 | "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=" |
43 | 44 | "ows_keywordlist" "" |
44 | 45 | "ows_onlineresource" "" | ... | ... |
classesphp/funcoes_gerais.php
... | ... | @@ -1197,13 +1197,20 @@ $layer - objeto layer |
1197 | 1197 | */ |
1198 | 1198 | function pegaItens($layer) |
1199 | 1199 | { |
1200 | - global $locaplic,$imgdir,$dir_tmp; | |
1200 | + $sopen = $layer->open(); | |
1201 | + if($sopen != MS_FAILURE) | |
1202 | + $items = $layer->getItems(); | |
1203 | + else | |
1204 | + $items = array(); | |
1205 | + return $items; | |
1206 | +/* | |
1201 | 1207 | if ($layer->type != 3) |
1202 | 1208 | {$layer->open();} |
1203 | 1209 | $items = $layer->getItems(); |
1204 | 1210 | if ($layer->type != 3) |
1205 | 1211 | {$layer->close();} |
1206 | - return $items; | |
1212 | + return $items; | |
1213 | +*/ | |
1207 | 1214 | } |
1208 | 1215 | /* |
1209 | 1216 | function: buscaRapida | ... | ... |
menutemas/admin.db
No preview for this file type
menutemas/geopr.xml
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <GTIPO>Agência Nacional de Energia Elétrica</GTIPO> |
7 | 7 | <DTIPO></DTIPO> |
8 | 8 | <SGRUPO> |
9 | - <SDTIPO>GSI WMS</SDTIPO> | |
9 | + <SDTIPO>ANEEL</SDTIPO> | |
10 | 10 | <TEMA> |
11 | 11 | <TID>geopr_aneel_reservatorios</TID> |
12 | 12 | <TNOME>Reservat&oacute;rios</TNOME> |
... | ... | @@ -259,7 +259,7 @@ |
259 | 259 | <TID>geopr_ana_reghidro1</TID> |
260 | 260 | <TNOME>Região Hidrográfica Nível 1</TNOME> |
261 | 261 | <TDESC></TDESC> |
262 | - <TLINK>http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1</TLINK> | |
262 | + <TLINK>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</TLINK> | |
263 | 263 | <TIPOA>WMS</TIPOA> |
264 | 264 | <TAGS>rio</TAGS> |
265 | 265 | </TEMA> |
... | ... | @@ -267,7 +267,7 @@ |
267 | 267 | <TID>geopr_ana_microbacias</TID> |
268 | 268 | <TNOME>Micro-bacias</TNOME> |
269 | 269 | <TDESC></TDESC> |
270 | - <TLINK>http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1</TLINK> | |
270 | + <TLINK>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</TLINK> | |
271 | 271 | <TIPOA>WMS</TIPOA> |
272 | 272 | <TAGS>bacia</TAGS> |
273 | 273 | </TEMA> |
... | ... | @@ -275,7 +275,7 @@ |
275 | 275 | <TID>geopr_ana_federais</TID> |
276 | 276 | <TNOME>Rios Federais</TNOME> |
277 | 277 | <TDESC></TDESC> |
278 | - <TLINK>http://200.140.135.184/cgi-bin/mapserv?map=/usr/local/www/apache22/data/hidro/wshidro.map&request=getcapabilities&version=1.1.1</TLINK> | |
278 | + <TLINK>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</TLINK> | |
279 | 279 | <TIPOA>WMS</TIPOA> |
280 | 280 | <TAGS>rio</TAGS> |
281 | 281 | </TEMA> | ... | ... |
temas/atlas_biomas.map
... | ... | @@ -7,31 +7,15 @@ FONTSET "../symbols/fontes.txt" |
7 | 7 | METADATA |
8 | 8 | "wms_srs" "EPSG:4291 EPSG:4326" |
9 | 9 | "wms_exceptions_format" "application/vnd.ogc.se_xml" |
10 | - "tip" "" | |
11 | 10 | "CLASSE" "SIM" |
12 | - "itensdesc" "" | |
13 | - "itenslink" "" | |
14 | - "escala" "" | |
15 | - "classesnome" "" | |
16 | 11 | "wms_force_separate_request" "1" |
17 | 12 | "wms_name" "bioma" |
18 | 13 | "formatosinfo" "text/plain,application/vnd.ogc.gml" |
19 | - "extensao" "" | |
20 | - "mensagem" "" | |
21 | - "classessimbolo" "" | |
22 | - "classesitem" "" | |
23 | - "escondido" "" | |
24 | 14 | "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff" |
25 | 15 | "wms_format" "image/png" |
26 | - "download" "" | |
27 | - "classescor" "" | |
28 | - "classestamanho" "" | |
29 | 16 | "wms_connectiontimeout" "30" |
30 | - "itens" "" | |
31 | 17 | "TEMA" "Biomas segundo IBGE-MMA" |
32 | 18 | "wms_server_version" "1.1.0" |
33 | - "identifica" "" | |
34 | - "aplicaextensao" "" | |
35 | 19 | "wms_style" "default" |
36 | 20 | END |
37 | 21 | NAME "atlas_biomas" |
... | ... | @@ -44,8 +28,6 @@ FONTSET "../symbols/fontes.txt" |
44 | 28 | NAME "testevvvvv" |
45 | 29 | KEYIMAGE "" |
46 | 30 | END |
47 | - CLASS | |
48 | - END | |
49 | 31 | END |
50 | 32 | |
51 | 33 | END | ... | ... |
temas/bioma.map
1 | 1 | SYMBOLSET ../symbols/simbolos.sym |
2 | 2 | FONTSET "../symbols/fontes.txt" |
3 | 3 | LAYER |
4 | - | |
5 | 4 | CONNECTION "user=geodados password=geodados dbname=geodados host=pgsql1.mma.gov.br port=5432" |
6 | - | |
7 | 5 | CONNECTIONTYPE POSTGIS |
8 | - | |
9 | 6 | DATA "the_geom FROM (select * FROM brasil.brareg1) as foo USING UNIQUE gid USING SRID=4291" |
10 | - | |
7 | + LABELITEM "cd_legenda" | |
11 | 8 | METADATA |
12 | - | |
13 | 9 | "CLASSE" "SIM" |
14 | - | |
15 | 10 | "ITENSDESC" "Nome" |
16 | - | |
17 | 11 | "ESCALA" "5000000" |
18 | - | |
19 | 12 | "EXTENSAO" "-75.233614607 -33.7515829981 -27.592958622 5.272156" |
20 | - | |
21 | 13 | "ITENS" "cd_legenda" |
22 | - | |
23 | 14 | "TEMA" "Bioma" |
24 | - | |
25 | 15 | END |
26 | - | |
27 | 16 | NAME "bioma" |
28 | - | |
29 | 17 | STATUS OFF |
30 | - | |
31 | 18 | TEMPLATE "none.htm" |
32 | - | |
33 | 19 | OPACITY 80 |
34 | - | |
35 | 20 | TYPE POLYGON |
36 | - | |
37 | 21 | UNITS METERS |
38 | - | |
39 | 22 | CLASS |
40 | - | |
41 | - NAME "Amazônia" | |
42 | - | |
43 | - EXPRESSION ('[id]'eq '1') | |
44 | - | |
23 | + NAME "Cerrado" | |
24 | + EXPRESSION ('[id]'eq '3') | |
45 | 25 | STYLE |
46 | - | |
47 | 26 | ANGLE 360 |
48 | - | |
49 | - BACKGROUNDCOLOR 255 0 0 | |
50 | - | |
51 | - COLOR 255 0 0 | |
52 | - | |
27 | + COLOR 244 214 0 | |
28 | + OPACITY 100 | |
29 | + OUTLINECOLOR 50 50 50 | |
30 | + SYMBOL 0 | |
31 | + END | |
32 | + END | |
33 | + CLASS | |
34 | + NAME "Pantanal" | |
35 | + EXPRESSION ('[id]'eq '6') | |
36 | + STYLE | |
37 | + ANGLE 360 | |
38 | + COLOR 200 200 241 | |
53 | 39 | OPACITY 100 |
54 | - | |
55 | - OUTLINECOLOR 255 0 0 | |
56 | - | |
40 | + OUTLINECOLOR 50 50 50 | |
57 | 41 | SYMBOL 0 |
58 | - | |
59 | - WIDTH 5 | |
60 | - | |
61 | - OFFSET -20 -20 | |
62 | - | |
63 | 42 | END |
64 | - | |
65 | 43 | END |
66 | - | |
67 | 44 | CLASS |
68 | - | |
69 | - NAME "Caatingaxxxx" | |
70 | - | |
71 | - EXPRESSION ('[id]'eq '2') | |
72 | - | |
45 | + NAME "Amaz" | |
46 | + EXPRESSION ('[id]'eq '1') | |
47 | + KEYIMAGE "" | |
73 | 48 | LABEL |
74 | - | |
75 | - SIZE TINY | |
76 | - | |
49 | + SIZE MEDIUM | |
77 | 50 | TYPE BITMAP |
78 | - | |
79 | 51 | BUFFER 0 |
80 | - | |
81 | - COLOR 0 0 255 | |
82 | - | |
52 | + COLOR 0 255 0 | |
83 | 53 | FORCE FALSE |
84 | - | |
85 | 54 | MINDISTANCE -1 |
86 | - | |
87 | 55 | MINFEATURESIZE -1 |
88 | - | |
89 | 56 | OFFSET 0 0 |
90 | - | |
91 | 57 | PARTIALS TRUE |
92 | - | |
93 | 58 | POSITION CC |
94 | - | |
95 | 59 | END |
96 | - | |
97 | 60 | STYLE |
98 | - | |
99 | 61 | ANGLE 360 |
100 | - | |
101 | - COLOR 0 0 246 | |
102 | - | |
103 | - OPACITY 100 | |
104 | - | |
105 | - OUTLINECOLOR 255 255 255 | |
106 | - | |
107 | - SYMBOL 0 | |
108 | - | |
109 | - END | |
110 | - | |
111 | - END | |
112 | - | |
113 | - CLASS | |
114 | - | |
115 | - NAME "Cerrado" | |
116 | - | |
117 | - EXPRESSION ('[id]'eq '3') | |
118 | - | |
119 | - STYLE | |
120 | - | |
121 | - ANGLE 360 | |
122 | - | |
123 | - COLOR 244 214 0 | |
124 | - | |
125 | - OPACITY 100 | |
126 | - | |
127 | - OUTLINECOLOR 50 50 50 | |
128 | - | |
129 | - SYMBOL 0 | |
130 | - | |
131 | - END | |
132 | - | |
133 | - END | |
134 | - | |
135 | - CLASS | |
136 | - | |
137 | - NAME "Pantanal" | |
138 | - | |
139 | - EXPRESSION ('[id]'eq '6') | |
140 | - | |
141 | - STYLE | |
142 | - | |
143 | - ANGLE 360 | |
144 | - | |
145 | - COLOR 200 200 241 | |
146 | - | |
62 | + COLOR 255 0 0 | |
147 | 63 | OPACITY 100 |
148 | - | |
149 | - OUTLINECOLOR 50 50 50 | |
150 | - | |
151 | - SYMBOL 0 | |
152 | - | |
153 | 64 | END |
154 | - | |
155 | 65 | END |
156 | - | |
157 | 66 | CLASS |
158 | - | |
159 | 67 | NAME "Pampa" |
160 | - | |
161 | 68 | EXPRESSION ('[id]'eq '5') |
162 | - | |
163 | 69 | STYLE |
164 | - | |
165 | 70 | ANGLE 360 |
166 | - | |
167 | 71 | COLOR 143 189 192 |
168 | - | |
169 | 72 | OPACITY 100 |
170 | - | |
171 | 73 | OUTLINECOLOR 50 50 50 |
172 | - | |
173 | 74 | SYMBOL 0 |
174 | - | |
175 | 75 | END |
176 | - | |
177 | 76 | END |
178 | - | |
179 | 77 | CLASS |
180 | - | |
181 | 78 | NAME "Mata Atlântica" |
182 | - | |
183 | 79 | EXPRESSION ('[id]'eq '4') |
184 | - | |
185 | 80 | STYLE |
186 | - | |
187 | 81 | ANGLE 360 |
188 | - | |
189 | 82 | COLOR 218 255 216 |
190 | - | |
191 | 83 | OPACITY 100 |
192 | - | |
193 | 84 | OUTLINECOLOR 50 50 50 |
194 | - | |
195 | 85 | SYMBOL 0 |
196 | - | |
197 | 86 | END |
198 | - | |
199 | 87 | END |
200 | - | |
201 | 88 | END |
202 | - | |
203 | 89 | |
204 | - | |
205 | 90 | END |
206 | - | |
207 | - | |
91 | + | ... | ... |