Commit badb489f26006e366b442a1c137c1730865198fe

Authored by Edmar Moretti
1 parent c8f5661a

--no commit message

admin/js/editormapfile.js
... ... @@ -370,6 +370,14 @@ function montaParametrosTemas(no,dados,redesenha)
370 370 var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
371 371 tempNode.isLeaf = true;
372 372 }
  373 + if(!tree.getNodeByProperty("etiquetaComport",id))
  374 + {
  375 + conteudo = "<span style=cursor:pointer; onclick=\"editorComport('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Comportamento no mapa</span>"
  376 + var d = {tipo:"etiquetaComport",etiquetaComport:id,html:conteudo}
  377 + var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
  378 + tempNode.isLeaf = true;
  379 + }
  380 +
373 381 if(!tree.getNodeByProperty("etiquetaDispo",id))
374 382 {
375 383 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>"
... ... @@ -380,18 +388,11 @@ function montaParametrosTemas(no,dados,redesenha)
380 388 //rever
381 389 if(!tree.getNodeByProperty("etiquetaMetadados",id))
382 390 {
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>"
  391 + 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\" /> Miscelânea</span>"
384 392 var d = {tipo:"etiquetaMetadados",etiquetaMetadados:id,html:conteudo}
385 393 var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
386 394 tempNode.isLeaf = true;
387 395 }
388   - if(!tree.getNodeByProperty("etiquetaGeral",id))
389   - {
390   - conteudo = "<span style=cursor:pointer; onclick=\"editorGeral('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='parâmetros gerais' src=\"../imagens/06.png\" /> Editar características gerais</span>"
391   - var d = {tipo:"etiquetaGeral",etiquetaGeral:id,html:conteudo}
392   - var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
393   - tempNode.isLeaf = true;
394   - }
395 396 var tempNodeR = no;
396 397 if(!tree.getNodeByProperty("etiquetaClasses",id))
397 398 {
... ... @@ -1062,6 +1063,20 @@ function editorDados(codigoMap,codigoLayer)
1062 1063 core_pegaDados("Obtendo dados...",sUrl,"montaEditorDados")
1063 1064 }
1064 1065 /*
  1066 +Function: editorComport
  1067 +
  1068 +Abre o editor das opções que controlam o comportamento do layer no mapa
  1069 +
  1070 +<PEGACOMPORT>
  1071 +*/
  1072 +function editorComport(codigoMap,codigoLayer)
  1073 +{
  1074 + core_montaEditor("","450px","650px")
  1075 + var sUrl = "../php/editormapfile.php?funcao=pegaComport&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
  1076 + core_pegaDados("Obtendo dados...",sUrl,"montaEditorComport")
  1077 +}
  1078 +
  1079 +/*
1065 1080 Function: editorTitulo
1066 1081  
1067 1082 Abre o editor de título e descrição
... ... @@ -1155,6 +1170,111 @@ function editorEstilo(codigoMap,codigoLayer,indiceClasse,indiceEstilo)
1155 1170 var sUrl = "../php/editormapfile.php?funcao=pegaEstilo&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse+"&indiceEstilo="+indiceEstilo;
1156 1171 core_pegaDados("Obtendo dados...",sUrl,"montaEditorEstilo")
1157 1172 }
  1173 +function montaEditorComport(dados)
  1174 +{
  1175 + var param = {
  1176 + "linhas":[
  1177 + {ajuda:"Sets the current status of the layer. Often modified by MapServer itself. Default turns the layer on permanently",
  1178 + titulo:"Status",id:"",value:dados.status,tipo:"text",div:"<div id=cStatus ></div>"},
  1179 + {ajuda:"Indica se o tema irá ser mostrado na ferramenta de identificação",
  1180 + titulo:"Identifica (IDENTIFICA)",id:"",value:dados.identifica,tipo:"text",div:"<div id=cIdentifica ></div>"},
  1181 + {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.",
  1182 + titulo:"Opacity",id:"opacity",value:dados.opacity,tipo:"text"},
  1183 + {ajuda:"Indica se a extensão geográfica do mapa deve ser alterada quando o tema for adicionado ao mapa",
  1184 + titulo:"Aplica extensao (APLICAEXTENSAO)",id:"",value:dados.aplicaextensao,tipo:"text",div:"<div id=cAplicaextensao ></div>"},
  1185 + {ajuda:"Indica se o usuário pode incluir comentários no tema",
  1186 + titulo:"Permite comentar (PERMITECOMENTARIO)",id:"",value:dados.permitecomentario,tipo:"text",div:"<div id=cPermitecomentario ></div>"},
  1187 + {ajuda:"Temporizador (em segundos) para atualização automática da camada. A camada será redesenhada continuamente a cada intervalo de tempo definido",
  1188 + titulo:"Temporizador em segundos (METADATA: TEMPORIZADOR)",id:"temporizador",value:dados.temporizador,tipo:"text"},
  1189 + {ajuda:"Indica se as classes serão mostradas ou não na legenda. Por padrão é SIM. ",
  1190 + titulo:"Classe (CLASSE)",id:"",value:dados.classe,tipo:"text",div:"<div id=cClasse ></div>"},
  1191 + {ajuda:"URL de uma imagem que será utilizada em substituição à geração normal da legenda ",
  1192 + titulo:"URL da legenda (opcional) (LEGENDAIMG)",id:"legendaimg",value:dados.legendaimg,tipo:"text"},
  1193 + {ajuda:"Indica se o tema é mostrado no mapa mas não nas listas da legenda e na guia 'temas'",
  1194 + titulo:"Escondido (ESCONDIDO)",id:"",value:dados.escondido,tipo:"text",div:"<div id=cEscondido ></div>"},
  1195 + {ajuda:"Aplica efeitos de transição nas operações de zoom e pan na interface Openlayers",
  1196 + titulo:"Efeitos de transição zoom (TRANSITIONEFFECT)",id:"",value:dados.transitioneffect,tipo:"text",div:"<div id=cTransitioneffect ></div>"},
  1197 + {ajuda:"Sets the color index to treat as transparent for raster layers.",
  1198 + titulo:"Offsite (R,G,B) (utilize -1,-1,-1 para anular o valor)",id:"offsite",value:dados.offsite,tipo:"text"},
  1199 + {ajuda:"Maximum 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.",
  1200 + titulo:"Maxscale (utilize -1 para anular o valor)",id:"maxscale",value:dados.maxscale,tipo:"text"},
  1201 + {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.",
  1202 + titulo:"Minscale (utilize -1 para anular o valor)",id:"minscale",value:dados.minscale,tipo:"text"},
  1203 + {ajuda:"Item name in attribute table to use for class annotation (i.e. labeling).",
  1204 + titulo:"Labelitem",id:"labelitem",value:dados.labelitem,tipo:"text"},
  1205 + {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.",
  1206 + titulo:"Labelmaxscale (utilize -1 para anular o valor)",id:"labelmaxscale",value:dados.labelmaxscale,tipo:"text"},
  1207 + {ajuda:"Minimum 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.",
  1208 + titulo:"Labelminscale (utilize -1 para anular o valor)",id:"labelminscale",value:dados.labelminscale,tipo:"text"},
  1209 + {ajuda:"The scale at which symbols and/or text appear full size. This allows for dynamic scaling of objects based on the scale of the map. If not set then this layer will always appear at the same size. Scaling only takes place within the limits of MINSIZE and MAXSIZE as described above. 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.",
  1210 + titulo:"Symbolscale (utilize -1 para anular o valor)",id:"symbolscale",value:dados.symbolscale,tipo:"text"},
  1211 + {ajuda:"Sensitivity for point based queries (i.e. via mouse and/or map coordinates). Given in TOLERANCEUNITS. If the layer is a POINT or a LINE, the default is 3. For all other layer types, the default is 0. To restrict polygon searches so that the point must occur in the polygon set the tolerance to zero.",
  1212 + titulo:"Tolerance",id:"tolerance",value:dados.tolerance,tipo:"text"},
  1213 + {ajuda:" ",
  1214 + titulo:"Tolerance units",id:"",value:dados.toleranceunits,tipo:"text",div:"<div id=cToleranceunits ></div>"},
  1215 + {ajuda:"Sets the unit of CLASS object SIZE values (default is pixels). Useful for simulating buffering",
  1216 + titulo:"Sizeunits",id:"",value:dados.sizeunits,tipo:"text",div:"<div id=cSizeunits ></div>"}
  1217 + ]
  1218 + }
  1219 + var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />"
  1220 + ins += core_geraLinhas(param)
  1221 + ins += "<br><br><br>"
  1222 + $i("editor_bd").innerHTML = ins
  1223 +
  1224 + if($i("cAplicaextensao")){
  1225 + temp = "<select id='aplicaextensao' >"
  1226 + temp += core_combosimnao(dados.aplicaextensao)
  1227 + temp += "</select>"
  1228 + $i("cAplicaextensao").innerHTML = temp
  1229 + }
  1230 + if($i("cPermitecomentario")){
  1231 + temp = "<select id='permitecomentario' >"
  1232 + temp += core_combosimnao(dados.permitecomentario)
  1233 + temp += "</select>"
  1234 + $i("cPermitecomentario").innerHTML = temp
  1235 + }
  1236 + if($i("cClasse")){
  1237 + temp = "<p><select id='classe' >"
  1238 + temp += core_combosimnao(dados.classe)
  1239 + temp += "</select>"
  1240 + $i("cClasse").innerHTML = temp
  1241 + }
  1242 + if($i("cEscondido")){
  1243 + temp = "<select id='escondido' >"
  1244 + temp += core_combosimnao(dados.escondido)
  1245 + temp += "</select>"
  1246 + $i("cEscondido").innerHTML = temp
  1247 + }
  1248 + if($i("cIdentifica")){
  1249 + temp = "<select id='identifica' >"
  1250 + temp += core_combosimnao(dados.identifica)
  1251 + temp += "</select>"
  1252 + $i("cIdentifica").innerHTML = temp
  1253 + }
  1254 + if($i("cTransitioneffect")){
  1255 + temp = "<select id='transitioneffect' >"
  1256 + temp += core_combosimnao(dados.transitioneffect)
  1257 + temp += "</select>"
  1258 + $i("cTransitioneffect").innerHTML = temp
  1259 + }
  1260 + temp = "<select id='status' >"
  1261 + temp += core_comboObjeto(objstatus,"valor","texto",dados.status)
  1262 + temp += "</select>"
  1263 + $i("cStatus").innerHTML = temp
  1264 +
  1265 + temp = "<select id='sizeunits' >"
  1266 + temp += core_comboObjeto(objmapunits,"valor","texto",dados.sizeunits)
  1267 + temp += "</select>"
  1268 + $i("cSizeunits").innerHTML = temp
  1269 + temp = "<select id='toleranceunits' >"
  1270 + temp += core_comboObjeto(objmapunits,"valor","texto",dados.toleranceunits)
  1271 + temp += "</select>"
  1272 + $i("cToleranceunits").innerHTML = temp
  1273 +
  1274 + var temp = function()
  1275 + {salvarDadosEditor('comport',dados.codigoMap,dados.codigoLayer,false)}
  1276 + new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }});
  1277 +}
1158 1278  
1159 1279 function montaEditorTitulo(dados)
1160 1280 {
... ... @@ -1162,16 +1282,18 @@ function montaEditorTitulo(dados)
1162 1282 "linhas":[
1163 1283 {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 1284 titulo:"Código do layer",id:"name",value:dados.name,tipo:"text"},
  1285 + {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.",
  1286 + titulo:"Group",id:"group",value:dados.group,tipo:"text"},
1165 1287 {ajuda:"Nome que será utilizado na legenda do mapa e na guia 'Temas'",
1166 1288 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 1289 {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 1290 titulo:"Escala (ESCALA)",id:"escala",value:dados.escala,tipo:"text"},
1173 1291 {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"}
  1292 + titulo:"Extensao (EXTENSAO)",id:"extensao",value:dados.extensao,tipo:"text"},
  1293 + {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.",
  1294 + titulo:"Ícone (METADATA: ICONETEMA)",id:"iconetema",value:dados.iconetema,tipo:"text"},
  1295 + {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.",
  1296 + titulo:"Mensagem (MENSAGEM)",id:"mensagem",value:dados.mensagem,tipo:"text"}
1175 1297 ]
1176 1298 }
1177 1299 var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />"
... ... @@ -1223,6 +1345,8 @@ function montaEditorDados(dados)
1223 1345 titulo:"Data",id:"data",value:dados.data,tipo:"text"},
1224 1346 {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",
1225 1347 titulo:"Type",id:"",value:dados.type,tipo:"text",div:"<div id=cType ></div>"},
  1348 + {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",
  1349 + 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>"},
1226 1350 {ajuda:"Projeção",
1227 1351 titulo:"Projection",id:"projection",value:dados.projection,tipo:"text"},
1228 1352 {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",
... ... @@ -1254,7 +1378,12 @@ function montaEditorDados(dados)
1254 1378 ins += core_geraLinhas(param)
1255 1379 ins += "<br><br><br>"
1256 1380 $i("editor_bd").innerHTML = ins
1257   -
  1381 + if($i("cCache")){
  1382 + temp = "<select id='cache' >"
  1383 + temp += core_combosimnao(dados.cache)
  1384 + temp += "</select>"
  1385 + $i("cCache").innerHTML = temp
  1386 + }
1258 1387 if($i("cTipooriginal")){
1259 1388 temp = "<select id='tipooriginal' >"
1260 1389 temp += core_comboObjeto(objtipooriginal,"valor","texto",dados.tipooriginal)
... ... @@ -1303,6 +1432,7 @@ function montaEditorDados(dados)
1303 1432 };
1304 1433 $i("connectiontype").onchange.call();
1305 1434 }
  1435 +
1306 1436 function montaEditorMetadados(dados)
1307 1437 {
1308 1438 var paramRaster = {
... ... @@ -1310,15 +1440,11 @@ function montaEditorMetadados(dados)
1310 1440 {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",
1311 1441 titulo:"Arquivo com palete de cores (opcional e serve apenas para temas raster) (PALLETEFILE)",id:"palletefile",value:dados.palletefile,tipo:"text"},
1312 1442 {ajuda:"Quantas cores em cada nível da palete. Veja exemplo em i3geo/localhost/symbols/testepalete.txt",
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>"},
  1443 + titulo:"Passo (opcional e serve apenas para temas raster) (PALLETESTEP)",id:"palletestep",value:dados.palletestep,tipo:"text"}
1316 1444 ]
1317 1445 };
1318 1446 var paramVetor = {
1319 1447 "linhas":[
1320   - {ajuda:"Indica se a extensão geográfica do mapa deve ser alterada quando o tema for adicionado ao mapa",
1321   - titulo:"Aplica extensao (APLICAEXTENSAO)",id:"",value:dados.aplicaextensao,tipo:"text",div:"<div id=cAplicaextensao ></div>"},
1322 1448 {ajuda:"Indica se o usuário pode abrir o editor de SQL para poder alterar o elemento DATA do Mapfile.",
1323 1449 titulo:"Permite editar SQL (EDITORSQL)",id:"",value:dados.editorsql,tipo:"text",div:"<div id=cEditorsql ></div>"},
1324 1450 {ajuda:"Formato das datas existentes na tabela de atributos p.e. iso8601",
... ... @@ -1357,22 +1483,8 @@ function montaEditorMetadados(dados)
1357 1483 };
1358 1484 var param = {
1359 1485 "linhas":[
1360   - {ajuda:"Temporizador (em segundos) para atualização automática da camada. A camada será redesenhada continuamente a cada intervalo de tempo definido",
1361   - titulo:"Temporizador em segundos (METADATA: TEMPORIZADOR)",id:"temporizador",value:dados.temporizador,tipo:"text"},
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",
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>"},
1364 1486 {ajuda:"Nome da coluna da tabela de atributos do tema que será utilizado na ferramenta busca rápida. Entre apenas uma coluna",
1365 1487 titulo:"Item utilizado no busca rápida (itembuscarapida)",id:"itembuscarapida",value:dados.itembuscarapida,tipo:"text"},
1366   - {ajuda:"Indica se as classes serão mostradas ou não na legenda. Por padrão é SIM. ",
1367   - titulo:"Classe (CLASSE)",id:"",value:dados.classe,tipo:"text",div:"<div id=cClasse ></div>"},
1368   - {ajuda:"URL de uma imagem que será utilizada em substituição à geração normal da legenda ",
1369   - titulo:"URL da legenda (opcional) (LEGENDAIMG)",id:"legendaimg",value:dados.legendaimg,tipo:"text"},
1370   - {ajuda:"Indica se o tema é mostrado no mapa mas não nas listas da legenda e na guia 'temas'",
1371   - titulo:"Escondido (ESCONDIDO)",id:"",value:dados.escondido,tipo:"text",div:"<div id=cEscondido ></div>"},
1372   - {ajuda:"Indica se o tema irá ser mostrado na ferramenta de identificação",
1373   - titulo:"Identifica (IDENTIFICA)",id:"",value:dados.identifica,tipo:"text",div:"<div id=cIdentifica ></div>"},
1374   - {ajuda:"Aplica efeitos de transição nas operações de zoom e pan na interface Openlayers",
1375   - titulo:"Efeitos de transição zoom (TRANSITIONEFFECT)",id:"",value:dados.transitioneffect,tipo:"text",div:"<div id=cTransitioneffect ></div>"},
1376 1488 {ajuda:"Nomes das colunas da tabela de atributos do tema, que serão mostradas na ferramenta de identificação. Se for vazio, todas as colunas serão mostradas. A lista de itens deve ser separada por ',' e grafada em caixa alta no caso de shapefile.",
1377 1489 titulo:"Itens (ITENS)",id:"itens",value:dados.itens,tipo:"text"},
1378 1490 {ajuda:"Lista com os 'alias', ou apelidos, para os nomes das colunas listados no metadata 'itens'. Os alias devem ser separados por ',' e seguir a ordem definida em ITENS.",
... ... @@ -1450,124 +1562,18 @@ function montaEditorMetadados(dados)
1450 1562 ins += "<br><br><br>"
1451 1563 $i("editor_bd").innerHTML = ins
1452 1564  
1453   - if($i("cAplicaextensao")){
1454   - temp = "<select id='aplicaextensao' >"
1455   - temp += core_combosimnao(dados.aplicaextensao)
1456   - temp += "</select>"
1457   - $i("cAplicaextensao").innerHTML = temp
1458   - }
1459   - if($i("cCache")){
1460   - temp = "<select id='cache' >"
1461   - temp += core_combosimnao(dados.cache)
1462   - temp += "</select>"
1463   - $i("cCache").innerHTML = temp
1464   - }
1465 1565 if($i("cEditorsql")){
1466 1566 temp = "<select id='editorsql' >"
1467 1567 temp += core_combosimnao(dados.editorsql)
1468 1568 temp += "</select>"
1469 1569 $i("cEditorsql").innerHTML = temp
1470 1570 }
1471   - if($i("cPermitecomentario")){
1472   - temp = "<select id='permitecomentario' >"
1473   - temp += core_combosimnao(dados.permitecomentario)
1474   - temp += "</select>"
1475   - $i("cPermitecomentario").innerHTML = temp
1476   - }
1477   - if($i("cClasse")){
1478   - temp = "<p><select id='classe' >"
1479   - temp += core_combosimnao(dados.classe)
1480   - temp += "</select>"
1481   - $i("cClasse").innerHTML = temp
1482   - }
1483   - if($i("cEscondido")){
1484   - temp = "<select id='escondido' >"
1485   - temp += core_combosimnao(dados.escondido)
1486   - temp += "</select>"
1487   - $i("cEscondido").innerHTML = temp
1488   - }
1489   - if($i("cIdentifica")){
1490   - temp = "<select id='identifica' >"
1491   - temp += core_combosimnao(dados.identifica)
1492   - temp += "</select>"
1493   - $i("cIdentifica").innerHTML = temp
1494   - }
1495   - if($i("cTransitioneffect")){
1496   - temp = "<select id='transitioneffect' >"
1497   - temp += core_combosimnao(dados.transitioneffect)
1498   - temp += "</select>"
1499   - $i("cTransitioneffect").innerHTML = temp
1500   - }
1501 1571 var temp = function()
1502 1572 {salvarDadosEditor('metadados',dados.codigoMap,dados.codigoLayer)}
1503 1573 new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }});
1504 1574 }
1505   -function montaEditorGeral(dados)
1506   -{
1507   - var param = {
1508   - "linhas":[
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.",
1510   - titulo:"Group",id:"group",value:dados.group,tipo:"text"},
1511   - {ajuda:"Sets the current status of the layer. Often modified by MapServer itself. Default turns the layer on permanently",
1512   - titulo:"Status",id:"",value:dados.status,tipo:"text",div:"<div id=cStatus ></div>"},
1513   - {ajuda:"Sets the color index to treat as transparent for raster layers.",
1514   - titulo:"Offsite (R,G,B) (utilize -1,-1,-1 para anular o valor)",id:"offsite",value:dados.offsite,tipo:"text"},
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.",
1516   - titulo:"Opacity",id:"opacity",value:dados.opacity,tipo:"text"},
1517   - {ajuda:"Maximum 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.",
1518   - titulo:"Maxscale (utilize -1 para anular o valor)",id:"maxscale",value:dados.maxscale,tipo:"text"},
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.",
1520   - titulo:"Minscale (utilize -1 para anular o valor)",id:"minscale",value:dados.minscale,tipo:"text"},
1521   - {ajuda:"Item name in attribute table to use for class annotation (i.e. labeling).",
1522   - titulo:"Labelitem",id:"labelitem",value:dados.labelitem,tipo:"text"},
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.",
1524   - titulo:"Labelmaxscale (utilize -1 para anular o valor)",id:"labelmaxscale",value:dados.labelmaxscale,tipo:"text"},
1525   - {ajuda:"Minimum 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.",
1526   - titulo:"Labelminscale (utilize -1 para anular o valor)",id:"labelminscale",value:dados.labelminscale,tipo:"text"},
1527   - {ajuda:"The scale at which symbols and/or text appear full size. This allows for dynamic scaling of objects based on the scale of the map. If not set then this layer will always appear at the same size. Scaling only takes place within the limits of MINSIZE and MAXSIZE as described above. 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.",
1528   - titulo:"Symbolscale (utilize -1 para anular o valor)",id:"symbolscale",value:dados.symbolscale,tipo:"text"},
1529   - {ajuda:"Sensitivity for point based queries (i.e. via mouse and/or map coordinates). Given in TOLERANCEUNITS. If the layer is a POINT or a LINE, the default is 3. For all other layer types, the default is 0. To restrict polygon searches so that the point must occur in the polygon set the tolerance to zero.",
1530   - titulo:"Tolerance",id:"tolerance",value:dados.tolerance,tipo:"text"},
1531   - {ajuda:" ",
1532   - titulo:"Tolerance units",id:"",value:dados.toleranceunits,tipo:"text",div:"<div id=cToleranceunits ></div>"},
1533   - {ajuda:"Sets the unit of CLASS object SIZE values (default is pixels). Useful for simulating buffering",
1534   - titulo:"Sizeunits",id:"",value:dados.sizeunits,tipo:"text",div:"<div id=cSizeunits ></div>"}
1535   - ]
1536   - }
1537   - var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditor />"
1538   - ins += "<input type=button title='Testar' value='Testar' id=testarEditor />"
1539   - if(dados.colunas != "")
1540   - {
1541   - ins += "<p>O layer possuí as seguintes colunas na tabela de atributos: ";
1542   - ins += dados.colunas+"</p>"
1543   - }
1544   -
1545   - ins += core_geraLinhas(param)
1546   - ins += "<br><br><br>"
1547   - $i("editor_bd").innerHTML = ins
1548   -
1549   - temp = "<select id='status' >"
1550   - temp += core_comboObjeto(objstatus,"valor","texto",dados.status)
1551   - temp += "</select>"
1552   - $i("cStatus").innerHTML = temp
1553   -
1554   - temp = "<select id='sizeunits' >"
1555   - temp += core_comboObjeto(objmapunits,"valor","texto",dados.sizeunits)
1556   - temp += "</select>"
1557   - $i("cSizeunits").innerHTML = temp
1558   - temp = "<select id='toleranceunits' >"
1559   - temp += core_comboObjeto(objmapunits,"valor","texto",dados.toleranceunits)
1560   - temp += "</select>"
1561   - $i("cToleranceunits").innerHTML = temp
1562 1575  
1563   - var temp = function()
1564   - {salvarDadosEditor('geral',dados.codigoMap,dados.codigoLayer,false)}
1565   - new YAHOO.widget.Button("salvarEditor",{ onclick: { fn: temp }});
1566   -
1567   - var temp = function()
1568   - {salvarDadosEditor('geral',dados.codigoMap,dados.codigoLayer,"","",true)}
1569   - new YAHOO.widget.Button("testarEditor",{ onclick: { fn: temp }});
1570   -}
  1576 +
1571 1577 function montaEditorClasseGeral(dados)
1572 1578 {
1573 1579 var re = /C_/g;
... ... @@ -1801,6 +1807,12 @@ Altera um mapfile conforme o editor específico de uma característica
1801 1807 function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,testar)
1802 1808 {
1803 1809 if(arguments.length < 6){var testar = false;}
  1810 + if(tipo == "comport")
  1811 + {
  1812 + var campos = new Array("aplicaextensao","permitecomentario","temporizador","classe","legendaimg","escondido","identifica","transitioneffect","status","offsite","opacity","maxscale","minscale","labelitem","labelmaxscale","labelminscale","symbolscale","tolerance","toleranceunits","sizeunits");
  1813 + var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
  1814 + var prog = "../php/editormapfile.php?funcao=alterarComport";
  1815 + }
1804 1816 if(tipo == "dispo")
1805 1817 {
1806 1818 var campos = new Array("download","arquivodownload","arquivokmz");
... ... @@ -1830,28 +1842,22 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,
1830 1842 {alert("Valor de escala incorreto");return;}
1831 1843 }
1832 1844  
1833   - var campos = new Array("name","tema","iconetema","mensagem","escala","extensao");
  1845 + var campos = new Array("name","tema","iconetema","mensagem","escala","extensao","group");
1834 1846 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer;
1835 1847 var prog = "../php/editormapfile.php?funcao=alterarTitulo"
1836 1848 }
1837 1849 if(tipo == "conexao")
1838 1850 {
1839   - var campos = new Array("projection","type","connection","data","connectiontype","tileitem","tileindex","filteritem","filter","tipooriginal")
  1851 + var campos = new Array("cache","projection","type","connection","data","connectiontype","tileitem","tileindex","filteritem","filter","tipooriginal")
1840 1852 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer
1841 1853 var prog = "../php/editormapfile.php?funcao=alterarConexao"
1842 1854 }
1843 1855 if(tipo == "metadados")
1844 1856 {
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")
  1857 + 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","itembuscarapida","ltempoformatodata","ltempoiteminicio","ltempoitemfim","ltempoitemtitulo","ltempoitemdescricao","ltempoitemtip","ltempoitemimagem","ltempoitemicone","ltempoitemlink","editorsql","description_template","palletefile","palletestep","classestamanho","classessimbolo","classescor","classesnome","classesitem","identifica","transitioneffect","extensao","escondido","classe","tip","itenslink","itens","itensdesc")
1846 1858 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer
1847 1859 var prog = "../php/editormapfile.php?funcao=alterarMetadados"
1848 1860 }
1849   - if(tipo == "geral")
1850   - {
1851   - var campos = new Array("sizeunits","status","toleranceunits","tolerance","symbolscale","opacity","offsite","minscale","maxscale","labelminscale","labelmaxscale","labelitem","group")
1852   - var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer
1853   - var prog = "../php/editormapfile.php?funcao=alterarGeral"
1854   - }
1855 1861 if(tipo == "classeGeral")
1856 1862 {
1857 1863 var campos = new Array("status","minscale","maxscale","name","title","keyimage")
... ...
admin/php/editormapfile.php
... ... @@ -670,6 +670,18 @@ switch (strtoupper($funcao))
670 670 retornaJSON(pegaDispo());
671 671 exit;
672 672 break;
  673 + case "PEGACOMPORT":
  674 + retornaJSON(pegaComport());
  675 + exit;
  676 + break;
  677 + case "ALTERARCOMPORT":
  678 + if(verificaEditores($editores) == "nao")
  679 + {echo "Vc nao e um editor cadastrado. Apenas os editores definidos em i3geo/ms_configura.php podem acessar o sistema de administracao.";exit;}
  680 + alterarComport();
  681 + retornaJSON(pegaComport());
  682 + exit;
  683 + break;
  684 +
673 685 /*
674 686 Valor: ALTERARMETADADOS
675 687  
... ... @@ -1310,6 +1322,79 @@ function excluirEstilo()
1310 1322 removeCabecalho($mapfile);
1311 1323 return "ok";
1312 1324 }
  1325 +function pegaComport()
  1326 +{
  1327 + global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa;
  1328 + $dados = array();
  1329 + $mapfile = $locaplic."/temas/".$codigoMap.".map";
  1330 + $mapa = ms_newMapObj($mapfile);
  1331 + $layer = $mapa->getlayerbyname($codigoLayer);
  1332 + $v = versao();
  1333 + $dados["aplicaextensao"] = $layer->getmetadata("aplicaextensao");
  1334 + $dados["permitecomentario"] = $layer->getmetadata("permitecomentario");
  1335 + $dados["temporizador"] = $layer->getmetadata("temporizador");
  1336 + $dados["classe"] = $layer->getmetadata("classe");
  1337 + $dados["legendaimg"] = $layer->getmetadata("legendaimg");
  1338 + $dados["escondido"] = $layer->getmetadata("escondido");
  1339 + $dados["identifica"] = $layer->getmetadata("identifica");
  1340 + $dados["transitioneffect"] = $layer->getmetadata("transitioneffect");
  1341 + $dados["status"] = $layer->status;
  1342 + $dados["offsite"] = $layer->offsite->red.",".$layer->offsite->green.",".$layer->offsite->blue;
  1343 + $v["principal"] == "4" ? $dados["opacity"] = $layer->transparency : $dados["opacity"] = $layer->opacity;
  1344 + $dados["maxscale"] = $layer->maxscaledenom;
  1345 + $dados["minscale"] = $layer->minscaledenom;
  1346 + $dados["labelitem"] = $layer->labelitem;
  1347 + $dados["labelmaxscale"] = $layer->labelmaxscaledenom;
  1348 + $dados["labelminscale"] = $layer->labelminscaledenom;
  1349 + $dados["symbolscale"] = $layer->symbolscaledenom;
  1350 + $dados["tolerance"] = $layer->tolerance;
  1351 + $dados["toleranceunits"] = $layer->toleranceunits;
  1352 + $dados["sizeunits"] = $layer->sizeunits;
  1353 +
  1354 + $dados["codigoMap"] = $codigoMap;
  1355 + $dados["codigoLayer"] = $codigoLayer;
  1356 + return $dados;
  1357 +}
  1358 +function alterarComport()
  1359 +{
  1360 + global $dir_tmp,$codigoMap,$codigoLayer,$locaplic,$aplicaextensao,$permitecomentario,$temporizador,$classe,$legendaimg,$escondido,$identifica,$transitioneffect,$status,$offsite,$opacity,$maxscale,$minscale,$labelitem,$labelmaxscale,$labelminscale,$symbolscale,$tolerance,$toleranceunits,$sizeunits;
  1361 + $v = versao();
  1362 + $mapfile = $locaplic."/temas/".$codigoMap.".map";
  1363 + $mapa = ms_newMapObj($mapfile);
  1364 + $layer = $mapa->getlayerbyname($codigoLayer);
  1365 + $layer->setmetadata("aplicaextensao",$aplicaextensao);
  1366 + $layer->setmetadata("permitecomentario",$permitecomentario);
  1367 + $layer->setmetadata("temporizador",$temporizador);
  1368 + $layer->setmetadata("classe",$classe);
  1369 + $layer->setmetadata("legendaimg",$legendaimg);
  1370 + $layer->setmetadata("escondido",$escondido);
  1371 + $layer->setmetadata("identifica",$identifica);
  1372 + $layer->setmetadata("transitioneffect",$transitioneffect);
  1373 + $layer->set("status",$status);
  1374 + if($offsite == -1 || $offsite == "null")
  1375 + {$offsite = "-1,-1,-1";}
  1376 + $cor = $layer->offsite;
  1377 + $c = explode(",",$offsite);
  1378 + if(count($c) < 3)
  1379 + $c = explode(" ",$offsite);
  1380 + $cor->setrgb($c[0],$c[1],$c[2]);
  1381 + $layer->offsite->red.",".$layer->offsite->green.",".$layer->offsite->blue;
  1382 + $v["principal"] == "4" ? $layer->set("transparency",$opacity) : $layer->set("opacity",$opacity);
  1383 + $layer->set("maxscaledenom",$maxscale);
  1384 + $layer->set("minscaledenom",$minscale);
  1385 + $layer->set("labelitem",$labelitem);
  1386 + $layer->set("labelmaxscaledenom",$labelmaxscale);
  1387 + $layer->set("labelminscaledenom",$labelminscale);
  1388 + $layer->set("symbolscaledenom",$symbolscale);
  1389 + $layer->set("tolerance",$tolerance);
  1390 + $layer->set("toleranceunits",$toleranceunits);
  1391 + $layer->set("sizeunits",$sizeunits);
  1392 +
  1393 + $mapa->save($mapfile);
  1394 + removeCabecalho($mapfile);
  1395 + return "ok";
  1396 +}
  1397 +
1313 1398 function pegaTitulo()
1314 1399 {
1315 1400 global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa;
... ... @@ -1323,6 +1408,7 @@ function pegaTitulo()
1323 1408 $dados["mensagem"] = mb_convert_encoding($layer->getmetadata("mensagem"),"UTF-8","ISO-8859-1");//$layer->getmetadata("mensagem");
1324 1409 $dados["escala"] = $layer->getmetadata("escala");
1325 1410 $dados["extensao"] = $layer->getmetadata("extensao");
  1411 + $dados["group"] = $layer->group;
1326 1412 $dados["codigoMap"] = $codigoMap;
1327 1413 $dados["codigoLayer"] = $codigoLayer;
1328 1414 return $dados;
... ... @@ -1339,11 +1425,11 @@ function alterarTitulo()
1339 1425 $layer->setmetadata("mensagem",$mensagem);
1340 1426 $layer->setmetadata("escala",$escala);
1341 1427 $layer->setmetadata("extensao",$extensao);
  1428 + $layer->set("group",$group);
1342 1429 $mapa->save($mapfile);
1343 1430 removeCabecalho($mapfile);
1344 1431 return "ok";
1345 1432 }
1346   -
1347 1433 function pegaDispo()
1348 1434 {
1349 1435 global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa;
... ... @@ -1371,7 +1457,6 @@ function alterarDispo()
1371 1457 removeCabecalho($mapfile);
1372 1458 return "ok";
1373 1459 }
1374   -
1375 1460 function pegaConexao()
1376 1461 {
1377 1462 global $codigoMap,$codigoLayer,$locaplic,$postgis_mapa;
... ... @@ -1384,6 +1469,7 @@ function pegaConexao()
1384 1469 $dados["data"] = $layer->data;
1385 1470 $dados["tileindex"] = $layer->tileindex;
1386 1471 $dados["tileitem"] = $layer->tileitem;
  1472 + $dados["cache"] = $layer->getmetadata("cache");
1387 1473 if($dados["tileindex"] == ""){$dados["tileitem"] = "";}
1388 1474 if(is_array($postgis_mapa))
1389 1475 $dados["postgis_mapa"] = array_keys($postgis_mapa);
... ... @@ -1396,6 +1482,10 @@ function pegaConexao()
1396 1482 if($dados["filter"]== ""){$dados["filter"] = "";}
1397 1483 $dados["filteritem"] = $layer->filteritem;
1398 1484 $dados["projection"] = $layer->getProjection();
  1485 + if($dados["projection"] == "null")
  1486 + {$dados["projection"] = "";}
  1487 + $dados["projection"] = str_replace("+i","i",$dados["projection"]);
  1488 +
1399 1489 $dados["colunas"] = implode(" ,",pegaItens($layer));
1400 1490 if($layer->connectiontype == 7 || $layer->connectiontype == 9){
1401 1491 $dados["tipooriginal"] = $layer->getmetadata("tipooriginal");
... ... @@ -1404,7 +1494,7 @@ function pegaConexao()
1404 1494 }
1405 1495 function alterarConexao()
1406 1496 {
1407   - global $tipooriginal,$filteritem,$filter,$projection,$type,$dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$connection,$connectiontype,$data,$tileitem,$tileindex;
  1497 + global $cache,$tipooriginal,$filteritem,$filter,$projection,$type,$dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$connection,$connectiontype,$data,$tileitem,$tileindex;
1408 1498 $mapfile = $locaplic."/temas/".$codigoMap.".map";
1409 1499 $mapa = ms_newMapObj($mapfile);
1410 1500 $layer = $mapa->getlayerbyname($codigoLayer);
... ... @@ -1426,6 +1516,7 @@ function alterarConexao()
1426 1516 if($layer->connectiontype == 7 || $layer->connectiontype== 9){
1427 1517 $layer->setmetadata("tipooriginal",$tipooriginal);
1428 1518 }
  1519 + $layer->setmetadata("cache",$cache);
1429 1520 if($testar == "true")
1430 1521 {
1431 1522 $nome = $dir_tmp."/".$codigoMap.".map";
... ... @@ -1454,29 +1545,15 @@ function pegaMetadados()
1454 1545 $dados["itensdesc"] = mb_convert_encoding($layer->getmetadata("itensdesc"),"UTF-8","ISO-8859-1"); //$layer->getmetadata("itensdesc");
1455 1546 $dados["itenslink"] = $layer->getmetadata("itenslink");
1456 1547 $dados["tip"] = $layer->getmetadata("tip");
1457   -
1458   - $dados["classe"] = $layer->getmetadata("classe");
1459   -
1460   -
1461   - $dados["escondido"] = $layer->getmetadata("escondido");
1462   -
1463   - $dados["identifica"] = $layer->getmetadata("identifica");
1464   - $dados["transitioneffect"] = $layer->getmetadata("transitioneffect");
1465   -
1466 1548 $dados["classesitem"] = $layer->getmetadata("classesitem");
1467 1549 $dados["classesnome"] = $layer->getmetadata("classesnome");
1468 1550 $dados["classescor"] = $layer->getmetadata("classescor");
1469 1551 $dados["classessimbolo"] = $layer->getmetadata("classessimbolo");
1470 1552 $dados["classestamanho"] = $layer->getmetadata("classestamanho");
1471   - $dados["aplicaextensao"] = $layer->getmetadata("aplicaextensao");
1472   -
1473   - $dados["temporizador"] = $layer->getmetadata("temporizador");
1474   -
1475 1553 $dados["palletefile"] = $layer->getmetadata("palletefile");
1476 1554 $dados["palletestep"] = $layer->getmetadata("palletestep");
1477 1555 $dados["description_template"] = $layer->getmetadata("description_template");
1478 1556 $dados["editorsql"] = $layer->getmetadata("editorsql");
1479   - $dados["cache"] = $layer->getmetadata("cache");
1480 1557 $dados["codigoMap"] = $codigoMap;
1481 1558 $dados["codigoLayer"] = $codigoLayer;
1482 1559 $dados["colunas"] = implode(" ,",pegaItens($layer));
... ... @@ -1490,9 +1567,7 @@ function pegaMetadados()
1490 1567 $dados["ltempoitemicone"] = $layer->getmetadata("ltempoitemicone");
1491 1568 $dados["ltempoitemlink"] = $layer->getmetadata("ltempoitemlink");
1492 1569  
1493   - $dados["permitecomentario"] = $layer->getmetadata("permitecomentario");
1494 1570 $dados["itembuscarapida"] = $layer->getmetadata("itembuscarapida");
1495   - $dados["legendaimg"] = $layer->getmetadata("legendaimg");
1496 1571 if($layer->connectiontype == 7 || $layer->connectiontype == 9){
1497 1572 $dados["wms_srs"] = $layer->getmetadata("wms_srs");
1498 1573 $dados["wms_name"] = $layer->getmetadata("wms_name");
... ... @@ -1521,7 +1596,7 @@ function pegaMetadados()
1521 1596 }
1522 1597 function alterarMetadados()
1523 1598 {
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;
  1599 + global $tipooriginal,$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,$itembuscarapida,$iconetema,$ltempoformatodata,$ltempoiteminicio,$ltempoitemfim,$ltempoitemtitulo,$ltempoitemdescricao,$ltempoitemtip,$ltempoitemimagem,$ltempoitemicone,$ltempoitemlink,$description_template,$palletestep,$palletefile,$codigoMap,$codigoLayer,$locaplic,$classestamanho,$classessimbolo,$classescor,$classesnome,$classesitem,$mensagem,$extensao,$tip,$itenslink,$itens,$itensdesc,$editorsql;
1525 1600 $dados = array();
1526 1601 $mapfile = $locaplic."/temas/".$codigoMap.".map";
1527 1602 $mapa = ms_newMapObj($mapfile);
... ... @@ -1530,30 +1605,15 @@ function alterarMetadados()
1530 1605 $layer->setmetadata("itensdesc",$itensdesc);
1531 1606 $layer->setmetadata("itenslink",$itenslink);
1532 1607 $layer->setmetadata("tip",$tip);
1533   -
1534   - $layer->setmetadata("classe",$classe);
1535   -
1536   -
1537   - $layer->setmetadata("escondido",$escondido);
1538   -
1539   - $layer->setmetadata("identifica",$identifica);
1540   - $layer->setmetadata("transitioneffect",$transitioneffect);
1541   -
1542 1608 $layer->setmetadata("classesitem",$classesitem);
1543 1609 $layer->setmetadata("classesnome",$classesnome);
1544 1610 $layer->setmetadata("classescor",$classescor);
1545 1611 $layer->setmetadata("classessimbolo",$classessimbolo);
1546 1612 $layer->setmetadata("classestamanho",$classestamanho);
1547   - $layer->setmetadata("aplicaextensao",$aplicaextensao);
1548   -
1549   - $layer->setmetadata("temporizador",$temporizador);
1550   -
1551 1613 $layer->setmetadata("palletefile",$palletefile);
1552 1614 $layer->setmetadata("palletestep",$palletestep);
1553 1615 $layer->setmetadata("description_template",$description_template);
1554 1616 $layer->setmetadata("editorsql",$editorsql);
1555   - $layer->setmetadata("cache",$cache);
1556   -
1557 1617 $layer->setmetadata("ltempoformatodata",$ltempoformatodata);
1558 1618 $layer->setmetadata("ltempoiteminicio",$ltempoiteminicio);
1559 1619 $layer->setmetadata("ltempoitemfim",$ltempoitemfim);
... ... @@ -1564,9 +1624,7 @@ function alterarMetadados()
1564 1624 $layer->setmetadata("ltempoitemicone",$ltempoitemicone);
1565 1625 $layer->setmetadata("ltempoitemlink",$ltempoitemlink);
1566 1626  
1567   - $layer->setmetadata("permitecomentario",$permitecomentario);
1568 1627 $layer->setmetadata("itembuscarapida",$itembuscarapida);
1569   - $layer->setmetadata("legendaimg",$legendaimg);
1570 1628 if($layer->connectiontype == 7 || $layer->connectiontype== 9){
1571 1629 $layer->setmetadata("wms_srs",$wms_srs);
1572 1630 $layer->setmetadata("wms_name",$wms_name);
... ... @@ -1605,91 +1663,6 @@ function alterarMetadados()
1605 1663 removeCabecalho($mapfile);
1606 1664 return "ok";
1607 1665 }
1608   -function pegaGeral()
1609   -{
1610   - global $codigoMap,$codigoLayer,$locaplic;
1611   - $v = versao();
1612   - $dados = array();
1613   - $mapfile = $locaplic."/temas/".$codigoMap.".map";
1614   - $mapa = ms_newMapObj($mapfile);
1615   - $layer = $mapa->getlayerbyname($codigoLayer);
1616   - $dados["group"] = $layer->group;
1617   - //$dados["labelangleitem"] = $layer->labelangleitem;
1618   - $dados["labelitem"] = $layer->labelitem;
1619   - $dados["labelmaxscale"] = $layer->labelmaxscaledenom;
1620   - $dados["labelmaxscale"] = $layer->labelmaxscaledenom;
1621   - $dados["labelminscale"] = $layer->labelminscaledenom;
1622   - //$dados["labelsizeitem"] = $layer->labelsizeitem;
1623   - $dados["maxscale"] = $layer->maxscaledenom;
1624   - $dados["minscale"] = $layer->minscaledenom;
1625   - $dados["offsite"] = $layer->offsite->red.",".$layer->offsite->green.",".$layer->offsite->blue;
1626   - $v["principal"] == "4" ? $dados["opacity"] = $layer->transparency : $dados["opacity"] = $layer->opacity;
1627   - $dados["symbolscale"] = $layer->symbolscaledenom;
1628   - $dados["tolerance"] = $layer->tolerance;
1629   - $dados["toleranceunits"] = $layer->toleranceunits;
1630   - $dados["status"] = $layer->status;
1631   - $dados["sizeunits"] = $layer->sizeunits;
1632   -
1633   - if($dados["projection"] == "null")
1634   - {$dados["projection"] = "";}
1635   - $dados["projection"] = str_replace("+i","i",$dados["projection"]);
1636   - $dados["codigoMap"] = $codigoMap;
1637   - $dados["codigoLayer"] = $codigoLayer;
1638   - $dados["colunas"] = implode(" ,",pegaItens($layer));
1639   - return $dados;
1640   -}
1641   -function alterarGeral()
1642   -{
1643   - global $dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$sizeunits,$status,$toleranceunits,$tolerance,$symbolscale,$opacity,$offsite,$minscale,$maxscale,$labelsizeitem,$labelminscale,$labelmaxscale,$labelitem,$group;
1644   - error_reporting(0);
1645   - $v = versao();
1646   - $dados = array();
1647   -
1648   - $mapfile = $locaplic."/temas/".$codigoMap.".map";
1649   - $mapa = ms_newMapObj($mapfile);
1650   - $layer = $mapa->getlayerbyname($codigoLayer);
1651   -
1652   - if($offsite == -1 || $offsite == "null")
1653   - {$offsite = "-1,-1,-1";}
1654   -
1655   -
1656   -
1657   - $layer->set("group",$group);
1658   - //$layer->set("labelangleitem",$labelangleitem);
1659   - $layer->set("labelitem",$labelitem);
1660   - $layer->set("labelmaxscaledenom",$labelmaxscale);
1661   - $layer->set("labelminscaledenom",$labelminscale);
1662   - //$layer->set("labelsizeitem",$labelsizeitem);
1663   - $layer->set("maxscaledenom",$maxscale);
1664   - $layer->set("minscaledenom",$minscale);
1665   - $cor = $layer->offsite;
1666   - $c = explode(",",$offsite);
1667   - if(count($c) < 3)
1668   - $c = explode(" ",$offsite);
1669   - $cor->setrgb($c[0],$c[1],$c[2]);
1670   - $layer->offsite->red.",".$layer->offsite->green.",".$layer->offsite->blue;
1671   - $v["principal"] == "4" ? $layer->set("transparency",$opacity) : $layer->set("opacity",$opacity);
1672   -
1673   - $layer->set("symbolscaledenom",$symbolscale);
1674   - $layer->set("tolerance",$tolerance);
1675   - $layer->set("toleranceunits",$toleranceunits);
1676   - $layer->set("status",$status);
1677   - $layer->set("sizeunits",$sizeunits);
1678   -
1679   - if($testar == "true")
1680   - {
1681   - $nome = $dir_tmp."/".$codigoMap.".map";
1682   - $mapa->save($nome);
1683   - removeCabecalho($nome,false);
1684   - return $nome;
1685   - }
1686   - else
1687   - {
1688   - $mapa->save($mapfile);
1689   - removeCabecalho($mapfile);
1690   - return "ok";
1691   - }
1692   -}
1693 1666 function pegaClasseGeral()
1694 1667 {
1695 1668 global $codigoMap,$codigoLayer,$indiceClasse,$locaplic;
... ...