Commit 373d8e2c43e8c0b410211b9b3a7d8dd513c14a7c

Authored by Edmar Moretti
1 parent 299fe114

--no commit message

classesjs/dicionario.js
@@ -2528,7 +2528,7 @@ g_traducao = { @@ -2528,7 +2528,7 @@ g_traducao = {
2528 ], 2528 ],
2529 "dpol" : [ 2529 "dpol" : [
2530 { 2530 {
2531 - pt : "digitalizar polígono", 2531 + pt : "digitalizar poligono",
2532 en : "", 2532 en : "",
2533 es : "" 2533 es : ""
2534 } 2534 }
ferramentas/editorol/editorol.js
@@ -913,7 +913,7 @@ i3GEO.editorOL = @@ -913,7 +913,7 @@ i3GEO.editorOL =
913 temp.className = "editorOLzoomboxItemInactive olButton"; 913 temp.className = "editorOLzoomboxItemInactive olButton";
914 temp.title = "zoombox"; 914 temp.title = "zoombox";
915 temp.onclick = function(){ 915 temp.onclick = function(){
916 - i3GEO.barraDeBotoes.defBotao("zoomli").funcaoonclick; 916 + i3GEO.barraDeBotoes.defBotao("zoomli").funcaoonclick();
917 }; 917 };
918 return temp; 918 return temp;
919 }, 919 },
@@ -962,20 +962,18 @@ i3GEO.editorOL = @@ -962,20 +962,18 @@ i3GEO.editorOL =
962 botaoDistancia : function(){ 962 botaoDistancia : function(){
963 var temp = document.createElement("div"); 963 var temp = document.createElement("div");
964 temp.className = "editorOLdistanciaItemInactive olButton"; 964 temp.className = "editorOLdistanciaItemInactive olButton";
965 - temp.title = $trad("d21t");  
966 temp.onclick = function(){ 965 temp.onclick = function(){
967 i3GEO.editorOL.marcaBotao("editorOLdistancia"); 966 i3GEO.editorOL.marcaBotao("editorOLdistancia");
968 - i3GEO.barraDeBotoes.defBotao("mede").funcaoonclick; 967 + i3GEO.barraDeBotoes.defBotao("mede").funcaoonclick();
969 }; 968 };
970 return temp; 969 return temp;
971 }, 970 },
972 botaoArea: function(){ 971 botaoArea: function(){
973 var temp = document.createElement("div"); 972 var temp = document.createElement("div");
974 temp.className = "editorOLareaItemInactive olButton"; 973 temp.className = "editorOLareaItemInactive olButton";
975 - temp.title = $trad("d21at");  
976 temp.onclick = function(){ 974 temp.onclick = function(){
977 i3GEO.editorOL.marcaBotao("editorOLarea"); 975 i3GEO.editorOL.marcaBotao("editorOLarea");
978 - i3GEO.barraDeBotoes.defBotao("area").funcaoonclick; 976 + i3GEO.barraDeBotoes.defBotao("area").funcaoonclick();
979 }; 977 };
980 return temp; 978 return temp;
981 }, 979 },
@@ -1285,15 +1283,213 @@ i3GEO.editorOL = @@ -1285,15 +1283,213 @@ i3GEO.editorOL =
1285 }; 1283 };
1286 return temp; 1284 return temp;
1287 }, 1285 },
1288 - botao: function(){ 1286 + botaoCorta: function(){
  1287 + i3GEO.eventos.cliquePerm.desativa();
  1288 + var temp = document.createElement("div");
  1289 + temp.className = "editorOLcortaItemInactive olButton";
  1290 + temp.title = $trad("cortaf");
  1291 + temp.onclick = function(){
  1292 + var nsel = i3GEO.editorOL.idsSelecionados.length;
  1293 + if (nsel != 1) {
  1294 + alert("Selecione primeiro um elemento para ser cortado");
  1295 + } else {
  1296 + i3GEO.janela.tempoMsg("Desenhe um polígono");
  1297 + i3GEO.editorOL.marcaBotao("editorOLcorta");
  1298 + var draw = new ol.interaction.Draw({
  1299 + type : "Polygon"
  1300 + });
  1301 + //adiciona a interacao para poder ser removida
  1302 + i3GEO.editorOL.interacoes.push(draw);
  1303 + i3GEO.Interface.openlayers.interacoes[0].setActive(false);
  1304 + draw.on("drawend", function(evt) {
  1305 + var temp, f, c, format, fwkt, cwkt;
  1306 + f = evt.feature;
  1307 + c = i3GEO.desenho.layergrafico.getSource().getFeatureById(i3GEO.editorOL.idsSelecionados[nsel - 1]);
  1308 + i3GEO.editorOL.featuresBackup.push(c.clone());
  1309 + i3GEO.editorOL.marcaBotao();
  1310 + //corta
  1311 + format = new ol.format.WKT();
  1312 + if(f && c){
  1313 + fwkt = format.writeFeatures([f]);
  1314 + cwkt = format.writeFeatures([c]);
  1315 + if(fwkt && cwkt){
  1316 + temp = function(retorno) {
  1317 + i3GEO.janela.fechaAguarde("i3GEO.cortador");
  1318 + if (retorno != "" && retorno.data && retorno.data != "") {
  1319 + i3GEO.janela.fechaAguarde("i3GEO.cortador");
  1320 + c.setGeometry(format.readGeometry(retorno.data));
  1321 + if (document.getElementById("panellistagEditor")) {
  1322 + i3GEO.editorOL.listaGeometrias();
  1323 + }
  1324 + }
  1325 + };
  1326 + i3GEO.janela.abreAguarde("i3GEO.cortador", "Cortando");
  1327 + i3GEO.php.funcoesGeometriasWkt(temp, cwkt + "|" + fwkt, "difference");
  1328 + }
  1329 + }
  1330 + });
  1331 + i3geoOL.addInteraction(draw);
  1332 + }
  1333 + };
  1334 + return temp;
  1335 + },
  1336 + botaoListaGeometrias: function(){
  1337 + var temp = document.createElement("div");
  1338 + temp.className = "editorOLlistagItemInactive olButton";
  1339 + temp.title = $trad("listag");
  1340 + temp.onclick = function(){
  1341 + i3GEO.editorOL.listaGeometrias();
  1342 + };
  1343 + return temp;
  1344 + },
  1345 + botaoAjuda: function(){
  1346 + var temp = document.createElement("div");
  1347 + temp.className = "editorOLajudaItemInactive olButton";
  1348 + temp.title = $trad("s1");
  1349 + temp.onclick = function(){
  1350 + if(i3GEO.configura && i3GEO.configura.locaplic){
  1351 + i3GEO.janela.cria("400px", "200px", i3GEO.configura.locaplic
  1352 + + "/mashups/openlayers_ajuda.php?completo=none", "", "", $trad("s1"), "editorOlAjuda");
  1353 + }
  1354 + else{
  1355 + window.open("openlayers_ajuda.php");
  1356 + }
  1357 + };
  1358 + return temp;
  1359 + },
  1360 + botaoFecha: function(){
  1361 + var temp = document.createElement("div");
  1362 + temp.className = "editorOLfechaItemInactive olButton";
  1363 + temp.title = $trad("x74");
  1364 + temp.onclick = function(){
  1365 + i3GEO.editorOL.unselTodos();
  1366 + i3GEO.editorOL.featuresBackup = [];
  1367 + i3GEO.editorOL.marcaBotao();
  1368 + i3GEO.eventos.cliquePerm.ativa();
  1369 + $i("i3GEObarraEdicao").style.display = "none";
  1370 + };
1289 return temp; 1371 return temp;
1290 }, 1372 },
  1373 + botaoTools: function(){
  1374 + var temp = document.createElement("div");
  1375 + temp.className = "editorOLtoolsItemInactive olButton";
  1376 + temp.title = $trad("u15a");
  1377 + temp.onclick = function(){
  1378 + // fora do i3geo, usa o jsts
  1379 + if (i3GEO.php) {
  1380 + i3GEO.editorOL.ferramentas();
  1381 + } else {
  1382 + i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");
  1383 + }
  1384 + };
  1385 + return temp;
  1386 + },
  1387 + botaoPropriedades: function(){
  1388 + var temp = document.createElement("div");
  1389 + temp.className = "editorOLpropriedadesItemInactive olButton";
  1390 + temp.title = $trad("p13");
  1391 + temp.onclick = function(){
  1392 + i3GEO.editorOL.propriedades();
  1393 + };
  1394 + return temp;
  1395 + },
  1396 + botaoIdentifica: function(){
  1397 + i3GEO.eventos.cliquePerm.desativa();
  1398 + var temp = document.createElement("div");
  1399 + temp.className = "editorOLidentificaItemInactive olButton";
  1400 + temp.title = $trad("d7t");
  1401 + temp.onclick = function(){
  1402 + i3GEO.editorOL.criaJanelaAtivaTema();
  1403 + i3GEO.eventos.cliquePerm.desativa();
  1404 + i3GEO.editorOL.marcaBotao("editorOLidentifica");
  1405 + var draw = new ol.interaction.Draw({
  1406 + type : "Point"
  1407 + });
  1408 + //adiciona a interacao para poder ser removida
  1409 + i3GEO.editorOL.interacoes.push(draw);
  1410 + i3GEO.Interface.openlayers.interacoes[0].setActive(false);
  1411 + draw.on("drawend", function(evt) {
  1412 + var xy, p, retorno, url, layer, tema = $i("i3GEOOLlistaTemasAtivos");
  1413 + if(tema){
  1414 + layer = i3geoOL.getLayersByName(tema.value)[0];
  1415 + url = layer.getSource().getUrls()[0];
  1416 + xy = evt.target.downPx_;
  1417 + retorno = function(r){
  1418 + var texto = "", lonlattexto, xy, temp, temp1, n, i, f = [], textoN = r.split(":");
  1419 + xy = evt.feature.getGeometry().getFirstCoordinate();
  1420 + i3GEO.eventos.cliquePerm.ativo = true;
  1421 + try {
  1422 + if (textoN.length > 1) {
  1423 + temp = textoN[2].replace(/\n\r/g, "");
  1424 + temp = temp.replace(/'/g, "");
  1425 + temp = temp.replace(/\n/g, "|");
  1426 + temp = temp.replace(/_/g, " ");
  1427 + temp = temp.replace(/=/g, ":");
  1428 + temp = temp.split("|");
  1429 + n = temp.length;
  1430 + for (i = 0; i < n; i++) {
  1431 + temp1 = temp[i].replace(/^\s+/, "");
  1432 + temp1 = temp1.replace(/\s+$/, "");
  1433 + if (temp1 != "")
  1434 + f.push(temp1);
  1435 + }
  1436 + texto = "<pre>" + f.join("<br>") + "</pre>";
  1437 + }
  1438 + } catch (e) {}
  1439 + //funcao para capturar a geometria
  1440 + lonlattexto =
  1441 + "<span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(" + xy[0]
  1442 + + ","
  1443 + + xy[1]
  1444 + + ",\""
  1445 + + tema.value
  1446 + + "\")'>edita geometria</span><br>";
  1447 + i3GEO.Interface.openlayers.balao("<div style='text-align:left' >" + lonlattexto + texto + "</div>","", xy[0], xy[1], false, false);
  1448 + i3GEO.eventos.cliquePerm.ativo = false;
  1449 + };
  1450 + p = i3GEO.configura.locaplic + "/classesphp/proxy.php?"
  1451 + + url
  1452 + + "&tipoRetornoProxy=string&REQUEST=GetFeatureInfo&TIPOIMAGEM=nenhum&DESLIGACACHE=sim&STYLES=&SERVICE=WMS&VERSION=1.1.1&FEATURE_COUNT=1"
  1453 + + "&FORMAT=image/png&INFO_FORMAT=text/plain&SRS=EPSG:4326"
  1454 + + "&LAYERS=" + tema.value
  1455 + + "&layer=" + tema.value
  1456 + + "&QUERY_LAYERS=" + tema.value
  1457 + + "&HEIGHT=" + i3GEO.parametros.h
  1458 + + "&WIDTH=" + i3GEO.parametros.w
  1459 + + "&BBOX=" + i3geoOL.getExtent().toBBOX().split(",").join(" ")
  1460 + + "&X=" + xy[0] + "&Y=" + xy[1];
  1461 + cpJSON.call(p, "foo", retorno, "");
  1462 + }
  1463 + });
  1464 + i3geoOL.addInteraction(draw);
  1465 + };
  1466 + return temp;
  1467 + },
  1468 + //TODO implementar botao salvar
  1469 + botaoSalva: function(){
  1470 + /*
  1471 + if (botoes.salva === true) {
  1472 +
  1473 + button = new OpenLayers.Control.Button({
  1474 + displayClass : "editorOLsalva",
  1475 + trigger : function() {
  1476 + i3GEO.editorOL.salvaGeometrias();
  1477 + },
  1478 + title : $trad("salva"),
  1479 + type : OpenLayers.Control.TYPE_BUTTON
  1480 + });
  1481 + controles.push(button);
  1482 + adiciona = true;
  1483 +
  1484 + }
  1485 + */
  1486 + return "";
  1487 + },
1291 criaBotoes : function(botoes) { 1488 criaBotoes : function(botoes) {
1292 if($i("i3GEObarraEdicao")){ 1489 if($i("i3GEObarraEdicao")){
1293 $i("i3GEObarraEdicao").style.display = "block"; 1490 $i("i3GEObarraEdicao").style.display = "block";
1294 return; 1491 return;
1295 } 1492 }
1296 - var temp;  
1297 //cria o painel onde entrarao os icones 1493 //cria o painel onde entrarao os icones
1298 i3GEOpanelEditor = document.createElement("div"); 1494 i3GEOpanelEditor = document.createElement("div");
1299 i3GEOpanelEditor.id = "i3GEObarraEdicao"; 1495 i3GEOpanelEditor.id = "i3GEObarraEdicao";
@@ -1326,6 +1522,9 @@ i3GEO.editorOL = @@ -1326,6 +1522,9 @@ i3GEO.editorOL =
1326 if (botoes.area === true) { 1522 if (botoes.area === true) {
1327 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoArea()); 1523 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoArea());
1328 } 1524 }
  1525 + if (botoes.identifica === true) {
  1526 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoIdentifica());
  1527 + }
1329 if (botoes.linha === true) { 1528 if (botoes.linha === true) {
1330 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoLinha()); 1529 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoLinha());
1331 } 1530 }
@@ -1338,11 +1537,13 @@ i3GEO.editorOL = @@ -1338,11 +1537,13 @@ i3GEO.editorOL =
1338 if (botoes.texto === true) { 1537 if (botoes.texto === true) {
1339 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoTexto()); 1538 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoTexto());
1340 } 1539 }
  1540 + if (botoes.edita === true) {
  1541 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoEdita());
  1542 + }
1341 if (botoes.selecao === true) { 1543 if (botoes.selecao === true) {
1342 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoSelecao()); 1544 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoSelecao());
1343 } 1545 }
1344 if (botoes.selecaotudo === true) { 1546 if (botoes.selecaotudo === true) {
1345 -  
1346 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoSelecaoTudo()); 1547 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoSelecaoTudo());
1347 } 1548 }
1348 if (botoes.apaga === true) { 1549 if (botoes.apaga === true) {
@@ -1351,210 +1552,29 @@ i3GEO.editorOL = @@ -1351,210 +1552,29 @@ i3GEO.editorOL =
1351 if (botoes.frente === true) { 1552 if (botoes.frente === true) {
1352 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoFrente()); 1553 i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoFrente());
1353 } 1554 }
1354 - if (botoes.edita === true) {  
1355 - i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoEdita());  
1356 - }  
1357 if (botoes.edita === true && botoes.corta === true && i3GEO.php) { 1555 if (botoes.edita === true && botoes.corta === true && i3GEO.php) {
1358 - i3GEO.eventos.cliquePerm.desativa();  
1359 - temp = document.createElement("div");  
1360 - temp.className = "editorOLcortaItemInactive olButton";  
1361 - temp.title = $trad("cortaf");  
1362 - temp.onclick = function(){  
1363 - var nsel = i3GEO.editorOL.idsSelecionados.length;  
1364 - if (nsel != 1) {  
1365 - alert("Selecione primeiro um elemento para ser cortado");  
1366 - } else {  
1367 - i3GEO.janela.tempoMsg("Desenhe um pol&iacute;gono");  
1368 - i3GEO.editorOL.marcaBotao("editorOLcorta");  
1369 - var draw = new ol.interaction.Draw({  
1370 - type : "Polygon"  
1371 - });  
1372 - //adiciona a interacao para poder ser removida  
1373 - i3GEO.editorOL.interacoes.push(draw);  
1374 - i3GEO.Interface.openlayers.interacoes[0].setActive(false);  
1375 - draw.on("drawend", function(evt) {  
1376 - var temp, f, c, format, fwkt, cwkt;  
1377 - f = evt.feature;  
1378 - c = i3GEO.desenho.layergrafico.getSource().getFeatureById(i3GEO.editorOL.idsSelecionados[nsel - 1]);  
1379 - i3GEO.editorOL.featuresBackup.push(c.clone());  
1380 - i3GEO.editorOL.marcaBotao();  
1381 - //corta  
1382 - format = new ol.format.WKT();  
1383 - if(f && c){  
1384 - fwkt = format.writeFeatures([f]);  
1385 - cwkt = format.writeFeatures([c]);  
1386 - if(fwkt && cwkt){  
1387 - temp = function(retorno) {  
1388 - i3GEO.janela.fechaAguarde("i3GEO.cortador");  
1389 - if (retorno != "" && retorno.data && retorno.data != "") {  
1390 - i3GEO.janela.fechaAguarde("i3GEO.cortador");  
1391 - c.setGeometry(format.readGeometry(retorno.data));  
1392 - if (document.getElementById("panellistagEditor")) {  
1393 - i3GEO.editorOL.listaGeometrias();  
1394 - }  
1395 - }  
1396 - };  
1397 - i3GEO.janela.abreAguarde("i3GEO.cortador", "Cortando");  
1398 - i3GEO.php.funcoesGeometriasWkt(temp, cwkt + "|" + fwkt, "difference");  
1399 - }  
1400 - }  
1401 - });  
1402 - i3geoOL.addInteraction(draw);  
1403 - }  
1404 - };  
1405 - i3GEOpanelEditor.appendChild(temp); 1556 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoCorta());
1406 } 1557 }
1407 if (botoes.edita === true && botoes.listag === true) { 1558 if (botoes.edita === true && botoes.listag === true) {
1408 - temp = document.createElement("div");  
1409 - temp.className = "editorOLlistagItemInactive olButton";  
1410 - temp.title = $trad("listag");  
1411 - temp.onclick = function(){  
1412 - i3GEO.editorOL.listaGeometrias();  
1413 - };  
1414 - i3GEOpanelEditor.appendChild(temp);  
1415 - }  
1416 - if (botoes.ajuda === true) {  
1417 - temp = document.createElement("div");  
1418 - temp.className = "editorOLajudaItemInactive olButton";  
1419 - temp.title = $trad("s1");  
1420 - temp.onclick = function(){  
1421 - if(i3GEO.configura && i3GEO.configura.locaplic){  
1422 - i3GEO.janela.cria("400px", "200px", i3GEO.configura.locaplic  
1423 - + "/mashups/openlayers_ajuda.php?completo=none", "", "", $trad("s1"), "editorOlAjuda");  
1424 - }  
1425 - else{  
1426 - window.open("openlayers_ajuda.php");  
1427 - }  
1428 - };  
1429 - i3GEOpanelEditor.appendChild(temp);  
1430 - }  
1431 - if (botoes.fecha === true) {  
1432 - temp = document.createElement("div");  
1433 - temp.className = "editorOLfechaItemInactive olButton";  
1434 - temp.title = $trad("x74");  
1435 - temp.onclick = function(){  
1436 - i3GEO.editorOL.unselTodos();  
1437 - i3GEO.editorOL.featuresBackup = [];  
1438 - i3GEO.editorOL.marcaBotao();  
1439 - i3GEO.eventos.cliquePerm.ativa();  
1440 - $i("i3GEObarraEdicao").style.display = "none";  
1441 - };  
1442 - i3GEOpanelEditor.appendChild(temp); 1559 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoListaGeometrias());
1443 } 1560 }
1444 if (botoes.tools === true) { 1561 if (botoes.tools === true) {
1445 - temp = document.createElement("div");  
1446 - temp.className = "editorOLtoolsItemInactive olButton";  
1447 - temp.title = $trad("u15a");  
1448 - temp.onclick = function(){  
1449 - // fora do i3geo, usa o jsts  
1450 - if (i3GEO.php) {  
1451 - i3GEO.editorOL.ferramentas();  
1452 - } else {  
1453 - i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");  
1454 - }  
1455 - };  
1456 - i3GEOpanelEditor.appendChild(temp); 1562 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoTools());
1457 } 1563 }
1458 if (botoes.propriedades === true) { 1564 if (botoes.propriedades === true) {
1459 - temp = document.createElement("div");  
1460 - temp.className = "editorOLpropriedadesItemInactive olButton";  
1461 - temp.title = $trad("p13");  
1462 - temp.onclick = function(){  
1463 - i3GEO.editorOL.propriedades();  
1464 - };  
1465 - i3GEOpanelEditor.appendChild(temp); 1565 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoPropriedades());
1466 } 1566 }
1467 - if (botoes.identifica === true) {  
1468 - i3GEO.eventos.cliquePerm.desativa();  
1469 - temp = document.createElement("div");  
1470 - temp.className = "editorOLidentificaItemInactive olButton";  
1471 - temp.title = $trad("d7t");  
1472 - temp.onclick = function(){  
1473 - i3GEO.editorOL.criaJanelaAtivaTema();  
1474 - i3GEO.eventos.cliquePerm.desativa();  
1475 - i3GEO.editorOL.marcaBotao("editorOLidentifica");  
1476 - var draw = new ol.interaction.Draw({  
1477 - type : "Point"  
1478 - });  
1479 - //adiciona a interacao para poder ser removida  
1480 - i3GEO.editorOL.interacoes.push(draw);  
1481 - i3GEO.Interface.openlayers.interacoes[0].setActive(false);  
1482 - draw.on("drawend", function(evt) {  
1483 - var xy, p, retorno, url, layer, tema = $i("i3GEOOLlistaTemasAtivos");  
1484 - if(tema){  
1485 - layer = i3geoOL.getLayersByName(tema.value)[0];  
1486 - url = layer.getSource().getUrls()[0];  
1487 - xy = evt.target.downPx_;  
1488 - retorno = function(r){  
1489 - var texto = "", lonlattexto, xy, temp, temp1, n, i, f = [], textoN = r.split(":");  
1490 - xy = evt.feature.getGeometry().getFirstCoordinate();  
1491 - i3GEO.eventos.cliquePerm.ativo = true;  
1492 - try {  
1493 - if (textoN.length > 1) {  
1494 - temp = textoN[2].replace(/\n\r/g, "");  
1495 - temp = temp.replace(/'/g, "");  
1496 - temp = temp.replace(/\n/g, "|");  
1497 - temp = temp.replace(/_/g, " ");  
1498 - temp = temp.replace(/=/g, ":");  
1499 - temp = temp.split("|");  
1500 - n = temp.length;  
1501 - for (i = 0; i < n; i++) {  
1502 - temp1 = temp[i].replace(/^\s+/, "");  
1503 - temp1 = temp1.replace(/\s+$/, "");  
1504 - if (temp1 != "")  
1505 - f.push(temp1);  
1506 - }  
1507 - texto = "<pre>" + f.join("<br>") + "</pre>";  
1508 - }  
1509 - } catch (e) {}  
1510 - //funcao para capturar a geometria  
1511 - lonlattexto =  
1512 - "<span style=font-size:12px;color:blue;cursor:pointer onclick='i3GEO.editorOL.captura(" + xy[0]  
1513 - + ","  
1514 - + xy[1]  
1515 - + ",\""  
1516 - + tema.value  
1517 - + "\")'>edita geometria</span><br>";  
1518 - i3GEO.Interface.openlayers.balao("<div style='text-align:left' >" + lonlattexto + texto + "</div>","", xy[0], xy[1], false, false);  
1519 - i3GEO.eventos.cliquePerm.ativo = false;  
1520 - };  
1521 - p = i3GEO.configura.locaplic + "/classesphp/proxy.php?"  
1522 - + url  
1523 - + "&tipoRetornoProxy=string&REQUEST=GetFeatureInfo&TIPOIMAGEM=nenhum&DESLIGACACHE=sim&STYLES=&SERVICE=WMS&VERSION=1.1.1&FEATURE_COUNT=1"  
1524 - + "&FORMAT=image/png&INFO_FORMAT=text/plain&SRS=EPSG:4326"  
1525 - + "&LAYERS=" + tema.value  
1526 - + "&layer=" + tema.value  
1527 - + "&QUERY_LAYERS=" + tema.value  
1528 - + "&HEIGHT=" + i3GEO.parametros.h  
1529 - + "&WIDTH=" + i3GEO.parametros.w  
1530 - + "&BBOX=" + i3geoOL.getExtent().toBBOX().split(",").join(" ")  
1531 - + "&X=" + xy[0] + "&Y=" + xy[1];  
1532 - cpJSON.call(p, "foo", retorno, "");  
1533 - }  
1534 - });  
1535 - i3geoOL.addInteraction(draw);  
1536 - };  
1537 - i3GEOpanelEditor.appendChild(temp); 1567 + if (botoes.salva === true) {
  1568 + //i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoSalva());
  1569 + }
  1570 + if (botoes.ajuda === true) {
  1571 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoAjuda());
  1572 + }
  1573 + if (botoes.fecha === true) {
  1574 + i3GEOpanelEditor.appendChild(i3GEO.editorOL.botaoFecha());
1538 } 1575 }
1539 i3GEOpanelEditor.style.width = i3GEOpanelEditor.getElementsByTagName("div").length * 33 + "px"; 1576 i3GEOpanelEditor.style.width = i3GEOpanelEditor.getElementsByTagName("div").length * 33 + "px";
1540 i3GEO.editorOL.mapa.getViewport().getElementsByClassName("ol-overlaycontainer-stopevent")[0].appendChild(i3GEOpanelEditor); 1577 i3GEO.editorOL.mapa.getViewport().getElementsByClassName("ol-overlaycontainer-stopevent")[0].appendChild(i3GEOpanelEditor);
1541 -  
1542 - /*  
1543 - if (botoes.salva === true) {  
1544 -  
1545 - button = new OpenLayers.Control.Button({  
1546 - displayClass : "editorOLsalva",  
1547 - trigger : function() {  
1548 - i3GEO.editorOL.salvaGeometrias();  
1549 - },  
1550 - title : $trad("salva"),  
1551 - type : OpenLayers.Control.TYPE_BUTTON  
1552 - });  
1553 - controles.push(button);  
1554 - adiciona = true;  
1555 -  
1556 - }  
1557 - */  
1558 }, 1578 },
1559 removeFeaturesSel : function(){ 1579 removeFeaturesSel : function(){
1560 var s, i, nsel, f; 1580 var s, i, nsel, f;
js/dicionario.js
@@ -2529,7 +2529,7 @@ var g_traducao = @@ -2529,7 +2529,7 @@ var g_traducao =
2529 ], 2529 ],
2530 "dpol" : [ 2530 "dpol" : [
2531 { 2531 {
2532 - pt : "digitalizar pol&iacute;gono", 2532 + pt : "digitalizar poligono",
2533 en : "", 2533 en : "",
2534 es : "" 2534 es : ""
2535 } 2535 }