Commit 327dcf412b74ab5f363bb5417cdeedce69f0d24d

Authored by Edmar Moretti
1 parent 1ffd0a86

--no commit message

admin/js/editormapfile.js
@@ -356,13 +356,28 @@ function montaParametrosTemas(no,dados,redesenha) @@ -356,13 +356,28 @@ function montaParametrosTemas(no,dados,redesenha)
356 var codigoLayer = no.data.codigoLayer; 356 var codigoLayer = no.data.codigoLayer;
357 var id = codigoMap+"_"+codigoLayer; 357 var id = codigoMap+"_"+codigoLayer;
358 var conteudo = ""; 358 var conteudo = "";
359 - if(!tree.getNodeByProperty("etiquetaConexao",id)) 359 + if(!tree.getNodeByProperty("etiquetaDados",id))
360 { 360 {
361 - conteudo = "<span style=cursor:pointer; onclick=\"editorConexao('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='edita conexão' src=\"../imagens/06.png\" /> Editar fonte dos dados</span>"  
362 - var d = {tipo:"etiquetaConexao",etiquetaConexao:id,html:conteudo} 361 + conteudo = "<span style=cursor:pointer; onclick=\"editorDados('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Conexão com os dados</span>"
  362 + var d = {tipo:"etiquetaDados",etiquetaDados:id,html:conteudo}
363 var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); 363 var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
364 tempNode.isLeaf = true; 364 tempNode.isLeaf = true;
365 } 365 }
  366 + if(!tree.getNodeByProperty("etiquetaTitulo",id))
  367 + {
  368 + conteudo = "<span style=cursor:pointer; onclick=\"editorTitulo('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Título, escala, extensão</span>"
  369 + var d = {tipo:"etiquetaTitulo",etiquetaTitulo:id,html:conteudo}
  370 + var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
  371 + tempNode.isLeaf = true;
  372 + }
  373 + if(!tree.getNodeByProperty("etiquetaDispo",id))
  374 + {
  375 + conteudo = "<span style=cursor:pointer; onclick=\"editorDispo('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Disponibilidade (download, wms,...)</span>"
  376 + var d = {tipo:"etiquetaDispo",etiquetaDispo:id,html:conteudo}
  377 + var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
  378 + tempNode.isLeaf = true;
  379 + }
  380 +//rever
366 if(!tree.getNodeByProperty("etiquetaMetadados",id)) 381 if(!tree.getNodeByProperty("etiquetaMetadados",id))
367 { 382 {
368 conteudo = "<span style=cursor:pointer; onclick=\"editorMetadados('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='edita metadados' src=\"../imagens/06.png\" /> Editar metaparâmetros</span>" 383 conteudo = "<span style=cursor:pointer; onclick=\"editorMetadados('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='edita metadados' src=\"../imagens/06.png\" /> Editar metaparâmetros</span>"
@@ -1034,18 +1049,47 @@ function excluirEstilo(codigoMap,codigoLayer,indiceClasse,indiceEstilo) @@ -1034,18 +1049,47 @@ function excluirEstilo(codigoMap,codigoLayer,indiceClasse,indiceEstilo)
1034 core_dialogoContinua(handleYes,handleNo,mensagem,largura) 1049 core_dialogoContinua(handleYes,handleNo,mensagem,largura)
1035 } 1050 }
1036 /* 1051 /*
1037 -Function: editorConexao 1052 +Function: editorDados
1038 1053
1039 -Abre o editor de conexões 1054 +Abre o editor de conexão com a fonte dos dados de um layer
1040 1055
1041 <PEGACONEXAO> 1056 <PEGACONEXAO>
1042 */ 1057 */
1043 -function editorConexao(codigoMap,codigoLayer) 1058 +function editorDados(codigoMap,codigoLayer)
1044 { 1059 {
1045 core_montaEditor("","450px","650px") 1060 core_montaEditor("","450px","650px")
1046 var sUrl = "../php/editormapfile.php?funcao=pegaConexao&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer; 1061 var sUrl = "../php/editormapfile.php?funcao=pegaConexao&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
1047 - core_pegaDados("Obtendo dados...",sUrl,"montaEditorConexao") 1062 + core_pegaDados("Obtendo dados...",sUrl,"montaEditorDados")
  1063 +}
  1064 +/*
  1065 +Function: editorTitulo
  1066 +
  1067 +Abre o editor de título e descrição
  1068 +
  1069 +<PEGACONEXAO>
  1070 +*/
  1071 +function editorTitulo(codigoMap,codigoLayer)
  1072 +{
  1073 + core_montaEditor("","450px","650px")
  1074 + var sUrl = "../php/editormapfile.php?funcao=pegaTitulo&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
  1075 + core_pegaDados("Obtendo dados...",sUrl,"montaEditorTitulo")
  1076 +}
  1077 +/*
  1078 +Function: editorDispo
  1079 +
  1080 +Abre o editor que define a disponibilidade dos dados
  1081 +
  1082 +<PEGADISPO>
  1083 +*/
  1084 +function editorDispo(codigoMap,codigoLayer)
  1085 +{
  1086 + core_montaEditor("","450px","650px")
  1087 + var sUrl = "../php/editormapfile.php?funcao=pegaDispo&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
  1088 + core_pegaDados("Obtendo dados...",sUrl,"montaEditorDispo")
1048 } 1089 }
  1090 +//depreciado
  1091 +function editorConexao(codigoMap,codigoLayer)
  1092 +{editorDados(codigoMap,codigoLayer);}
1049 /* 1093 /*
1050 Function: editorMetadados 1094 Function: editorMetadados
1051 1095
@@ -1111,9 +1155,64 @@ function editorEstilo(codigoMap,codigoLayer,indiceClasse,indiceEstilo) @@ -1111,9 +1155,64 @@ function editorEstilo(codigoMap,codigoLayer,indiceClasse,indiceEstilo)
1111 var sUrl = "../php/editormapfile.php?funcao=pegaEstilo&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo; 1155 var sUrl = "../php/editormapfile.php?funcao=pegaEstilo&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo;
1112 core_pegaDados("Obtendo dados...",sUrl,"montaEditorEstilo") 1156 core_pegaDados("Obtendo dados...",sUrl,"montaEditorEstilo")
1113 } 1157 }
1114 -function montaEditorConexao(dados) 1158 +
  1159 +function montaEditorTitulo(dados)
  1160 +{
  1161 + var param = {
  1162 + "linhas":[
  1163 + {ajuda:"Elemento 'NAME'. Não confunda com o nome que aparece no mapa ou na árvore de temas. Normalmente o código recebe o mesmo nome do arquivo mapfile, sem a extensão '.map'",
  1164 + titulo:"Código do layer",id:"name",value:dados.name,tipo:"text"},
  1165 + {ajuda:"Nome que será utilizado na legenda do mapa e na guia 'Temas'",
  1166 + titulo:"Título (METADATA: TEMA)",id:"tema",value:dados.tema,tipo:"text"},
  1167 + {ajuda:"Ícone que será mostrado na árvore de camadas. A imagem deve existir na web e deve ser incluído o caminho completo ou relativo em relação ao local da interface HTML do mapa.",
  1168 + titulo:"Ícone (METADATA: ICONETEMA)",id:"iconetema",value:dados.iconetema,tipo:"text"},
  1169 + {ajuda:"Mensagem que será mostrada no rodapé do mapa quando o tema estiver visível. É útil para apresentar ao usuário observações especiais sobre o uso daquele tema.",
  1170 + titulo:"Mensagem (MENSAGEM)",id:"mensagem",value:dados.mensagem,tipo:"text"},
  1171 + {ajuda:"Denominador da escala da fonte dos dados utilizado pelo tema. É utilizado para apresentar a indicação de compatibilidade entre a escala do tema e a escala do mapa que está sendo visto.",
  1172 + titulo:"Escala (ESCALA)",id:"escala",value:dados.escala,tipo:"text"},
  1173 + {ajuda:"Extensão geográfica máxima do tema, no formato xmin ymin xmax ymax. É utilizado na opção de 'zoom para o tema'. Quando o tema é baseado em shapefile, esse metadata não é necessário, pois o mapserver consegue calcular a extensão. Já em outros tipos de dados, como Postgis, o parâmetro é necessário. Nesse caso, se não for indicado, o botão de zoom para o tema não será visível para o usuário",
  1174 + titulo:"Extensao (EXTENSAO)",id:"extensao",value:dados.extensao,tipo:"text"}
  1175 + ]
  1176 + }
  1177 + var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />"
  1178 + ins += core_geraLinhas(param)
  1179 + ins += "<br><br><br>"
  1180 + $i("editor_bd").innerHTML = ins
  1181 +
  1182 + var temp = function()
  1183 + {salvarDadosEditor('titulo',dados.codigoMap,dados.codigoLayer,false)}
  1184 + new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }});
  1185 +}
  1186 +function montaEditorDispo(dados)
  1187 +{
  1188 + var param = {
  1189 + "linhas":[
  1190 + {ajuda:"Indica se o usuário pode fazer download do tema. Se sim, o ícone de download será mostrado na árvore de camadas disponíveis no mapa.",
  1191 + titulo:"Ícone de download (METADATA: DOWNLOAD)",id:"",value:dados.download,tipo:"text",div:"<div id=cDownload ></div>"},
  1192 + {ajuda:"Endereço de um arquivo pré-existente para download dos dados (caminho completo no servidor). Se definido, o sistema irá usar esse arquivo ao invés de gerar os dados, quando o usuário clicar nas opções de download. Se não for definido, o arquivo de download é gerado diretamente do original, convertendo do banco ou copiando o arquivo definido em DATA.",
  1193 + titulo:"Arquivo download (ARQUIVODOWNLOAD)",id:"arquivodownload",value:dados.arquivodownload,tipo:"text"},
  1194 + {ajuda:"Endereço de um arquivo KMZ ou KML pré-existente para download dos dados (caminho completo no servidor). Se definido, o sistema irá usar esse arquivo ao invés de gerar os dados, quando o usuário clicar nas opções de visualização de KML ou KMZ. Se não for definido, o arquivo é gerado diretamente do original.",
  1195 + titulo:"Arquivo KML ou KMZ (ARQUIVOKMZ)",id:"arquivokmz",value:dados.arquivokmz,tipo:"text"}
  1196 + ]
  1197 + }
  1198 + var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />"
  1199 + ins += core_geraLinhas(param)
  1200 + ins += "<br><br><br>"
  1201 + $i("editor_bd").innerHTML = ins
  1202 + if($i("cDownload")){
  1203 + temp = "<select id='download' >"
  1204 + temp += core_combosimnao(dados.download)
  1205 + temp += "</select>"
  1206 + $i("cDownload").innerHTML = temp
  1207 + }
  1208 + var temp = function()
  1209 + {salvarDadosEditor('dispo',dados.codigoMap,dados.codigoLayer,false)}
  1210 + new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }});
  1211 +}
  1212 +
  1213 +function montaEditorDados(dados)
1115 { 1214 {
1116 - var idsForms = ["connection","data","tileitem","tileindex","type"]; 1215 + var idsForms = ["connection","data","tileitem","tileindex","type","tipooriginal"];
1117 var param = { 1216 var param = {
1118 "linhas":[ 1217 "linhas":[
1119 {ajuda:"Type of connection. Default is local.", 1218 {ajuda:"Type of connection. Default is local.",
@@ -1124,10 +1223,18 @@ function montaEditorConexao(dados) @@ -1124,10 +1223,18 @@ function montaEditorConexao(dados)
1124 titulo:"Data",id:"data",value:dados.data,tipo:"text"}, 1223 titulo:"Data",id:"data",value:dados.data,tipo:"text"},
1125 {ajuda:"Specifies how the data should be drawn. Need not be the same as the shapefile type. For example, a polygon shapefile may be drawn as a point layer, but a point shapefile may not be drawn as a polygon layer. Common sense rules. Annotation means that a label point will be calculated for the features, but the feature itself will not be drawn although a marker symbol can be optionally drawn. this allows for advanced labeling like numbered highway shields. Points are labeled at that point. Polygons are labeled first using a centroid, and if that doesn't fall in the polygon a scanline approach is used to guarantee the label falls within the feature. Lines are labeled at the middle of the longest arc in the visible portion of the line. Query only means the layer can be queried but not drawn.In order to differentiate between POLYGONs and POLYLINEs (which do not exist as a type), simply respectively use or ommit the COLOR keyword when classifying. If you use it, it's a polygon with a fill color, otherwise it's a polyline with only an OUTLINECOLOR.For CHART layers, see the Dynamic Charting howto.A circle must be defined by a a minimum bounding rectangle. That is, 2 points that define the smallest square that can contain it. These 2 points are the two opposite corners of said box", 1224 {ajuda:"Specifies how the data should be drawn. Need not be the same as the shapefile type. For example, a polygon shapefile may be drawn as a point layer, but a point shapefile may not be drawn as a polygon layer. Common sense rules. Annotation means that a label point will be calculated for the features, but the feature itself will not be drawn although a marker symbol can be optionally drawn. this allows for advanced labeling like numbered highway shields. Points are labeled at that point. Polygons are labeled first using a centroid, and if that doesn't fall in the polygon a scanline approach is used to guarantee the label falls within the feature. Lines are labeled at the middle of the longest arc in the visible portion of the line. Query only means the layer can be queried but not drawn.In order to differentiate between POLYGONs and POLYLINEs (which do not exist as a type), simply respectively use or ommit the COLOR keyword when classifying. If you use it, it's a polygon with a fill color, otherwise it's a polyline with only an OUTLINECOLOR.For CHART layers, see the Dynamic Charting howto.A circle must be defined by a a minimum bounding rectangle. That is, 2 points that define the smallest square that can contain it. These 2 points are the two opposite corners of said box",
1126 titulo:"Type",id:"",value:dados.type,tipo:"text",div:"<div id=cType ></div>"}, 1225 titulo:"Type",id:"",value:dados.type,tipo:"text",div:"<div id=cType ></div>"},
  1226 + {ajuda:"Projeção",
  1227 + titulo:"Projection",id:"projection",value:dados.projection,tipo:"text"},
  1228 + {ajuda:"This parameter allows for data specific attribute filtering that is done at the same time spatial filtering is done, but before any CLASS expressions are evaluated. For OGR and shapefiles the string is simply a mapserver regular expression. For spatial databases the string is a SQL WHERE clause that is valid with respect to the underlying database.For example: FILTER type='road' and size <2",
  1229 + titulo:"Filter",id:"filter",value:dados.filter,tipo:"text"},
  1230 + {ajuda:"Item to use with simple FILTER expressions. OGR and shapefiles only.",
  1231 + titulo:"Filteritem",id:"filteritem",value:dados.filteritem,tipo:"text"},
1127 {ajuda:"Item that contains the location of an individual tile, default is 'location'.", 1232 {ajuda:"Item that contains the location of an individual tile, default is 'location'.",
1128 titulo:"tileitem",id:"tileitem",value:dados.tileitem,tipo:"text"}, 1233 titulo:"tileitem",id:"tileitem",value:dados.tileitem,tipo:"text"},
1129 {ajuda:"Name of the tileindex file or layer. A tileindex is similar to an ArcInfo library index. The tileindex contains polygon features for each tile. The item that contains the location of the tiled data is given using the TILEITEM parameter. When a file is used as the tileindex for shapefile or raster layers, the tileindex should be a shapefile. For CONNECTIONTYPE OGR layers, any OGR supported datasource can be a tileindex. Normally the location should contain the path to the tile file relative to the shapepath, not relative to the tileindex itself. If the DATA parameter contains a value then it is added to the end of the location. When a tileindex layer is used, it works similarly to directly referring to a file, but any supported feature source can be used (ie. postgres, oracle).NOTE: All files in the tileindex should have the same coordinate system, and for vector files the same set of attributes in the same order.", 1234 {ajuda:"Name of the tileindex file or layer. A tileindex is similar to an ArcInfo library index. The tileindex contains polygon features for each tile. The item that contains the location of the tiled data is given using the TILEITEM parameter. When a file is used as the tileindex for shapefile or raster layers, the tileindex should be a shapefile. For CONNECTIONTYPE OGR layers, any OGR supported datasource can be a tileindex. Normally the location should contain the path to the tile file relative to the shapepath, not relative to the tileindex itself. If the DATA parameter contains a value then it is added to the end of the location. When a tileindex layer is used, it works similarly to directly referring to a file, but any supported feature source can be used (ie. postgres, oracle).NOTE: All files in the tileindex should have the same coordinate system, and for vector files the same set of attributes in the same order.",
1130 - titulo:"tileindex",id:"tileindex",value:dados.tileindex,tipo:"text"} 1235 + titulo:"tileindex",id:"tileindex",value:dados.tileindex,tipo:"text"},
  1236 + {ajuda:"Tipo de representação das feições mostradas da camada. É importante definir esse parâmetro para que as funções de geração de SLD funcionem corretamente.",
  1237 + titulo:"Tipo de representação (tipooriginal) - para temas do tipo WMS",id:"",value:dados.tipooriginal,tipo:"text",div:"<div id=cTipooriginal ></div>"}
1131 ] 1238 ]
1132 } 1239 }
1133 var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />" 1240 var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />"
@@ -1135,13 +1242,25 @@ function montaEditorConexao(dados) @@ -1135,13 +1242,25 @@ function montaEditorConexao(dados)
1135 1242
1136 if(dados.postgis_mapa.length > 0) 1243 if(dados.postgis_mapa.length > 0)
1137 { 1244 {
1138 - ins += "<p>Os seguintes 'alias' estão definidos no metadata 'ITENS': "; 1245 + ins += "<p>Os seguintes 'alias' estão definidos em ms_configura como nomes de conexões: ";
1139 ins += dados.postgis_mapa; 1246 ins += dados.postgis_mapa;
1140 - ins += "<br>Os campos em cores não são compatíveis com o tipo de conexão.</p>"; 1247 + ins += "<br>Os campos em cores não são compatíveis com o tipo de conexão.</p><br>";
1141 } 1248 }
  1249 + if(dados.colunas != "" && dados.colunas != undefined)
  1250 + {
  1251 + ins += "<p>O layer possuí as seguintes colunas na tabela de atributos: ";
  1252 + ins += dados.colunas+"</p><br>"
  1253 + }
1142 ins += core_geraLinhas(param) 1254 ins += core_geraLinhas(param)
1143 ins += "<br><br><br>" 1255 ins += "<br><br><br>"
1144 $i("editor_bd").innerHTML = ins 1256 $i("editor_bd").innerHTML = ins
  1257 +
  1258 + if($i("cTipooriginal")){
  1259 + temp = "<select id='tipooriginal' >"
  1260 + temp += core_comboObjeto(objtipooriginal,"valor","texto",dados.tipooriginal)
  1261 + temp += "</select>"
  1262 + $i("cTipooriginal").innerHTML = temp
  1263 + }
1145 1264
1146 temp = "<select id='connectiontype' >" 1265 temp = "<select id='connectiontype' >"
1147 temp += core_comboObjeto(objcontype,"valor","texto",dados.connectiontype) 1266 temp += core_comboObjeto(objcontype,"valor","texto",dados.connectiontype)
@@ -1161,6 +1280,7 @@ function montaEditorConexao(dados) @@ -1161,6 +1280,7 @@ function montaEditorConexao(dados)
1161 var temp = function() 1280 var temp = function()
1162 {salvarDadosEditor('conexao',dados.codigoMap,dados.codigoLayer,"","",true)} 1281 {salvarDadosEditor('conexao',dados.codigoMap,dados.codigoLayer,"","",true)}
1163 new YAHOO.widget.Button("testarEditor",{ onclick: { fn: temp }}); 1282 new YAHOO.widget.Button("testarEditor",{ onclick: { fn: temp }});
  1283 +
1164 core_desativaforms(idsForms); 1284 core_desativaforms(idsForms);
1165 $i("connectiontype").onchange = function(){ 1285 $i("connectiontype").onchange = function(){
1166 core_desativaforms(idsForms); 1286 core_desativaforms(idsForms);
@@ -1178,7 +1298,7 @@ function montaEditorConexao(dados) @@ -1178,7 +1298,7 @@ function montaEditorConexao(dados)
1178 if(valor == 5) 1298 if(valor == 5)
1179 {d = ["connection","tileitem","tileindex","type"];} 1299 {d = ["connection","tileitem","tileindex","type"];}
1180 if(valor == 7 || valor == 9) 1300 if(valor == 7 || valor == 9)
1181 - {d = ["connection","type"];} 1301 + {d = ["connection","type","tipooriginal"];}
1182 core_ativaforms(d); 1302 core_ativaforms(d);
1183 }; 1303 };
1184 $i("connectiontype").onchange.call(); 1304 $i("connectiontype").onchange.call();
@@ -1190,7 +1310,9 @@ function montaEditorMetadados(dados) @@ -1190,7 +1310,9 @@ function montaEditorMetadados(dados)
1190 {ajuda:"A palete é válida apenas para temas RASTER. Entre com o endereço do arquivo no servidor. Veja exemplo em i3geo/localhost/symbols/testepalete.txt", 1310 {ajuda:"A palete é válida apenas para temas RASTER. Entre com o endereço do arquivo no servidor. Veja exemplo em i3geo/localhost/symbols/testepalete.txt",
1191 titulo:"Arquivo com palete de cores (opcional e serve apenas para temas raster) (PALLETEFILE)",id:"palletefile",value:dados.palletefile,tipo:"text"}, 1311 titulo:"Arquivo com palete de cores (opcional e serve apenas para temas raster) (PALLETEFILE)",id:"palletefile",value:dados.palletefile,tipo:"text"},
1192 {ajuda:"Quantas cores em cada nível da palete. Veja exemplo em i3geo/localhost/symbols/testepalete.txt", 1312 {ajuda:"Quantas cores em cada nível da palete. Veja exemplo em i3geo/localhost/symbols/testepalete.txt",
1193 - titulo:"Passo (opcional e serve apenas para temas raster) (PALLETESTEP)",id:"palletestep",value:dados.palletestep,tipo:"text"} 1313 + titulo:"Passo (opcional e serve apenas para temas raster) (PALLETESTEP)",id:"palletestep",value:dados.palletestep,tipo:"text"},
  1314 + {ajuda:"Indica se o usuário pode incluir comentários no tema",
  1315 + titulo:"Permite comentar (PERMITECOMENTARIO)",id:"",value:dados.permitecomentario,tipo:"text",div:"<div id=cPermitecomentario ></div>"},
1194 ] 1316 ]
1195 }; 1317 };
1196 var paramVetor = { 1318 var paramVetor = {
@@ -1221,12 +1343,6 @@ function montaEditorMetadados(dados) @@ -1221,12 +1343,6 @@ function montaEditorMetadados(dados)
1221 }; 1343 };
1222 var paramNaoOWS = { 1344 var paramNaoOWS = {
1223 "linhas":[ 1345 "linhas":[
1224 - {ajuda:"Indica se o usuário pode fazer download do tema. Se sim, o ícone de download será mostrado na árvore de camadas disponíveis no mapa.",  
1225 - titulo:"Download (METADATA: DOWNLOAD)",id:"",value:dados.download,tipo:"text",div:"<div id=cDownload ></div>"},  
1226 - {ajuda:"Endereço de um arquivo pré-existente para download dos dados (caminho completo no servidor). Se definido, o sistema irá usar esse arquivo ao invés de gerar os dados, quando o usuário clicar nas opções de download. Se não for definido, o arquivo de download é gerado diretamente do original, convertendo do banco ou copiando o arquivo definido em DATA.",  
1227 - titulo:"Arquivo download (ARQUIVODOWNLOAD)",id:"arquivodownload",value:dados.arquivodownload,tipo:"text"},  
1228 - {ajuda:"Endereço de um arquivo KMZ ou KML pré-existente para download dos dados (caminho completo no servidor). Se definido, o sistema irá usar esse arquivo ao invés de gerar os dados, quando o usuário clicar nas opções de visualização de KML ou KMZ. Se não for definido, o arquivo é gerado diretamente do original.",  
1229 - titulo:"Arquivo KML ou KMZ (ARQUIVOKMZ)",id:"arquivokmz",value:dados.arquivokmz,tipo:"text"},  
1230 {ajuda:"É possível a geração de classes automaticamente por meio da definição de colunas na tabela de atributos do tema que armazenam as informações sobre cor, tamanho, etc. Esse metadata é utilizado para definir qual a coluna da tabela que identifica unicamente cada classe. Para cada valor será criada uma classe.<br>O tema que utiliza a geração de classes de forma automática, deve ter definido apenas uma classe. Essa classe será utilizada como padrão para geração das demais.", 1346 {ajuda:"É possível a geração de classes automaticamente por meio da definição de colunas na tabela de atributos do tema que armazenam as informações sobre cor, tamanho, etc. Esse metadata é utilizado para definir qual a coluna da tabela que identifica unicamente cada classe. Para cada valor será criada uma classe.<br>O tema que utiliza a geração de classes de forma automática, deve ter definido apenas uma classe. Essa classe será utilizada como padrão para geração das demais.",
1231 titulo:"Auto-legenda: id das classes (CLASSESITEM)",id:"classesitem",value:dados.classesitem,tipo:"text"}, 1347 titulo:"Auto-legenda: id das classes (CLASSESITEM)",id:"classesitem",value:dados.classesitem,tipo:"text"},
1232 {ajuda:"Nome da coluna que será utilizada para compor o nome das classes geradas automaticamente.", 1348 {ajuda:"Nome da coluna que será utilizada para compor o nome das classes geradas automaticamente.",
@@ -1241,23 +1357,12 @@ function montaEditorMetadados(dados) @@ -1241,23 +1357,12 @@ function montaEditorMetadados(dados)
1241 }; 1357 };
1242 var param = { 1358 var param = {
1243 "linhas":[ 1359 "linhas":[
1244 - {ajuda:"Nome que será utilizado na legenda do mapa e na guia 'Temas'",  
1245 - titulo:"Tema (METADATA: TEMA)",id:"tema",value:dados.tema,tipo:"text"},  
1246 {ajuda:"Temporizador (em segundos) para atualização automática da camada. A camada será redesenhada continuamente a cada intervalo de tempo definido", 1360 {ajuda:"Temporizador (em segundos) para atualização automática da camada. A camada será redesenhada continuamente a cada intervalo de tempo definido",
1247 titulo:"Temporizador em segundos (METADATA: TEMPORIZADOR)",id:"temporizador",value:dados.temporizador,tipo:"text"}, 1361 titulo:"Temporizador em segundos (METADATA: TEMPORIZADOR)",id:"temporizador",value:dados.temporizador,tipo:"text"},
1248 - {ajuda:"Ícone que será mostrado na árvore de camadas. A imagem deve existir na web e deve ser incluído o caminho completo ou relativo em relação ao local da interface HTML do mapa.",  
1249 - titulo:"Ícone (METADATA: ICONETEMA)",id:"iconetema",value:dados.iconetema,tipo:"text"},  
1250 - {ajuda:"Denominador da escala da fonte dos dados utilizado pelo tema. É utilizado para apresentar a indicação de compatibilidade entre a escala do tema e a escala do mapa que está sendo visto.",  
1251 - titulo:"Escala (ESCALA)",id:"escala",value:dados.escala,tipo:"text"},  
1252 - {ajuda:"Extensão geográfica máxima do tema, no formato xmin ymin xmax ymax. É utilizado na opção de 'zoom para o tema'. Quando o tema é baseado em shapefile, esse metadata não é necessário, pois o mapserver consegue calcular a extensão. Já em outros tipos de dados, como Postgis, o parâmetro é necessário. Nesse caso, se não for indicado, o botão de zoom para o tema não será visível para o usuário",  
1253 - titulo:"Extensao (EXTENSAO)",id:"extensao",value:dados.extensao,tipo:"text"},  
1254 {ajuda:"Ativa ou não a manutenção de um cache para armazenar as imagens geradas para montar o mapa. Essa opção afeta apenas as interfaces do i3Geo que utilizam o modo TILE (como a interface OpenLayers). O cache é mantido no diretório temporário utilizado pelo i3Geo, na pasta chamada cache. Para cada camada é criada uma sub-pasta. Para limpar o cache, utilize a opção existente junto ao nó principal desse mapfile", 1362 {ajuda:"Ativa ou não a manutenção de um cache para armazenar as imagens geradas para montar o mapa. Essa opção afeta apenas as interfaces do i3Geo que utilizam o modo TILE (como a interface OpenLayers). O cache é mantido no diretório temporário utilizado pelo i3Geo, na pasta chamada cache. Para cada camada é criada uma sub-pasta. Para limpar o cache, utilize a opção existente junto ao nó principal desse mapfile",
1255 titulo:"Cache de mapas. Camadas WMS são acessadas diretamente do servidor de origem quando o cache estiver inativo. (CACHE)",id:"",value:dados.cache,tipo:"text",div:"<div id=cCache ></div>"}, 1363 titulo:"Cache de mapas. Camadas WMS são acessadas diretamente do servidor de origem quando o cache estiver inativo. (CACHE)",id:"",value:dados.cache,tipo:"text",div:"<div id=cCache ></div>"},
1256 {ajuda:"Nome da coluna da tabela de atributos do tema que será utilizado na ferramenta busca rápida. Entre apenas uma coluna", 1364 {ajuda:"Nome da coluna da tabela de atributos do tema que será utilizado na ferramenta busca rápida. Entre apenas uma coluna",
1257 titulo:"Item utilizado no busca rápida (itembuscarapida)",id:"itembuscarapida",value:dados.itembuscarapida,tipo:"text"}, 1365 titulo:"Item utilizado no busca rápida (itembuscarapida)",id:"itembuscarapida",value:dados.itembuscarapida,tipo:"text"},
1258 -  
1259 - {ajuda:"Indica se o usuário pode incluir comentários no tema",  
1260 - titulo:"Permite comentar (PERMITECOMENTARIO)",id:"",value:dados.permitecomentario,tipo:"text",div:"<div id=cPermitecomentario ></div>"},  
1261 {ajuda:"Indica se as classes serão mostradas ou não na legenda. Por padrão é SIM. ", 1366 {ajuda:"Indica se as classes serão mostradas ou não na legenda. Por padrão é SIM. ",
1262 titulo:"Classe (CLASSE)",id:"",value:dados.classe,tipo:"text",div:"<div id=cClasse ></div>"}, 1367 titulo:"Classe (CLASSE)",id:"",value:dados.classe,tipo:"text",div:"<div id=cClasse ></div>"},
1263 {ajuda:"URL de uma imagem que será utilizada em substituição à geração normal da legenda ", 1368 {ajuda:"URL de uma imagem que será utilizada em substituição à geração normal da legenda ",
@@ -1277,15 +1382,12 @@ function montaEditorMetadados(dados) @@ -1277,15 +1382,12 @@ function montaEditorMetadados(dados)
1277 {ajuda:"Template utilizado no gerador de KML para definir o conteúdo dos balões de informação. O template utiliza o caractere '%' para iniciar e fechar o nome de uma coluna. O template pode usar também elementos HTML, por exemplo: <code>'<b>Nome do municipio</b>: %NOMEMUN%'</code>. Se o template não for especificado, o i3Geo irá utilizar o metadata ITENS e ITENSDESC. Se esses não forem especificados, será utilizado o nome original da coluna.", 1382 {ajuda:"Template utilizado no gerador de KML para definir o conteúdo dos balões de informação. O template utiliza o caractere '%' para iniciar e fechar o nome de uma coluna. O template pode usar também elementos HTML, por exemplo: <code>'<b>Nome do municipio</b>: %NOMEMUN%'</code>. Se o template não for especificado, o i3Geo irá utilizar o metadata ITENS e ITENSDESC. Se esses não forem especificados, será utilizado o nome original da coluna.",
1278 titulo:"KML template (DESCRIPTION_TEMPLATE)",id:"description_template",value:dados.description_template,tipo:"text"}, 1383 titulo:"KML template (DESCRIPTION_TEMPLATE)",id:"description_template",value:dados.description_template,tipo:"text"},
1279 {ajuda:"Lista de colunas que serão utilizadas na opção de inclusão de 'etiquetas'. As etiquetas são mostradas no mapa quando o usuário estaciona o mouse por alguns instantes sobre o mapa. Separe a lista com ','.", 1384 {ajuda:"Lista de colunas que serão utilizadas na opção de inclusão de 'etiquetas'. As etiquetas são mostradas no mapa quando o usuário estaciona o mouse por alguns instantes sobre o mapa. Separe a lista com ','.",
1280 - titulo:"Etiqueta (TIP)",id:"tip",value:dados.tip,tipo:"text"},  
1281 - {ajuda:"Mensagem que será mostrada no rodapé do mapa quando o tema estiver visível. É útil para apresentar ao usuário observações especiais sobre o uso daquele tema.",  
1282 - titulo:"Mensagem (MENSAGEM)",id:"mensagem",value:dados.mensagem,tipo:"text"} 1385 + titulo:"Etiqueta (TIP)",id:"tip",value:dados.tip,tipo:"text"}
1283 ] 1386 ]
1284 }; 1387 };
  1388 +
1285 var paramOWS = { 1389 var paramOWS = {
1286 "linhas":[ 1390 "linhas":[
1287 - {ajuda:"Tipo de representação das feições mostradas da camada. É importante definir esse parâmetro para que as funções de geração de SLD funcionem corretamente.",  
1288 - titulo:"Tipo de representação (tipooriginal)",id:"",value:dados.tipooriginal,tipo:"text",div:"<div id=cTipooriginal ></div>"},  
1289 {ajuda:"space-delimited list of EPSG projection codes supported by the remote server. You normally get this from the server’s capabilities output. This value should be upper case (EPSG:4236.....not epsg:4236) to avoid problems with case sensitive platforms. The value is used to set the SRS WMS URL parameter", 1391 {ajuda:"space-delimited list of EPSG projection codes supported by the remote server. You normally get this from the server’s capabilities output. This value should be upper case (EPSG:4236.....not epsg:4236) to avoid problems with case sensitive platforms. The value is used to set the SRS WMS URL parameter",
1290 titulo:"wms_srs",id:"wms_srs",value:dados.wms_srs,tipo:"text"}, 1392 titulo:"wms_srs",id:"wms_srs",value:dados.wms_srs,tipo:"text"},
1291 {ajuda:"comma-separated list of layers to be fetched from the remote WMS server. This value is used to set the LAYERS and QUERY_LAYERS WMS URL parameters.", 1393 {ajuda:"comma-separated list of layers to be fetched from the remote WMS server. This value is used to set the LAYERS and QUERY_LAYERS WMS URL parameters.",
@@ -1372,19 +1474,6 @@ function montaEditorMetadados(dados) @@ -1372,19 +1474,6 @@ function montaEditorMetadados(dados)
1372 temp += "</select>" 1474 temp += "</select>"
1373 $i("cPermitecomentario").innerHTML = temp 1475 $i("cPermitecomentario").innerHTML = temp
1374 } 1476 }
1375 - if($i("cTipooriginal")){  
1376 - temp = "<select id='tipooriginal' >"  
1377 - temp += core_comboObjeto(objtipooriginal,"valor","texto",dados.tipooriginal)  
1378 - temp += "</select>"  
1379 - $i("cTipooriginal").innerHTML = temp  
1380 - }  
1381 -  
1382 - if($i("cDownload")){  
1383 - temp = "<select id='download' >"  
1384 - temp += core_combosimnao(dados.download)  
1385 - temp += "</select>"  
1386 - $i("cDownload").innerHTML = temp  
1387 - }  
1388 if($i("cClasse")){ 1477 if($i("cClasse")){
1389 temp = "<p><select id='classe' >" 1478 temp = "<p><select id='classe' >"
1390 temp += core_combosimnao(dados.classe) 1479 temp += core_combosimnao(dados.classe)
@@ -1417,16 +1506,10 @@ function montaEditorGeral(dados) @@ -1417,16 +1506,10 @@ function montaEditorGeral(dados)
1417 { 1506 {
1418 var param = { 1507 var param = {
1419 "linhas":[ 1508 "linhas":[
1420 - {ajuda:"Elemento 'NAME'. Não confunda com o nome que aparece no mapa ou na árvore de temas. Normalmente o código recebe o mesmo nome do arquivo mapfile, sem a extensão '.map'",  
1421 - titulo:"Código do layer",id:"name",value:dados.name,tipo:"text"},  
1422 {ajuda:"Name of a group that this layer belongs to. The group name can then be reference as a regular layer name in the template files, allowing to do things like turning on and off a group of layers at once.", 1509 {ajuda:"Name of a group that this layer belongs to. The group name can then be reference as a regular layer name in the template files, allowing to do things like turning on and off a group of layers at once.",
1423 titulo:"Group",id:"group",value:dados.group,tipo:"text"}, 1510 titulo:"Group",id:"group",value:dados.group,tipo:"text"},
1424 - {ajuda:"Projeção",  
1425 - titulo:"Projection",id:"projection",value:dados.projection,tipo:"text"},  
1426 {ajuda:"Sets the current status of the layer. Often modified by MapServer itself. Default turns the layer on permanently", 1511 {ajuda:"Sets the current status of the layer. Often modified by MapServer itself. Default turns the layer on permanently",
1427 titulo:"Status",id:"",value:dados.status,tipo:"text",div:"<div id=cStatus ></div>"}, 1512 titulo:"Status",id:"",value:dados.status,tipo:"text",div:"<div id=cStatus ></div>"},
1428 - {ajuda:"Specifies how the data should be drawn. Need not be the same as the shapefile type. For example, a polygon shapefile may be drawn as a point layer, but a point shapefile may not be drawn as a polygon layer. Common sense rules. Annotation means that a label point will be calculated for the features, but the feature itself will not be drawn although a marker symbol can be optionally drawn. this allows for advanced labeling like numbered highway shields. Points are labeled at that point. Polygons are labeled first using a centroid, and if that doesn't fall in the polygon a scanline approach is used to guarantee the label falls within the feature. Lines are labeled at the middle of the longest arc in the visible portion of the line. Query only means the layer can be queried but not drawn.In order to differentiate between POLYGONs and POLYLINEs (which do not exist as a type), simply respectively use or ommit the COLOR keyword when classifying. If you use it, it's a polygon with a fill color, otherwise it's a polyline with only an OUTLINECOLOR.For CHART layers, see the Dynamic Charting howto.A circle must be defined by a a minimum bounding rectangle. That is, 2 points that define the smallest square that can contain it. These 2 points are the two opposite corners of said box",  
1429 - titulo:"Type",id:"",value:dados.type,tipo:"text",div:"<div id=cType ></div>"},  
1430 {ajuda:"Sets the color index to treat as transparent for raster layers.", 1513 {ajuda:"Sets the color index to treat as transparent for raster layers.",
1431 titulo:"Offsite (R,G,B) (utilize -1,-1,-1 para anular o valor)",id:"offsite",value:dados.offsite,tipo:"text"}, 1514 titulo:"Offsite (R,G,B) (utilize -1,-1,-1 para anular o valor)",id:"offsite",value:dados.offsite,tipo:"text"},
1432 {ajuda:"Sets the opacity level (or the inability to see through the layer) of all classed pixels for a given layer. The value can either be an integer in the range (0-100) or the named symbol 'ALPHA'. A value of 100 is opaque and 0 is fully transparent. Implemented in MapServer 5.0, to replace the deprecated TRANSPARENCY parameter.The 'ALPHA' symbol directs the MapServer rendering code to honor the indexed or alpha transparency of pixmap symbols used to style a layer. This is only needed in the case of RGB output formats, and should be used only when necessary as it is expensive to render transparent pixmap symbols onto an RGB map image.", 1515 {ajuda:"Sets the opacity level (or the inability to see through the layer) of all classed pixels for a given layer. The value can either be an integer in the range (0-100) or the named symbol 'ALPHA'. A value of 100 is opaque and 0 is fully transparent. Implemented in MapServer 5.0, to replace the deprecated TRANSPARENCY parameter.The 'ALPHA' symbol directs the MapServer rendering code to honor the indexed or alpha transparency of pixmap symbols used to style a layer. This is only needed in the case of RGB output formats, and should be used only when necessary as it is expensive to render transparent pixmap symbols onto an RGB map image.",
@@ -1435,10 +1518,6 @@ function montaEditorGeral(dados) @@ -1435,10 +1518,6 @@ function montaEditorGeral(dados)
1435 titulo:"Maxscale (utilize -1 para anular o valor)",id:"maxscale",value:dados.maxscale,tipo:"text"}, 1518 titulo:"Maxscale (utilize -1 para anular o valor)",id:"maxscale",value:dados.maxscale,tipo:"text"},
1436 {ajuda:"Minimum scale at which this LAYER is drawn. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000.", 1519 {ajuda:"Minimum scale at which this LAYER is drawn. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000.",
1437 titulo:"Minscale (utilize -1 para anular o valor)",id:"minscale",value:dados.minscale,tipo:"text"}, 1520 titulo:"Minscale (utilize -1 para anular o valor)",id:"minscale",value:dados.minscale,tipo:"text"},
1438 - {ajuda:"This parameter allows for data specific attribute filtering that is done at the same time spatial filtering is done, but before any CLASS expressions are evaluated. For OGR and shapefiles the string is simply a mapserver regular expression. For spatial databases the string is a SQL WHERE clause that is valid with respect to the underlying database.For example: FILTER type='road' and size <2",  
1439 - titulo:"Filter",id:"filter",value:dados.filter,tipo:"text"},  
1440 - {ajuda:"Item to use with simple FILTER expressions. OGR and shapefiles only.",  
1441 - titulo:"Filteritem",id:"filteritem",value:dados.filteritem,tipo:"text"},  
1442 {ajuda:"Item name in attribute table to use for class annotation (i.e. labeling).", 1521 {ajuda:"Item name in attribute table to use for class annotation (i.e. labeling).",
1443 titulo:"Labelitem",id:"labelitem",value:dados.labelitem,tipo:"text"}, 1522 titulo:"Labelitem",id:"labelitem",value:dados.labelitem,tipo:"text"},
1444 {ajuda:"Maximum scale at which this LAYER is labeled. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000.", 1523 {ajuda:"Maximum scale at which this LAYER is labeled. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000.",
@@ -1472,11 +1551,6 @@ function montaEditorGeral(dados) @@ -1472,11 +1551,6 @@ function montaEditorGeral(dados)
1472 temp += "</select>" 1551 temp += "</select>"
1473 $i("cStatus").innerHTML = temp 1552 $i("cStatus").innerHTML = temp
1474 1553
1475 - temp = "<select id='type' >"  
1476 - temp += core_comboObjeto(objlayertypes,"valor","texto",dados.type)  
1477 - temp += "</select>"  
1478 - $i("cType").innerHTML = temp  
1479 -  
1480 temp = "<select id='sizeunits' >" 1554 temp = "<select id='sizeunits' >"
1481 temp += core_comboObjeto(objmapunits,"valor","texto",dados.sizeunits) 1555 temp += core_comboObjeto(objmapunits,"valor","texto",dados.sizeunits)
1482 temp += "</select>" 1556 temp += "</select>"
@@ -1493,7 +1567,6 @@ function montaEditorGeral(dados) @@ -1493,7 +1567,6 @@ function montaEditorGeral(dados)
1493 var temp = function() 1567 var temp = function()
1494 {salvarDadosEditor('geral',dados.codigoMap,dados.codigoLayer,"","",true)} 1568 {salvarDadosEditor('geral',dados.codigoMap,dados.codigoLayer,"","",true)}
1495 new YAHOO.widget.Button("testarEditor",{ onclick: { fn: temp }}); 1569 new YAHOO.widget.Button("testarEditor",{ onclick: { fn: temp }});
1496 -  
1497 } 1570 }
1498 function montaEditorClasseGeral(dados) 1571 function montaEditorClasseGeral(dados)
1499 { 1572 {
@@ -1728,13 +1801,13 @@ Altera um mapfile conforme o editor específico de uma característica @@ -1728,13 +1801,13 @@ Altera um mapfile conforme o editor específico de uma característica
1728 function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,testar) 1801 function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,testar)
1729 { 1802 {
1730 if(arguments.length < 6){var testar = false;} 1803 if(arguments.length < 6){var testar = false;}
1731 - if(tipo == "conexao") 1804 + if(tipo == "dispo")
1732 { 1805 {
1733 - var campos = new Array("type","connection","data","connectiontype","tileitem","tileindex")  
1734 - var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer  
1735 - var prog = "../php/editormapfile.php?funcao=alterarConexao" 1806 + var campos = new Array("download","arquivodownload","arquivokmz");
  1807 + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
  1808 + var prog = "../php/editormapfile.php?funcao=alterarDispo";
1736 } 1809 }
1737 - if(tipo == "metadados") 1810 + if(tipo == "titulo")
1738 { 1811 {
1739 // 1812 //
1740 //validação 1813 //validação
@@ -1756,13 +1829,26 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo, @@ -1756,13 +1829,26 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,
1756 else 1829 else
1757 {alert("Valor de escala incorreto");return;} 1830 {alert("Valor de escala incorreto");return;}
1758 } 1831 }
1759 - var campos = new Array("legendaimg","wms_srs","wms_name","wms_server_version","wms_format","wms_auth_username","wms_auth_password","wms_auth_type","wms_connectiontimeout","wms_latlonboundingbox","wms_proxy_auth_type","wms_proxy_host","wms_proxy_port","wms_proxy_type","wms_proxy_username","wms_proxy_password","wms_sld_body","wms_sld_url","wms_style","wms_bgcolor","wms_transparent","wms_time","permitecomentario","itembuscarapida","cache","iconetema","ltempoformatodata","ltempoiteminicio","ltempoitemfim","ltempoitemtitulo","ltempoitemdescricao","ltempoitemtip","ltempoitemimagem","ltempoitemicone","ltempoitemlink","editorsql","description_template","palletefile","palletestep","arquivokmz","temporizador","arquivodownload","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","mensagem","identifica","transitioneffect","extensao","escondido","download","escala","tema","classe","tip","itenslink","itens","itensdesc") 1832 +
  1833 + var campos = new Array("name","tema","iconetema","mensagem","escala","extensao");
  1834 + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
  1835 + var prog = "../php/editormapfile.php?funcao=alterarTitulo"
  1836 + }
  1837 + if(tipo == "conexao")
  1838 + {
  1839 + var campos = new Array("projection","type","connection","data","connectiontype","tileitem","tileindex","filteritem","filter","tipooriginal")
  1840 + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer
  1841 + var prog = "../php/editormapfile.php?funcao=alterarConexao"
  1842 + }
  1843 + if(tipo == "metadados")
  1844 + {
  1845 + var campos = new Array("legendaimg","wms_srs","wms_name","wms_server_version","wms_format","wms_auth_username","wms_auth_password","wms_auth_type","wms_connectiontimeout","wms_latlonboundingbox","wms_proxy_auth_type","wms_proxy_host","wms_proxy_port","wms_proxy_type","wms_proxy_username","wms_proxy_password","wms_sld_body","wms_sld_url","wms_style","wms_bgcolor","wms_transparent","wms_time","permitecomentario","itembuscarapida","cache","ltempoformatodata","ltempoiteminicio","ltempoitemfim","ltempoitemtitulo","ltempoitemdescricao","ltempoitemtip","ltempoitemimagem","ltempoitemicone","ltempoitemlink","editorsql","description_template","palletefile","palletestep","temporizador","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","identifica","transitioneffect","extensao","escondido","classe","tip","itenslink","itens","itensdesc")
1760 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer 1846 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer
1761 var prog = "../php/editormapfile.php?funcao=alterarMetadados" 1847 var prog = "../php/editormapfile.php?funcao=alterarMetadados"
1762 } 1848 }
1763 if(tipo == "geral") 1849 if(tipo == "geral")
1764 { 1850 {
1765 - var campos = new Array("name","projection","sizeunits","status","toleranceunits","tolerance","symbolscale","opacity","offsite","minscale","maxscale","labelminscale","labelmaxscale","labelitem","group","filteritem","type","filter") 1851 + var campos = new Array("sizeunits","status","toleranceunits","tolerance","symbolscale","opacity","offsite","minscale","maxscale","labelminscale","labelmaxscale","labelitem","group")
1766 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer 1852 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer
1767 var prog = "../php/editormapfile.php?funcao=alterarGeral" 1853 var prog = "../php/editormapfile.php?funcao=alterarGeral"
1768 } 1854 }
admin/php/editormapfile.php
@@ -634,6 +634,43 @@ switch (strtoupper($funcao)) @@ -634,6 +634,43 @@ switch (strtoupper($funcao))
634 exit; 634 exit;
635 break; 635 break;
636 /* 636 /*
  637 + Valor: PEGATITULO
  638 +
  639 + Obtém os valores de titulo, descricao, etc
  640 +
  641 + Parametros:
  642 +
  643 + codigoMap {string} - nome do mapfile (sem .map)
  644 +
  645 + codigoLayer {string} - 'name' do layer existente no mapfile
  646 +
  647 + Retorno:
  648 +
  649 + {JSON}
  650 + */
  651 + case "PEGATITULO":
  652 + retornaJSON(pegaTitulo());
  653 + exit;
  654 + break;
  655 + case "ALTERARTITULO":
  656 + if(verificaEditores($editores) == "nao")
  657 + {echo "Vc nao e um editor cadastrado. Apenas os editores definidos em i3geo/ms_configura.php podem acessar o sistema de administracao.";exit;}
  658 + alterarTitulo();
  659 + retornaJSON(pegaTitulo());
  660 + exit;
  661 + break;
  662 + case "PEGADISPO":
  663 + retornaJSON(pegaDispo());
  664 + exit;
  665 + break;
  666 + case "ALTERARDISPO":
  667 + if(verificaEditores($editores) == "nao")
  668 + {echo "Vc nao e um editor cadastrado. Apenas os editores definidos em i3geo/ms_configura.php podem acessar o sistema de administracao.";exit;}
  669 + alterarDispo();
  670 + retornaJSON(pegaDispo());
  671 + exit;
  672 + break;
  673 + /*
637 Valor: ALTERARMETADADOS 674 Valor: ALTERARMETADADOS
638 675
639 Altera os valores dos elementos de metadados de um layer 676 Altera os valores dos elementos de metadados de um layer
@@ -1273,6 +1310,68 @@ function excluirEstilo() @@ -1273,6 +1310,68 @@ function excluirEstilo()
1273 removeCabecalho($mapfile); 1310 removeCabecalho($mapfile);
1274 return "ok"; 1311 return "ok";
1275 } 1312 }
  1313 +function pegaTitulo()
  1314 +{
  1315 + global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa;
  1316 + $dados = array();
  1317 + $mapfile = $locaplic."/temas/".$codigoMap.".map";
  1318 + $mapa = ms_newMapObj($mapfile);
  1319 + $layer = $mapa->getlayerbyname($codigoLayer);
  1320 + $dados["name"] = $layer->name;
  1321 + $dados["tema"] = mb_convert_encoding($layer->getmetadata("tema"),"UTF-8","ISO-8859-1");//$layer->getmetadata("tema");
  1322 + $dados["iconetema"] = $layer->getmetadata("iconetema");
  1323 + $dados["mensagem"] = mb_convert_encoding($layer->getmetadata("mensagem"),"UTF-8","ISO-8859-1");//$layer->getmetadata("mensagem");
  1324 + $dados["escala"] = $layer->getmetadata("escala");
  1325 + $dados["extensao"] = $layer->getmetadata("extensao");
  1326 + $dados["codigoMap"] = $codigoMap;
  1327 + $dados["codigoLayer"] = $codigoLayer;
  1328 + return $dados;
  1329 +}
  1330 +function alterarTitulo()
  1331 +{
  1332 + global $dir_tmp,$codigoMap,$codigoLayer,$locaplic,$name,$tema,$iconetema,$mensagem,$escala,$extensao;
  1333 + $mapfile = $locaplic."/temas/".$codigoMap.".map";
  1334 + $mapa = ms_newMapObj($mapfile);
  1335 + $layer = $mapa->getlayerbyname($codigoLayer);
  1336 + $layer->set("name",$name);
  1337 + $layer->setmetadata("tema",$tema);
  1338 + $layer->setmetadata("iconetema",$iconetema);
  1339 + $layer->setmetadata("mensagem",$mensagem);
  1340 + $layer->setmetadata("escala",$escala);
  1341 + $layer->setmetadata("extensao",$extensao);
  1342 + $mapa->save($mapfile);
  1343 + removeCabecalho($mapfile);
  1344 + return "ok";
  1345 +}
  1346 +
  1347 +function pegaDispo()
  1348 +{
  1349 + global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa;
  1350 + $dados = array();
  1351 + $mapfile = $locaplic."/temas/".$codigoMap.".map";
  1352 + $mapa = ms_newMapObj($mapfile);
  1353 + $layer = $mapa->getlayerbyname($codigoLayer);
  1354 + $dados["download"] = $layer->getmetadata("download");
  1355 + $dados["arquivodownload"] = $layer->getmetadata("arquivodownload");
  1356 + $dados["arquivokmz"] = $layer->getmetadata("arquivokmz");
  1357 + $dados["codigoMap"] = $codigoMap;
  1358 + $dados["codigoLayer"] = $codigoLayer;
  1359 + return $dados;
  1360 +}
  1361 +function alterarDispo()
  1362 +{
  1363 + global $dir_tmp,$codigoMap,$codigoLayer,$locaplic,$download,$arquivodownload,$arquivokmz;
  1364 + $mapfile = $locaplic."/temas/".$codigoMap.".map";
  1365 + $mapa = ms_newMapObj($mapfile);
  1366 + $layer = $mapa->getlayerbyname($codigoLayer);
  1367 + $layer->setmetadata("download",$download);
  1368 + $layer->setmetadata("arquivodownload",$arquivodownload);
  1369 + $layer->setmetadata("arquivokmz",$arquivokmz);
  1370 + $mapa->save($mapfile);
  1371 + removeCabecalho($mapfile);
  1372 + return "ok";
  1373 +}
  1374 +
1276 function pegaConexao() 1375 function pegaConexao()
1277 { 1376 {
1278 global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa; 1377 global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa;
@@ -1293,11 +1392,19 @@ function pegaConexao() @@ -1293,11 +1392,19 @@ function pegaConexao()
1293 $dados["codigoMap"] = $codigoMap; 1392 $dados["codigoMap"] = $codigoMap;
1294 $dados["codigoLayer"] = $codigoLayer; 1393 $dados["codigoLayer"] = $codigoLayer;
1295 $dados["type"] = $layer->type; 1394 $dados["type"] = $layer->type;
  1395 + $dados["filter"] = $layer->getfilterstring();
  1396 + if($dados["filter"]== ""){$dados["filter"] = "";}
  1397 + $dados["filteritem"] = $layer->filteritem;
  1398 + $dados["projection"] = $layer->getProjection();
  1399 + $dados["colunas"] = implode(" ,",pegaItens($layer));
  1400 + if($layer->connectiontype == 7 || $layer->connectiontype == 9){
  1401 + $dados["tipooriginal"] = $layer->getmetadata("tipooriginal");
  1402 + }
1296 return $dados; 1403 return $dados;
1297 } 1404 }
1298 function alterarConexao() 1405 function alterarConexao()
1299 { 1406 {
1300 - global $type,$dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$connection,$connectiontype,$data,$tileitem,$tileindex; 1407 + global $tipooriginal,$filteritem,$filter,$projection,$type,$dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$connection,$connectiontype,$data,$tileitem,$tileindex;
1301 $mapfile = $locaplic."/temas/".$codigoMap.".map"; 1408 $mapfile = $locaplic."/temas/".$codigoMap.".map";
1302 $mapa = ms_newMapObj($mapfile); 1409 $mapa = ms_newMapObj($mapfile);
1303 $layer = $mapa->getlayerbyname($codigoLayer); 1410 $layer = $mapa->getlayerbyname($codigoLayer);
@@ -1310,6 +1417,15 @@ function alterarConexao() @@ -1310,6 +1417,15 @@ function alterarConexao()
1310 $layer->set("tileitem",$tileitem); 1417 $layer->set("tileitem",$tileitem);
1311 $layer->set("tileindex",$tileindex); 1418 $layer->set("tileindex",$tileindex);
1312 $layer->set("type",$type); 1419 $layer->set("type",$type);
  1420 + $layer->setfilter($filter);
  1421 + $layer->set("filteritem",$filteritem);
  1422 + if($layer->getprojection() == MS_TRUE)
  1423 + $layer->setprojection($projection);
  1424 + if($layer->getprojection() == MS_FALSE && $projection != "")
  1425 + $layer->setprojection($projection);
  1426 + if($layer->connectiontype == 7 || $layer->connectiontype== 9){
  1427 + $layer->setmetadata("tipooriginal",$tipooriginal);
  1428 + }
1313 if($testar == "true") 1429 if($testar == "true")
1314 { 1430 {
1315 $nome = $dir_tmp."/".$codigoMap.".map"; 1431 $nome = $dir_tmp."/".$codigoMap.".map";
@@ -1338,24 +1454,24 @@ function pegaMetadados() @@ -1338,24 +1454,24 @@ function pegaMetadados()
1338 $dados["itensdesc"] = mb_convert_encoding($layer->getmetadata("itensdesc"),"UTF-8","ISO-8859-1"); //$layer->getmetadata("itensdesc"); 1454 $dados["itensdesc"] = mb_convert_encoding($layer->getmetadata("itensdesc"),"UTF-8","ISO-8859-1"); //$layer->getmetadata("itensdesc");
1339 $dados["itenslink"] = $layer->getmetadata("itenslink"); 1455 $dados["itenslink"] = $layer->getmetadata("itenslink");
1340 $dados["tip"] = $layer->getmetadata("tip"); 1456 $dados["tip"] = $layer->getmetadata("tip");
1341 - $dados["tema"] = mb_convert_encoding($layer->getmetadata("tema"),"UTF-8","ISO-8859-1");//$layer->getmetadata("tema"); 1457 +
1342 $dados["classe"] = $layer->getmetadata("classe"); 1458 $dados["classe"] = $layer->getmetadata("classe");
1343 - $dados["escala"] = $layer->getmetadata("escala");  
1344 - $dados["download"] = $layer->getmetadata("download"); 1459 +
  1460 +
1345 $dados["escondido"] = $layer->getmetadata("escondido"); 1461 $dados["escondido"] = $layer->getmetadata("escondido");
1346 - $dados["extensao"] = $layer->getmetadata("extensao"); 1462 +
1347 $dados["identifica"] = $layer->getmetadata("identifica"); 1463 $dados["identifica"] = $layer->getmetadata("identifica");
1348 $dados["transitioneffect"] = $layer->getmetadata("transitioneffect"); 1464 $dados["transitioneffect"] = $layer->getmetadata("transitioneffect");
1349 - $dados["mensagem"] = mb_convert_encoding($layer->getmetadata("mensagem"),"UTF-8","ISO-8859-1");//$layer->getmetadata("mensagem"); 1465 +
1350 $dados["classesitem"] = $layer->getmetadata("classesitem"); 1466 $dados["classesitem"] = $layer->getmetadata("classesitem");
1351 $dados["classesnome"] = $layer->getmetadata("classesnome"); 1467 $dados["classesnome"] = $layer->getmetadata("classesnome");
1352 $dados["classescor"] = $layer->getmetadata("classescor"); 1468 $dados["classescor"] = $layer->getmetadata("classescor");
1353 $dados["classessimbolo"] = $layer->getmetadata("classessimbolo"); 1469 $dados["classessimbolo"] = $layer->getmetadata("classessimbolo");
1354 $dados["classestamanho"] = $layer->getmetadata("classestamanho"); 1470 $dados["classestamanho"] = $layer->getmetadata("classestamanho");
1355 $dados["aplicaextensao"] = $layer->getmetadata("aplicaextensao"); 1471 $dados["aplicaextensao"] = $layer->getmetadata("aplicaextensao");
1356 - $dados["arquivodownload"] = $layer->getmetadata("arquivodownload"); 1472 +
1357 $dados["temporizador"] = $layer->getmetadata("temporizador"); 1473 $dados["temporizador"] = $layer->getmetadata("temporizador");
1358 - $dados["arquivokmz"] = $layer->getmetadata("arquivokmz"); 1474 +
1359 $dados["palletefile"] = $layer->getmetadata("palletefile"); 1475 $dados["palletefile"] = $layer->getmetadata("palletefile");
1360 $dados["palletestep"] = $layer->getmetadata("palletestep"); 1476 $dados["palletestep"] = $layer->getmetadata("palletestep");
1361 $dados["description_template"] = $layer->getmetadata("description_template"); 1477 $dados["description_template"] = $layer->getmetadata("description_template");
@@ -1373,7 +1489,7 @@ function pegaMetadados() @@ -1373,7 +1489,7 @@ function pegaMetadados()
1373 $dados["ltempoitemimagem"] = $layer->getmetadata("ltempoitemimagem"); 1489 $dados["ltempoitemimagem"] = $layer->getmetadata("ltempoitemimagem");
1374 $dados["ltempoitemicone"] = $layer->getmetadata("ltempoitemicone"); 1490 $dados["ltempoitemicone"] = $layer->getmetadata("ltempoitemicone");
1375 $dados["ltempoitemlink"] = $layer->getmetadata("ltempoitemlink"); 1491 $dados["ltempoitemlink"] = $layer->getmetadata("ltempoitemlink");
1376 - $dados["iconetema"] = $layer->getmetadata("iconetema"); 1492 +
1377 $dados["permitecomentario"] = $layer->getmetadata("permitecomentario"); 1493 $dados["permitecomentario"] = $layer->getmetadata("permitecomentario");
1378 $dados["itembuscarapida"] = $layer->getmetadata("itembuscarapida"); 1494 $dados["itembuscarapida"] = $layer->getmetadata("itembuscarapida");
1379 $dados["legendaimg"] = $layer->getmetadata("legendaimg"); 1495 $dados["legendaimg"] = $layer->getmetadata("legendaimg");
@@ -1400,13 +1516,12 @@ function pegaMetadados() @@ -1400,13 +1516,12 @@ function pegaMetadados()
1400 $dados["wms_bgcolor"] = $layer->getmetadata("wms_bgcolor"); 1516 $dados["wms_bgcolor"] = $layer->getmetadata("wms_bgcolor");
1401 $dados["wms_transparent"] = $layer->getmetadata("wms_transparent"); 1517 $dados["wms_transparent"] = $layer->getmetadata("wms_transparent");
1402 $dados["wms_time"] = $layer->getmetadata("wms_time"); 1518 $dados["wms_time"] = $layer->getmetadata("wms_time");
1403 - $dados["tipooriginal"] = $layer->getmetadata("tipooriginal");  
1404 } 1519 }
1405 return $dados; 1520 return $dados;
1406 } 1521 }
1407 function alterarMetadados() 1522 function alterarMetadados()
1408 { 1523 {
1409 - global $tipooriginal,$legendaimg,$wms_srs,$wms_name,$wms_server_version,$wms_format,$wms_auth_username,$wms_auth_password,$wms_auth_type,$wms_connectiontimeout,$wms_latlonboundingbox,$wms_proxy_auth_type,$wms_proxy_host,$wms_proxy_port,$wms_proxy_type,$wms_proxy_username,$wms_proxy_password,$wms_sld_body,$wms_sld_url,$wms_style,$wms_bgcolor,$wms_transparent,$wms_time,$permitecomentario,$itembuscarapida,$iconetema,$ltempoformatodata,$ltempoiteminicio,$ltempoitemfim,$ltempoitemtitulo,$ltempoitemdescricao,$ltempoitemtip,$ltempoitemimagem,$ltempoitemicone,$ltempoitemlink,$description_template,$palletestep,$palletefile,$arquivodownload,$temporizador,$arquivokmz,$codigoMap,$codigoLayer,$locaplic,$aplicaextensao,$classestamanho,$classessimbolo,$classescor,$classesnome,$classesitem,$mensagem,$identifica,$transitioneffect,$extensao,$escondido,$download,$escala,$tema,$classe,$tip,$itenslink,$itens,$itensdesc,$editorsql,$cache; 1524 + global $tipooriginal,$legendaimg,$wms_srs,$wms_name,$wms_server_version,$wms_format,$wms_auth_username,$wms_auth_password,$wms_auth_type,$wms_connectiontimeout,$wms_latlonboundingbox,$wms_proxy_auth_type,$wms_proxy_host,$wms_proxy_port,$wms_proxy_type,$wms_proxy_username,$wms_proxy_password,$wms_sld_body,$wms_sld_url,$wms_style,$wms_bgcolor,$wms_transparent,$wms_time,$permitecomentario,$itembuscarapida,$iconetema,$ltempoformatodata,$ltempoiteminicio,$ltempoitemfim,$ltempoitemtitulo,$ltempoitemdescricao,$ltempoitemtip,$ltempoitemimagem,$ltempoitemicone,$ltempoitemlink,$description_template,$palletestep,$palletefile,$temporizador,$codigoMap,$codigoLayer,$locaplic,$aplicaextensao,$classestamanho,$classessimbolo,$classescor,$classesnome,$classesitem,$mensagem,$identifica,$transitioneffect,$extensao,$escondido,$classe,$tip,$itenslink,$itens,$itensdesc,$editorsql,$cache;
1410 $dados = array(); 1525 $dados = array();
1411 $mapfile = $locaplic."/temas/".$codigoMap.".map"; 1526 $mapfile = $locaplic."/temas/".$codigoMap.".map";
1412 $mapa = ms_newMapObj($mapfile); 1527 $mapa = ms_newMapObj($mapfile);
@@ -1415,24 +1530,24 @@ function alterarMetadados() @@ -1415,24 +1530,24 @@ function alterarMetadados()
1415 $layer->setmetadata("itensdesc",$itensdesc); 1530 $layer->setmetadata("itensdesc",$itensdesc);
1416 $layer->setmetadata("itenslink",$itenslink); 1531 $layer->setmetadata("itenslink",$itenslink);
1417 $layer->setmetadata("tip",$tip); 1532 $layer->setmetadata("tip",$tip);
1418 - $layer->setmetadata("tema",$tema); 1533 +
1419 $layer->setmetadata("classe",$classe); 1534 $layer->setmetadata("classe",$classe);
1420 - $layer->setmetadata("escala",$escala);  
1421 - $layer->setmetadata("download",$download); 1535 +
  1536 +
1422 $layer->setmetadata("escondido",$escondido); 1537 $layer->setmetadata("escondido",$escondido);
1423 - $layer->setmetadata("extensao",$extensao); 1538 +
1424 $layer->setmetadata("identifica",$identifica); 1539 $layer->setmetadata("identifica",$identifica);
1425 $layer->setmetadata("transitioneffect",$transitioneffect); 1540 $layer->setmetadata("transitioneffect",$transitioneffect);
1426 - $layer->setmetadata("mensagem",$mensagem); 1541 +
1427 $layer->setmetadata("classesitem",$classesitem); 1542 $layer->setmetadata("classesitem",$classesitem);
1428 $layer->setmetadata("classesnome",$classesnome); 1543 $layer->setmetadata("classesnome",$classesnome);
1429 $layer->setmetadata("classescor",$classescor); 1544 $layer->setmetadata("classescor",$classescor);
1430 $layer->setmetadata("classessimbolo",$classessimbolo); 1545 $layer->setmetadata("classessimbolo",$classessimbolo);
1431 $layer->setmetadata("classestamanho",$classestamanho); 1546 $layer->setmetadata("classestamanho",$classestamanho);
1432 $layer->setmetadata("aplicaextensao",$aplicaextensao); 1547 $layer->setmetadata("aplicaextensao",$aplicaextensao);
1433 - $layer->setmetadata("arquivodownload",$arquivodownload); 1548 +
1434 $layer->setmetadata("temporizador",$temporizador); 1549 $layer->setmetadata("temporizador",$temporizador);
1435 - $layer->setmetadata("arquivokmz",$arquivokmz); 1550 +
1436 $layer->setmetadata("palletefile",$palletefile); 1551 $layer->setmetadata("palletefile",$palletefile);
1437 $layer->setmetadata("palletestep",$palletestep); 1552 $layer->setmetadata("palletestep",$palletestep);
1438 $layer->setmetadata("description_template",$description_template); 1553 $layer->setmetadata("description_template",$description_template);
@@ -1448,7 +1563,7 @@ function alterarMetadados() @@ -1448,7 +1563,7 @@ function alterarMetadados()
1448 $layer->setmetadata("ltempoitemimagem",$ltempoitemimagem); 1563 $layer->setmetadata("ltempoitemimagem",$ltempoitemimagem);
1449 $layer->setmetadata("ltempoitemicone",$ltempoitemicone); 1564 $layer->setmetadata("ltempoitemicone",$ltempoitemicone);
1450 $layer->setmetadata("ltempoitemlink",$ltempoitemlink); 1565 $layer->setmetadata("ltempoitemlink",$ltempoitemlink);
1451 - $layer->setmetadata("iconetema",$iconetema); 1566 +
1452 $layer->setmetadata("permitecomentario",$permitecomentario); 1567 $layer->setmetadata("permitecomentario",$permitecomentario);
1453 $layer->setmetadata("itembuscarapida",$itembuscarapida); 1568 $layer->setmetadata("itembuscarapida",$itembuscarapida);
1454 $layer->setmetadata("legendaimg",$legendaimg); 1569 $layer->setmetadata("legendaimg",$legendaimg);
@@ -1498,10 +1613,6 @@ function pegaGeral() @@ -1498,10 +1613,6 @@ function pegaGeral()
1498 $mapfile = $locaplic."/temas/".$codigoMap.".map"; 1613 $mapfile = $locaplic."/temas/".$codigoMap.".map";
1499 $mapa = ms_newMapObj($mapfile); 1614 $mapa = ms_newMapObj($mapfile);
1500 $layer = $mapa->getlayerbyname($codigoLayer); 1615 $layer = $mapa->getlayerbyname($codigoLayer);
1501 - $dados["type"] = $layer->type;  
1502 - $dados["filter"] = $layer->getfilterstring();  
1503 - if($dados["filter"]== ""){$dados["filter"] = "";}  
1504 - $dados["filteritem"] = $layer->filteritem;  
1505 $dados["group"] = $layer->group; 1616 $dados["group"] = $layer->group;
1506 //$dados["labelangleitem"] = $layer->labelangleitem; 1617 //$dados["labelangleitem"] = $layer->labelangleitem;
1507 $dados["labelitem"] = $layer->labelitem; 1618 $dados["labelitem"] = $layer->labelitem;
@@ -1518,8 +1629,7 @@ function pegaGeral() @@ -1518,8 +1629,7 @@ function pegaGeral()
1518 $dados["toleranceunits"] = $layer->toleranceunits; 1629 $dados["toleranceunits"] = $layer->toleranceunits;
1519 $dados["status"] = $layer->status; 1630 $dados["status"] = $layer->status;
1520 $dados["sizeunits"] = $layer->sizeunits; 1631 $dados["sizeunits"] = $layer->sizeunits;
1521 - $dados["projection"] = $layer->getProjection();  
1522 - $dados["name"] = $layer->name; 1632 +
1523 if($dados["projection"] == "null") 1633 if($dados["projection"] == "null")
1524 {$dados["projection"] = "";} 1634 {$dados["projection"] = "";}
1525 $dados["projection"] = str_replace("+i","i",$dados["projection"]); 1635 $dados["projection"] = str_replace("+i","i",$dados["projection"]);
@@ -1530,7 +1640,7 @@ function pegaGeral() @@ -1530,7 +1640,7 @@ function pegaGeral()
1530 } 1640 }
1531 function alterarGeral() 1641 function alterarGeral()
1532 { 1642 {
1533 - global $dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$name,$projection,$sizeunits,$status,$toleranceunits,$tolerance,$symbolscale,$opacity,$offsite,$minscale,$maxscale,$labelsizeitem,$labelminscale,$labelmaxscale,$labelitem,$group,$filteritem,$type,$filter; 1643 + global $dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$sizeunits,$status,$toleranceunits,$tolerance,$symbolscale,$opacity,$offsite,$minscale,$maxscale,$labelsizeitem,$labelminscale,$labelmaxscale,$labelitem,$group;
1534 error_reporting(0); 1644 error_reporting(0);
1535 $v = versao(); 1645 $v = versao();
1536 $dados = array(); 1646 $dados = array();
@@ -1541,10 +1651,9 @@ function alterarGeral() @@ -1541,10 +1651,9 @@ function alterarGeral()
1541 1651
1542 if($offsite == -1 || $offsite == "null") 1652 if($offsite == -1 || $offsite == "null")
1543 {$offsite = "-1,-1,-1";} 1653 {$offsite = "-1,-1,-1";}
1544 - $layer->set("name",$name);  
1545 - $layer->set("type",$type);  
1546 - $layer->setfilter($filter);  
1547 - $layer->set("filteritem",$filteritem); 1654 +
  1655 +
  1656 +
1548 $layer->set("group",$group); 1657 $layer->set("group",$group);
1549 //$layer->set("labelangleitem",$labelangleitem); 1658 //$layer->set("labelangleitem",$labelangleitem);
1550 $layer->set("labelitem",$labelitem); 1659 $layer->set("labelitem",$labelitem);
@@ -1566,11 +1675,6 @@ function alterarGeral() @@ -1566,11 +1675,6 @@ function alterarGeral()
1566 $layer->set("toleranceunits",$toleranceunits); 1675 $layer->set("toleranceunits",$toleranceunits);
1567 $layer->set("status",$status); 1676 $layer->set("status",$status);
1568 $layer->set("sizeunits",$sizeunits); 1677 $layer->set("sizeunits",$sizeunits);
1569 -  
1570 - if($layer->getprojection() == MS_TRUE)  
1571 - $layer->setprojection($projection);  
1572 - if($layer->getprojection() == MS_FALSE && $projection != "")  
1573 - $layer->setprojection($projection);  
1574 1678
1575 if($testar == "true") 1679 if($testar == "true")
1576 { 1680 {
temas/biomashp.map
@@ -8,30 +8,30 @@ MAP @@ -8,30 +8,30 @@ MAP
8 GROUP "biomashp" 8 GROUP "biomashp"
9 HEADER "teste.htm" 9 HEADER "teste.htm"
10 METADATA 10 METADATA
11 - "ltempoitemimagem" ""  
12 "cache" "" 11 "cache" ""
13 - "CLASSE" "SIM" 12 + "ltempoitemimagem" ""
14 "ltempoitemdescricao" "" 13 "ltempoitemdescricao" ""
15 - "palletestep" "" 14 + "CLASSE" "SIM"
16 "ltempoiteminicio" "" 15 "ltempoiteminicio" ""
17 - "permitekmz" "sim" 16 + "palletestep" ""
18 "ltempoitemtip" "" 17 "ltempoitemtip" ""
19 - "iconetema" "http://www.gpsdrive.de/development/map-icons/square.small/leisure/park.png"  
20 - "description_template" "" 18 + "permitekmz" "sim"
21 "ltempoitemtitulo" "" 19 "ltempoitemtitulo" ""
  20 + "description_template" ""
  21 + "iconetema" "http://www.gpsdrive.de/development/map-icons/square.small/leisure/park.png"
22 "ltempoitemlink" "" 22 "ltempoitemlink" ""
23 - "palletefile" ""  
24 "extensao" "-44 -23 -39 -21" 23 "extensao" "-44 -23 -39 -21"
  24 + "palletefile" ""
25 "NOMEORIGINAL" "" 25 "NOMEORIGINAL" ""
26 - "permitedownload" "sim"  
27 "ltempoformatodata" "" 26 "ltempoformatodata" ""
  27 + "permitedownload" "sim"
28 "ltempoitemicone" "" 28 "ltempoitemicone" ""
29 "download" "SIM" 29 "download" "SIM"
30 - "permitekml" "sim"  
31 "permiteogc" "" 30 "permiteogc" ""
32 - "TEMA" "biomashp"  
33 - "identifica" "NAO" 31 + "permitekml" "sim"
  32 + "TEMA" "bioma shp"
34 "editorsql" "" 33 "editorsql" ""
  34 + "identifica" "NAO"
35 "ltempoitemfim" "" 35 "ltempoitemfim" ""
36 END 36 END
37 NAME "biomashp" 37 NAME "biomashp"