Commit eac2120977a16fd0c4821b53727e7ad8844bcb99

Authored by Edmar Moretti
1 parent eca20c4f

Remoção do código específico do googleearth

@@ -1011,158 +1011,6 @@ i3GEO.analise = @@ -1011,158 +1011,6 @@ i3GEO.analise =
1011 mostra.innerHTML = texto; 1011 mostra.innerHTML = texto;
1012 } 1012 }
1013 } 1013 }
1014 - },  
1015 - googleearth : {  
1016 - pontosdistobj : {  
1017 - xpt : [],  
1018 - ypt : [],  
1019 - dist : [],  
1020 - distV : [],  
1021 - xtela : [],  
1022 - ytela : [],  
1023 - ximg : [],  
1024 - yimg : [],  
1025 - linhas : [],  
1026 - linhastemp : []  
1027 - },  
1028 - inicia : function() {  
1029 - i3GEO.eventos.adicionaEventos("MOUSECLIQUE", [  
1030 - "i3GEO.analise.medeDistancia.googleearth.clique()"  
1031 - ]);  
1032 - i3GEO.eventos.adicionaEventos("MOUSEMOVE", [  
1033 - "i3GEO.analise.medeDistancia.googleearth.movimento()"  
1034 - ]);  
1035 - i3GEO.eventos.adicionaEventos("NAVEGAMAPA", [  
1036 - "i3GEO.analise.medeDistancia.fechaJanela()"  
1037 - ]);  
1038 - },  
1039 - clique : function() {  
1040 - var pontosdistobj = i3GEO.analise.medeDistancia.googleearth.pontosdistobj, n, d, dd;  
1041 - n = pontosdistobj.xpt.length;  
1042 - pontosdistobj.xpt[n] = objposicaocursor.ddx;  
1043 - pontosdistobj.ypt[n] = objposicaocursor.ddy;  
1044 - pontosdistobj.xtela[n] = objposicaocursor.telax;  
1045 - pontosdistobj.ytela[n] = objposicaocursor.telay;  
1046 - pontosdistobj.ximg[n] = objposicaocursor.imgx;  
1047 - pontosdistobj.yimg[n] = objposicaocursor.imgy;  
1048 - pontosdistobj.dist[n] = 0;  
1049 - if (n > 0) {  
1050 - d =  
1051 - i3GEO.calculo.distancia(  
1052 - pontosdistobj.xpt[n - 1],  
1053 - pontosdistobj.ypt[n - 1],  
1054 - objposicaocursor.ddx,  
1055 - objposicaocursor.ddy);  
1056 - pontosdistobj.dist[n] = d + pontosdistobj.dist[n - 1];  
1057 - if ($i("pararraios") && $i("pararraios").checked === true) {  
1058 - dd =  
1059 - Math.sqrt(((Math.pow((pontosdistobj.xpt[n] - pontosdistobj.xpt[n - 1]), 2)) + (Math.pow(  
1060 - (pontosdistobj.ypt[n] - pontosdistobj.ypt[n - 1]),  
1061 - 2))));  
1062 - i3GEO.desenho.googleearth  
1063 - .insereCirculo(pontosdistobj.xpt[n], pontosdistobj.ypt[n], dd, "", "divGeometriasTemp");  
1064 - }  
1065 - if ($i("parartextos") && $i("parartextos").checked === true) {  
1066 - i3GEO.desenho.googleearth.insereMarca(  
1067 - d + " km",  
1068 - objposicaocursor.ddx,  
1069 - objposicaocursor.ddy,  
1070 - "",  
1071 - "divGeometriasTemp");  
1072 - }  
1073 - // cria a linha ligando os dois ultimos pontos  
1074 - i3GEO.desenho.googleearth.insereLinha(  
1075 - pontosdistobj.xpt[n - 1],  
1076 - pontosdistobj.ypt[n - 1],  
1077 - pontosdistobj.xpt[n],  
1078 - pontosdistobj.ypt[n],  
1079 - "",  
1080 - "divGeometriasTemp");  
1081 - }  
1082 - },  
1083 - movimento : function() {  
1084 - var n, d, r, da, pontosdistobj = i3GEO.analise.medeDistancia.googleearth.pontosdistobj, calculo = i3GEO.calculo;  
1085 - n = pontosdistobj.xpt.length;  
1086 - if (n > 0) {  
1087 - d =  
1088 - calculo.distancia(  
1089 - pontosdistobj.xpt[n - 1],  
1090 - pontosdistobj.ypt[n - 1],  
1091 - objposicaocursor.ddx,  
1092 - objposicaocursor.ddy);  
1093 - r = calculo.direcao(pontosdistobj.xpt[n - 1], pontosdistobj.ypt[n - 1], objposicaocursor.ddx, objposicaocursor.ddy);  
1094 - r = calculo.dd2dms(r, r);  
1095 - r = r[0];  
1096 - d = d * 1;  
1097 - da = d + pontosdistobj.dist[n - 1];  
1098 - i3GEO.analise.medeDistancia.googleearth.mostraParcial(d, da, r);  
1099 - }  
1100 - },  
1101 - /**  
1102 - * Fecha a janela que mostra os dados Pergunta ao usuario se os graficos devem ser removidos Os graficos sao marcados com o  
1103 - * atributo "origem" Os raios e pontos sao sempre removidos  
1104 - */  
1105 - fechaJanela : function() {  
1106 - temp = window.confirm($trad("x94"));  
1107 - if (temp) {  
1108 - i3GEO.desenho.googleearth.removePlacemark("divGeometriasTemp");  
1109 - }  
1110 - i3GEO.eventos.removeEventos("MOUSECLIQUE", [  
1111 - "i3GEO.analise.medeDistancia.googleearth.clique()"  
1112 - ]);  
1113 - i3GEO.eventos.removeEventos("MOUSEMOVE", [  
1114 - "i3GEO.analise.medeDistancia.movimento.googleearth()"  
1115 - ]);  
1116 - i3GEO.eventos.removeEventos("NAVEGAMAPA", [  
1117 - "i3GEO.analise.medeDistancia.fechaJanela()"  
1118 - ]);  
1119 - },  
1120 - /**  
1121 - * Mostra a totalizacao das linhas ja digitalizadas  
1122 - */  
1123 - mostraTotal : function(trecho, total) {  
1124 - var mostra = $i("mostradistancia_calculo"), texto;  
1125 - if (mostra) {  
1126 - texto =  
1127 - "<b>" + $trad("x96")  
1128 - + ":</b> "  
1129 - + total.toFixed(3)  
1130 - + " km"  
1131 - + "<br><b>"  
1132 - + $trad("x96")  
1133 - + ":</b> "  
1134 - + (total * 1000).toFixed(2)  
1135 - + " m"  
1136 - + "<br>"  
1137 - + $trad("x25")  
1138 - + ": "  
1139 - + i3GEO.calculo.metododistancia;  
1140 - mostra.innerHTML = texto;  
1141 - }  
1142 - },  
1143 - /**  
1144 - * Mostra o valor do trecho entre o ultimo ponto clicado e a posicao do mouse  
1145 - */  
1146 - mostraParcial : function(trecho, parcial, direcao) {  
1147 - var mostra = $i("mostradistancia_calculo_movel"), texto;  
1148 - if (mostra) {  
1149 - texto =  
1150 - "<b>" + $trad("x95")  
1151 - + ":</b> "  
1152 - + trecho.toFixed(3)  
1153 - + " km"  
1154 - + "<br><b>"  
1155 - + $trad("x97")  
1156 - + ":</b> "  
1157 - + (parcial + trecho).toFixed(3)  
1158 - + " km"  
1159 - + "<br><b>"  
1160 - + $trad("x23")  
1161 - + " (DMS):</b> "  
1162 - + direcao;  
1163 - mostra.innerHTML = texto;  
1164 - }  
1165 - }  
1166 } 1014 }
1167 }, 1015 },
1168 /** 1016 /**
@@ -1761,7 +1609,6 @@ i3GEO.analise = @@ -1761,7 +1609,6 @@ i3GEO.analise =
1761 mostra.innerHTML = texto; 1609 mostra.innerHTML = texto;
1762 } 1610 }
1763 } 1611 }
1764 - },  
1765 - googleearth : {} 1612 + }
1766 } 1613 }
1767 }; 1614 };
1768 \ No newline at end of file 1615 \ No newline at end of file
js/arvoredecamadas.js
@@ -1874,23 +1874,11 @@ i3GEO.arvoreDeCamadas = @@ -1874,23 +1874,11 @@ i3GEO.arvoreDeCamadas =
1874 } 1874 }
1875 if (tipo === "ligartodos") { 1875 if (tipo === "ligartodos") {
1876 t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca"); 1876 t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");
1877 - if (i3GEO.util.in_array(i3GEO.Interface.ATUAL, [  
1878 - "googleearth",  
1879 - "openlayers",  
1880 - "googlemaps"  
1881 - ])) {  
1882 - return;  
1883 - } 1877 + return;
1884 } 1878 }
1885 if (tipo === "desligartodos") { 1879 if (tipo === "desligartodos") {
1886 t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca"); 1880 t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");
1887 - if (i3GEO.util.in_array(i3GEO.Interface.ATUAL, [  
1888 - "googleearth",  
1889 - "openlayers",  
1890 - "googlemaps"  
1891 - ])) {  
1892 - return;  
1893 - } 1881 + return;
1894 } 1882 }
1895 // 1883 //
1896 // zera o contador de tempo 1884 // zera o contador de tempo
@@ -1956,23 +1944,11 @@ i3GEO.arvoreDeCamadas = @@ -1956,23 +1944,11 @@ i3GEO.arvoreDeCamadas =
1956 todos.push(c.value); 1944 todos.push(c.value);
1957 if (tipo === "marca") { 1945 if (tipo === "marca") {
1958 c.checked = true; 1946 c.checked = true;
1959 - if (i3GEO.util.in_array(ATUAL, [  
1960 - "googleearth",  
1961 - "openlayers",  
1962 - "googlemaps"  
1963 - ])) {  
1964 - i3GEO.Interface[ATUAL].ligaDesliga(c);  
1965 - } 1947 + i3GEO.Interface[ATUAL].ligaDesliga(c);
1966 } 1948 }
1967 if (tipo === "desmarca") { 1949 if (tipo === "desmarca") {
1968 c.checked = false; 1950 c.checked = false;
1969 - if (i3GEO.util.in_array(ATUAL, [  
1970 - "googleearth",  
1971 - "openlayers",  
1972 - "googlemaps"  
1973 - ])) {  
1974 - i3GEO.Interface[ATUAL].ligaDesliga(c);  
1975 - } 1951 + i3GEO.Interface[ATUAL].ligaDesliga(c);
1976 } 1952 }
1977 } 1953 }
1978 } 1954 }
js/barradebotoes.js
@@ -1601,10 +1601,6 @@ i3GEO.barraDeBotoes = @@ -1601,10 +1601,6 @@ i3GEO.barraDeBotoes =
1601 i3GEO.barraDeBotoes.escondeJanelaAjuda(); 1601 i3GEO.barraDeBotoes.escondeJanelaAjuda();
1602 return; 1602 return;
1603 } 1603 }
1604 - if (i3GEO.Interface.ATUAL === "googleearth") {  
1605 - objeto.title = mensagem;  
1606 - return;  
1607 - }  
1608 if (!divmensagem && this.TIPOAJUDA !== "balao") { 1604 if (!divmensagem && this.TIPOAJUDA !== "balao") {
1609 divmensagem = document.createElement("div"); 1605 divmensagem = document.createElement("div");
1610 divmensagem.id = "divMensagemBarraDeBotoes"; 1606 divmensagem.id = "divMensagemBarraDeBotoes";
js/configura.js
@@ -415,11 +415,6 @@ i3GEO.configura = @@ -415,11 +415,6 @@ i3GEO.configura =
415 id : "omenudataInterface4", 415 id : "omenudataInterface4",
416 text : "Google Maps", 416 text : "Google Maps",
417 url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_gm.phtml?'+i3GEO.configura.sid" 417 url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_gm.phtml?'+i3GEO.configura.sid"
418 - },  
419 - {  
420 - id : "omenudataInterface5",  
421 - text : "Google Earth",  
422 - url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"  
423 } 418 }
424 ] 419 ]
425 ] 420 ]
@@ -1395,7 +1390,7 @@ i3GEO.configura = @@ -1395,7 +1390,7 @@ i3GEO.configura =
1395 i3GEO.util.mudaCursor(i3GEO.configura.cursores, temp, i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic); 1390 i3GEO.util.mudaCursor(i3GEO.configura.cursores, temp, i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic);
1396 } 1391 }
1397 i3GEO.barraDeBotoes.ativaIcone("identifica"); 1392 i3GEO.barraDeBotoes.ativaIcone("identifica");
1398 - if (i3GEO.Interface.ATUAL === "googleearth" || i3GEO.eventos.cliquePerm.ativo === false) { 1393 + if (i3GEO.eventos.cliquePerm.ativo === false) {
1399 // caso seja um clique para desativar 1394 // caso seja um clique para desativar
1400 if (i3GEO.eventos.MOUSECLIQUE.toString().search(i3GEO.configura.funcaoIdentifica) >= 0) { 1395 if (i3GEO.eventos.MOUSECLIQUE.toString().search(i3GEO.configura.funcaoIdentifica) >= 0) {
1401 i3GEO.eventos.MOUSECLIQUE.remove(i3GEO.configura.funcaoIdentifica); 1396 i3GEO.eventos.MOUSECLIQUE.remove(i3GEO.configura.funcaoIdentifica);
@@ -1431,7 +1426,7 @@ i3GEO.configura = @@ -1431,7 +1426,7 @@ i3GEO.configura =
1431 i3GEO.util.mudaCursor(i3GEO.configura.cursores, temp, i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic); 1426 i3GEO.util.mudaCursor(i3GEO.configura.cursores, temp, i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic);
1432 } 1427 }
1433 i3GEO.barraDeBotoes.ativaIcone("identificaBalao"); 1428 i3GEO.barraDeBotoes.ativaIcone("identificaBalao");
1434 - if (i3GEO.Interface.ATUAL === "googleearth" || i3GEO.eventos.cliquePerm.ativo === false) { 1429 + if (i3GEO.eventos.cliquePerm.ativo === false) {
1435 // na opcao de identificacao so e permitido um evento 1430 // na opcao de identificacao so e permitido um evento
1436 i3GEO.eventos.MOUSECLIQUE = [ 1431 i3GEO.eventos.MOUSECLIQUE = [
1437 i3GEO.configura.funcaoTip 1432 i3GEO.configura.funcaoTip
@@ -170,11 +170,7 @@ i3GEO.desenho = @@ -170,11 +170,7 @@ i3GEO.desenho =
170 * {string} - expessura do contorno 170 * {string} - expessura do contorno
171 */ 171 */
172 addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) { 172 addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) {
173 - if (i3GEO.Interface.ATUAL != "googleearth") {  
174 - return i3GEO.desenho[i3GEO.Interface.ATUAL].addBox(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth);  
175 - } else {  
176 - return false;  
177 - } 173 + return i3GEO.desenho[i3GEO.Interface.ATUAL].addBox(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth);
178 }, 174 },
179 /** 175 /**
180 * Function: moveBox 176 * Function: moveBox
@@ -194,11 +190,7 @@ i3GEO.desenho = @@ -194,11 +190,7 @@ i3GEO.desenho =
194 * {numeric} - novo ymax 190 * {numeric} - novo ymax
195 */ 191 */
196 moveBox : function(box, xmin, ymin, xmax, ymax) { 192 moveBox : function(box, xmin, ymin, xmax, ymax) {
197 - if (i3GEO.Interface.ATUAL != "googleearth") {  
198 - return i3GEO.desenho[i3GEO.Interface.ATUAL].moveBox(box, xmin, ymin, xmax, ymax);  
199 - } else {  
200 - return false;  
201 - } 193 + return i3GEO.desenho[i3GEO.Interface.ATUAL].moveBox(box, xmin, ymin, xmax, ymax);
202 }, 194 },
203 /** 195 /**
204 * Function: removeBox 196 * Function: removeBox
@@ -239,11 +231,7 @@ i3GEO.desenho = @@ -239,11 +231,7 @@ i3GEO.desenho =
239 * 231 *
240 */ 232 */
241 addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) { 233 addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) {
242 - if (i3GEO.Interface.ATUAL != "googleearth") {  
243 - return i3GEO.desenho[i3GEO.Interface.ATUAL].addPin(x, y, w, h, imagem, namespace, centro);  
244 - } else {  
245 - return false;  
246 - } 234 + return i3GEO.desenho[i3GEO.Interface.ATUAL].addPin(x, y, w, h, imagem, namespace, centro);
247 }, 235 },
248 /** 236 /**
249 * Function: removePins 237 * Function: removePins
@@ -255,9 +243,7 @@ i3GEO.desenho = @@ -255,9 +243,7 @@ i3GEO.desenho =
255 * {string} - namespace que identifica o grupo de marcas que serao removidas 243 * {string} - namespace que identifica o grupo de marcas que serao removidas
256 */ 244 */
257 removePins : function(namespace) { 245 removePins : function(namespace) {
258 - if (i3GEO.Interface.ATUAL != "googleearth") {  
259 - i3GEO.desenho[i3GEO.Interface.ATUAL].removePins(namespace);  
260 - } 246 + i3GEO.desenho[i3GEO.Interface.ATUAL].removePins(namespace);
261 }, 247 },
262 /** 248 /**
263 * Function: movePin 249 * Function: movePin
@@ -273,9 +259,7 @@ i3GEO.desenho = @@ -273,9 +259,7 @@ i3GEO.desenho =
273 * {numeric} - novo y 259 * {numeric} - novo y
274 */ 260 */
275 movePin : function(pin, x, y) { 261 movePin : function(pin, x, y) {
276 - if (i3GEO.Interface.ATUAL != "googleearth") {  
277 - i3GEO.desenho[i3GEO.Interface.ATUAL].movePin(pin, x, y);  
278 - } 262 + i3GEO.desenho[i3GEO.Interface.ATUAL].movePin(pin, x, y);
279 }, 263 },
280 /** 264 /**
281 * Section: i3GEO.desenho.openlayers 265 * Section: i3GEO.desenho.openlayers
@@ -650,87 +634,6 @@ i3GEO.desenho = @@ -650,87 +634,6 @@ i3GEO.desenho =
650 } 634 }
651 } 635 }
652 } 636 }
653 - },  
654 - /**  
655 - * Section: i3GEO.desenho.googleearth  
656 - *  
657 - * Fun&ccedil;&otilde;es utilizadas quando o mapa baseia-se na interface GoogleEarth  
658 - */  
659 - googleearth : {  
660 - insereMarca : function(description, ddx, ddy, name, snippet) {  
661 - if (typeof (console) !== 'undefined')  
662 - console.info("i3GEO.Interface.googleearth.insereMarca()");  
663 -  
664 - var placemark = i3GeoMap.createPlacemark(''), point = i3GeoMap.createPoint('');  
665 - placemark.setName(name);  
666 - point.setLatitude(ddy);  
667 - point.setLongitude(ddx);  
668 - placemark.setGeometry(point);  
669 - if (description !== "") {  
670 - placemark.setDescription(description);  
671 - }  
672 - placemark.setSnippet(snippet);  
673 - i3GeoMap.getFeatures().appendChild(placemark);  
674 - },  
675 - //  
676 - // c&oacute;digo obtido em  
677 - // http://code.google.com/intl/pt-BR/apis/earth/documentation/geometries.html  
678 - //  
679 - insereCirculo : function(centerLng, centerLat, radius, name, snippet) {  
680 - function makeCircle(centerLat, centerLng, radius) {  
681 - var ring = i3GeoMap.createLinearRing(''), steps = 25, i, pi2 = Math.PI * 2, lat, lng;  
682 - for (i = 0; i < steps; i++) {  
683 - lat = centerLat + radius * Math.cos(i / steps * pi2);  
684 - lng = centerLng + radius * Math.sin(i / steps * pi2);  
685 - ring.getCoordinates().pushLatLngAlt(lat, lng, 0);  
686 - }  
687 - return ring;  
688 - }  
689 - var polygonPlacemark = i3GeoMap.createPlacemark(''), poly = i3GeoMap.createPolygon(''), polyStyle;  
690 - poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);  
691 - polygonPlacemark.setGeometry(poly);  
692 - polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat, centerLng, radius));  
693 - polygonPlacemark.setName(name);  
694 - polygonPlacemark.setSnippet(snippet);  
695 - polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));  
696 - polyStyle = polygonPlacemark.getStyleSelector().getPolyStyle();  
697 - polyStyle.setFill(0);  
698 - i3GeoMap.getFeatures().appendChild(polygonPlacemark);  
699 - },  
700 - insereLinha : function(xi, yi, xf, yf, name, snippet) {  
701 - var lineStringPlacemark = i3GeoMap.createPlacemark(''), lineString, lineStyle;  
702 - lineStringPlacemark.setName(name);  
703 - lineString = i3GeoMap.createLineString('');  
704 - lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);  
705 - lineStringPlacemark.setGeometry(lineString);  
706 - lineString.getCoordinates().pushLatLngAlt(yi, xi, 0);  
707 - lineString.getCoordinates().pushLatLngAlt(yf, xf, 0);  
708 -  
709 - lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));  
710 - lineStringPlacemark.setSnippet(snippet);  
711 - lineStyle = lineStringPlacemark.getStyleSelector().getLineStyle();  
712 - lineStyle.setWidth(3);  
713 -  
714 - i3GeoMap.getFeatures().appendChild(lineStringPlacemark);  
715 - },  
716 - removePlacemark : function(nome) {  
717 - var features = i3GeoMap.getFeatures(), n = features.getChildNodes().getLength(), i, nfeatures = [];  
718 - for (i = 0; i < n; i++) {  
719 - try {  
720 - if (features.getChildNodes().item(i).getName() === nome || features.getChildNodes().item(i).getDescription() === nome  
721 - || features.getChildNodes().item(i).getSnippet() === nome) {  
722 - // features.getChildNodes().item(i).setVisibility(false);  
723 - nfeatures.push(features.getChildNodes().item(i));  
724 - // features.removeChild(features.getChildNodes().item(i));  
725 - }  
726 - } catch (e) {  
727 - }  
728 - }  
729 - n = nfeatures.length;  
730 - for (i = 0; i < n; i++) {  
731 - features.removeChild(nfeatures[i]);  
732 - }  
733 - }  
734 } 637 }
735 }; 638 };
736 // YAHOO.log("carregou classe desenho", "Classes i3geo"); 639 // YAHOO.log("carregou classe desenho", "Classes i3geo");
@@ -435,7 +435,7 @@ i3GEO.eventos = @@ -435,7 +435,7 @@ i3GEO.eventos =
435 posicaoMouseMapa : function(e) { 435 posicaoMouseMapa : function(e) {
436 // Utilizado pelo mapa de referencia 436 // Utilizado pelo mapa de referencia
437 // os eventos da interface googlemaps s&atilde;o definidos em i3GEO.Interface 437 // os eventos da interface googlemaps s&atilde;o definidos em i3GEO.Interface
438 - // se a interface for googleearth, googlemaps ou openlayers, os eventos s&atilde;o controlados 438 + // se a interface for googlemaps ou openlayers, os eventos s&atilde;o controlados
439 // pelas respectivas apis 439 // pelas respectivas apis
440 // caso contr&aacute;rio, o i3geo ir&aacute; controlar os c&aacute;lculos 440 // caso contr&aacute;rio, o i3geo ir&aacute; controlar os c&aacute;lculos
441 // 441 //
@@ -676,9 +676,6 @@ i3GEO.gadgets = @@ -676,9 +676,6 @@ i3GEO.gadgets =
676 ins += '</ul>'; 676 ins += '</ul>';
677 ins += '</div>'; 677 ins += '</div>';
678 objid.innerHTML = ins; 678 objid.innerHTML = ins;
679 - if (i3GEO.Interface.ATUAL === "googleearth") {  
680 - i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe = true;  
681 - }  
682 i3GEOoMenuBarLocal = new YAHOO.widget.MenuBar(id, i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI); 679 i3GEOoMenuBarLocal = new YAHOO.widget.MenuBar(id, i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);
683 onMenuBarBeforeRender = function(p_sType, p_sArgs) { 680 onMenuBarBeforeRender = function(p_sType, p_sArgs) {
684 var nomeMenu = "", nomeSub, subs = i3GEO.configura.oMenuData.submenus, conta = 0; 681 var nomeMenu = "", nomeSub, subs = i3GEO.configura.oMenuData.submenus, conta = 0;
@@ -736,9 +733,6 @@ i3GEO.gadgets = @@ -736,9 +733,6 @@ i3GEO.gadgets =
736 case "googlemaps": 733 case "googlemaps":
737 temp = "omenudataInterface4"; 734 temp = "omenudataInterface4";
738 break; 735 break;
739 - case "googleearth":  
740 - temp = "omenudataInterface5";  
741 - break;  
742 } 736 }
743 if (temp != "" && $i(temp)) { 737 if (temp != "" && $i(temp)) {
744 i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked", true); 738 i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked", true);
@@ -775,11 +769,6 @@ i3GEO.gadgets = @@ -775,11 +769,6 @@ i3GEO.gadgets =
775 "omenudataArquivos3", "omenudataJanelas1", "omenudataJanelas3" 769 "omenudataArquivos3", "omenudataJanelas1", "omenudataJanelas3"
776 ]; 770 ];
777 break; 771 break;
778 - case "googleearth":  
779 - temp = [  
780 - "omenudataFerramentas7b", "omenudataArquivos3", "omenudataJanelas3", "omenudataFerramentas2a"  
781 - ];  
782 - break;  
783 } 772 }
784 ; 773 ;
785 n = temp.length; 774 n = temp.length;
js/ini_i3geo.js
@@ -446,10 +446,6 @@ var i3GEO = { @@ -446,10 +446,6 @@ var i3GEO = {
446 temp = i3GEO.util.base64decode(preferencias.preferenciasbase64); 446 temp = i3GEO.util.base64decode(preferencias.preferenciasbase64);
447 i3GEO.mapa.aplicaPreferencias(temp); 447 i3GEO.mapa.aplicaPreferencias(temp);
448 } 448 }
449 -  
450 - if (i3GEO.Interface.ATUAL === "googleearth") {  
451 - i3GEO.configura.guardaExtensao = false;  
452 - }  
453 // obtem o cookie com a ultima extensao geografica 449 // obtem o cookie com a ultima extensao geografica
454 if (i3GEO.configura.guardaExtensao === true) { 450 if (i3GEO.configura.guardaExtensao === true) {
455 if (i3GEO.Interface.openlayers.googleLike === true) { 451 if (i3GEO.Interface.openlayers.googleLike === true) {
@@ -979,9 +975,6 @@ var i3GEO = { @@ -979,9 +975,6 @@ var i3GEO = {
979 case "googlemaps": 975 case "googlemaps":
980 i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten); 976 i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);
981 break; 977 break;
982 - case "googleearth":  
983 - i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);  
984 - break;  
985 case "openlayers": 978 case "openlayers":
986 i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); 979 i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);
987 i3geoOL.updateSize(); 980 i3geoOL.updateSize();
js/interface.js
@@ -196,7 +196,7 @@ i3GEO.Interface = @@ -196,7 +196,7 @@ i3GEO.Interface =
196 * 196 *
197 * Valores: 197 * Valores:
198 * 198 *
199 - * openlayers|googlemaps|googleearth 199 + * openlayers|googlemaps
200 * 200 *
201 * Default: 201 * Default:
202 * 202 *
@@ -414,9 +414,6 @@ i3GEO.Interface = @@ -414,9 +414,6 @@ i3GEO.Interface =
414 if (i3GEO.Interface.ATUAL === "googlemaps") { 414 if (i3GEO.Interface.ATUAL === "googlemaps") {
415 i3GEO.Interface.googlemaps.adicionaKml("foo"); 415 i3GEO.Interface.googlemaps.adicionaKml("foo");
416 } 416 }
417 - if (i3GEO.Interface.ATUAL === "googleearth") {  
418 - i3GEO.Interface.googleearth.adicionaKml("foo");  
419 - }  
420 if (i3GEO.Interface.ATUAL === "openlayers") { 417 if (i3GEO.Interface.ATUAL === "openlayers") {
421 i3GEO.Interface.openlayers.adicionaKml("foo"); 418 i3GEO.Interface.openlayers.adicionaKml("foo");
422 } 419 }
@@ -3025,714 +3022,5 @@ i3GEO.Interface = @@ -3025,714 +3022,5 @@ i3GEO.Interface =
3025 i3GEO.Interface.googlemaps.PARAMETROSLAYER += "&" + parametro + "=" + valor; 3022 i3GEO.Interface.googlemaps.PARAMETROSLAYER += "&" + parametro + "=" + valor;
3026 i3GEO.Interface.googlemaps.redesenha(); 3023 i3GEO.Interface.googlemaps.redesenha();
3027 } 3024 }
3028 - },  
3029 - /**  
3030 - * Section: i3GEO.Interface.GoogleEarth  
3031 - *  
3032 - * Interface com motor de navega&ccedil;&atilde;o baseado na API Google Earth  
3033 - *  
3034 - * Namespace:  
3035 - *  
3036 - * i3GEO.Interface.googleearth  
3037 - *  
3038 - * Utilizado quando  
3039 - *  
3040 - * i3GEO.Interface.ATUAL = "googleearth"  
3041 - *  
3042 - * Cria o objeto i3GeoMap que pode receber os m&eacute;todos da API.  
3043 - */  
3044 - googleearth : {  
3045 - /**  
3046 - * Variable: PARAMETROSLAYER  
3047 - *  
3048 - * Parametros adicionais que s&atilde;o inseridos na URL que define cada layer  
3049 - *  
3050 - * Tipo:  
3051 - *  
3052 - * {string}  
3053 - */  
3054 - PARAMETROSLAYER : "&TIPOIMAGEM=" + i3GEO.configura.tipoimagem,  
3055 - /**  
3056 - * String acrescentada a url de cada tile para garantir a remo&ccedil;&atilde;o do cache local  
3057 - *  
3058 - * Tipo:  
3059 - *  
3060 - * {string}  
3061 - */  
3062 - posfixo : "",  
3063 - /**  
3064 - * Propriedade: GADGETS  
3065 - *  
3066 - * Lista dos controles espec&iacute;ficos da API do Google Earth que ser&atilde;o inseridos ou n&atilde;o no mapa  
3067 - *  
3068 - * Tipo:  
3069 - *  
3070 - * {object}  
3071 - *  
3072 - * Default:  
3073 - *  
3074 - * (start code)  
3075 - *  
3076 - * i3GEO.Interface.googleearth.GADGETS = { setMouseNavigationEnabled : true, setStatusBarVisibility : true,  
3077 - * setOverviewMapVisibility : true, setScaleLegendVisibility : true, setAtmosphereVisibility : true, setGridVisibility : false,  
3078 - * getSun : false, LAYER_BORDERS : true, LAYER_BUILDINGS : false, LAYER_ROADS : false, LAYER_TERRAIN : true } (end)  
3079 - */  
3080 - GADGETS : {  
3081 - setMouseNavigationEnabled : true,  
3082 - setStatusBarVisibility : true,  
3083 - setOverviewMapVisibility : true,  
3084 - setScaleLegendVisibility : true,  
3085 - setAtmosphereVisibility : true,  
3086 - setGridVisibility : false,  
3087 - getSun : false,  
3088 - LAYER_BORDERS : true,  
3089 - LAYER_BUILDINGS : false,  
3090 - LAYER_ROADS : false,  
3091 - LAYER_TERRAIN : true  
3092 - },  
3093 - POSICAOTELA : [  
3094 - 0, 0  
3095 - ],  
3096 - aguarde : "",  
3097 - ligaDesliga : function(obj) {  
3098 - var layer = i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value), temp = function() {  
3099 - i3GEO.mapa.legendaHTML.atualiza();  
3100 - }, desligar = "", ligar = "";  
3101 - if (obj.checked) {  
3102 - i3GEO.arvoreDeCamadas.alteraPropCamadas("status", "2", obj.value);  
3103 - ligar = obj.value;  
3104 - } else {  
3105 - i3GEO.arvoreDeCamadas.alteraPropCamadas("status", "0", obj.value);  
3106 - desligar = obj.value;  
3107 - }  
3108 - layer.setVisibility(obj.checked);  
3109 - if (desligar !== "" || ligar !== "") {  
3110 - i3GEO.php.ligatemas(temp, desligar, ligar);  
3111 - }  
3112 - },  
3113 - atualizaTema : function(retorno, tema) {  
3114 - var layer = i3GEO.Interface.googleearth.retornaObjetoLayer(tema), hr = layer.getLink().getHref(), objtemas;  
3115 - // layer.getLink().setRefreshMode(2);  
3116 - // layer.getLink().setRefreshInterval(1);  
3117 - hr = hr.replace("&&&&&&&&&&&&&&&&&&&", "");  
3118 - layer.getLink().setHref(hr + "&");  
3119 - if (retorno === "") {  
3120 - return;  
3121 - }  
3122 - objtemas = i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);  
3123 - i3GEO.Interface.googleearth.recalcPar();  
3124 - try {  
3125 - i3GEO.arvoreDeCamadas.atualiza(objtemas);  
3126 - } catch (e) {  
3127 - i3GEO.arvoreDeCamadas.atualiza();  
3128 - }  
3129 - i3GEO.janela.fechaAguarde();  
3130 - },  
3131 - redesenha : function() {  
3132 - i3GEO.Interface.googleearth.posfixo += "&";  
3133 - var nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length, i, camada, indice;  
3134 - for (i = 0; i < nlayers; i++) {  
3135 - camada = i3GEO.arvoreDeCamadas.CAMADAS[i];  
3136 - indice = i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);  
3137 - if (indice !== false) {  
3138 - try {  
3139 - i3GeoMap.getFeatures().removeChild(indice);  
3140 - } catch (e) {  
3141 - }  
3142 - }  
3143 - }  
3144 - i3GEO.Interface.googleearth.criaLayers();  
3145 - },  
3146 - cria : function(w, h) {  
3147 - var i, i3GeoMap3d, texto;  
3148 - i3GEO.configura.listaDePropriedadesDoMapa = {  
3149 - "propriedades" : [  
3150 - {  
3151 - text : "p2",  
3152 - url : "javascript:i3GEO.mapa.dialogo.tipoimagem()"  
3153 - }, {  
3154 - text : "p3",  
3155 - url : "javascript:i3GEO.mapa.dialogo.opcoesLegenda()"  
3156 - }, {  
3157 - text : "p4",  
3158 - url : "javascript:i3GEO.mapa.dialogo.opcoesEscala()"  
3159 - }, {  
3160 - text : "p8",  
3161 - url : "javascript:i3GEO.mapa.dialogo.queryMap()"  
3162 - }, {  
3163 - text : "p9",  
3164 - url : "javascript:i3GEO.mapa.dialogo.corFundo()"  
3165 - }, {  
3166 - text : "p10",  
3167 - url : "javascript:i3GEO.mapa.dialogo.gradeCoord()"  
3168 - }  
3169 - ]  
3170 - };  
3171 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3172 - if (i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled === true) {  
3173 - texto += "CHECKED ";  
3174 - }  
3175 - texto += " onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";  
3176 - texto += "> " + $trad("ge1");  
3177 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3178 - text : texto,  
3179 - url : ""  
3180 - });  
3181 -  
3182 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3183 - if (i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility === true) {  
3184 - texto += "CHECKED ";  
3185 - }  
3186 - texto += " onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";  
3187 - texto += "> " + $trad("ge2");  
3188 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3189 - text : texto,  
3190 - url : ""  
3191 - });  
3192 -  
3193 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3194 - if (i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility === true) {  
3195 - texto += "CHECKED ";  
3196 - }  
3197 - texto += " onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";  
3198 - texto += "> " + $trad("ge3");  
3199 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3200 - text : texto,  
3201 - url : ""  
3202 - });  
3203 -  
3204 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3205 - if (i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility === true) {  
3206 - texto += "CHECKED ";  
3207 - }  
3208 - texto += " onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";  
3209 - texto += "> " + $trad("ge4");  
3210 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3211 - text : texto,  
3212 - url : ""  
3213 - });  
3214 -  
3215 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3216 - if (i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility === true) {  
3217 - texto += "CHECKED ";  
3218 - }  
3219 - texto += " onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";  
3220 - texto += "> " + $trad("ge5");  
3221 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3222 - text : texto,  
3223 - url : ""  
3224 - });  
3225 -  
3226 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3227 - if (i3GEO.Interface.googleearth.GADGETS.setGridVisibility === true) {  
3228 - texto += "CHECKED ";  
3229 - }  
3230 - texto += " onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";  
3231 - texto += "> " + $trad("ge6");  
3232 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3233 - text : texto,  
3234 - url : ""  
3235 - });  
3236 -  
3237 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3238 - if (i3GEO.Interface.googleearth.GADGETS.getSun === true) {  
3239 - texto += "CHECKED ";  
3240 - }  
3241 - texto += " onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";  
3242 - texto += "> " + $trad("ge7");  
3243 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3244 - text : texto,  
3245 - url : ""  
3246 - });  
3247 -  
3248 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3249 - if (i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS === true) {  
3250 - texto += "CHECKED ";  
3251 - }  
3252 - texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";  
3253 - texto += "> " + $trad("ge8");  
3254 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3255 - text : texto,  
3256 - url : ""  
3257 - });  
3258 -  
3259 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3260 - if (i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS === true) {  
3261 - texto += "CHECKED ";  
3262 - }  
3263 - texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";  
3264 - texto += "> " + $trad("ge9");  
3265 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3266 - text : texto,  
3267 - url : ""  
3268 - });  
3269 -  
3270 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3271 - if (i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS === true) {  
3272 - texto += "CHECKED ";  
3273 - }  
3274 - texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";  
3275 - texto += "> " + $trad("ge10");  
3276 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3277 - text : texto,  
3278 - url : ""  
3279 - });  
3280 -  
3281 - texto = "<input type=checkbox style='vertical-align:top;cursor:pointer' ";  
3282 - if (i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN === true) {  
3283 - texto += "CHECKED ";  
3284 - }  
3285 - texto += " onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";  
3286 - texto += "> " + $trad("ge11");  
3287 - i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({  
3288 - text : texto,  
3289 - url : ""  
3290 - });  
3291 - i3GEO.util.arvore("<b>" + $trad("p13") + "</b>", "listaPropriedades", i3GEO.configura.listaDePropriedadesDoMapa);  
3292 -  
3293 - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli = false;  
3294 - i3GEO.barraDeBotoes.INCLUIBOTAO.pan = false;  
3295 - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot = false;  
3296 - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomproximo = false;  
3297 - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomanterior = false;  
3298 - i3GEO.Interface.IDMAPA = "i3GeoMap3d";  
3299 - if (i3GEO.arvoreDeCamadas.ATIVATEMA === "") {  
3300 - i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.googleearth.ligaDesliga(this)";  
3301 - }  
3302 - i = $i(i3GEO.Interface.IDCORPO);  
3303 - if (i) {  
3304 - i3GeoMap3d = document.createElement("div");  
3305 - i3GeoMap3d.style.width = w + "px";  
3306 - i3GeoMap3d.style.height = h + "px";// + 45;  
3307 - i.style.height = h;// + 45;  
3308 - i3GeoMap3d.id = "i3GeoMap3d";  
3309 - i3GeoMap3d.style.zIndex = 0;  
3310 - i.appendChild(i3GeoMap3d);  
3311 - }  
3312 - google.load("earth", "1");  
3313 - },  
3314 - inicia : function() {  
3315 - google.earth.createInstance("i3GeoMap3d", i3GEO.Interface.googleearth.iniciaGE, i3GEO.Interface.googleearth.falha);  
3316 - },  
3317 - iniciaGE : function(object) {  
3318 - var montaMapa = function(retorno) {  
3319 - i3GeoMap = object;  
3320 - i3GeoMap.getWindow().setVisibility(true);  
3321 - i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);  
3322 - i3GEO.Interface.googleearth.criaLayers();  
3323 -  
3324 - var options = i3GeoMap.getOptions(), layerRoot = i3GeoMap.getLayerRoot();  
3325 -  
3326 - options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);  
3327 - options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);  
3328 - options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);  
3329 - options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);  
3330 - options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);  
3331 - options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);  
3332 -  
3333 - layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);  
3334 - layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);  
3335 - layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);  
3336 - layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);  
3337 - i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);  
3338 - i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);  
3339 -  
3340 - i3GEO.Interface.googleearth.POSICAOTELA = YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));  
3341 - //  
3342 - // i3GEO.arvoreDeCamadas.CAMADAS &eacute; definido na  
3343 - // inicializa&ccedil;&atilde;o (classe_i3geo)  
3344 - //  
3345 - i3GEO.arvoreDeCamadas.cria("", i3GEO.arvoreDeCamadas.CAMADAS, i3GEO.configura.sid, i3GEO.configura.locaplic);  
3346 - i3GEO.gadgets.mostraMenuSuspenso();  
3347 - i3GEO.gadgets.mostraMenuLista();  
3348 - i3GEO.Interface.googleearth.ativaBotoes();  
3349 - i3GEO.gadgets.mostraInserirKml("inserirKml");  
3350 - if (i3GEO.arvoreDeCamadas.MOSTRALISTAKML === true) {  
3351 - i3GEO.Interface.googleearth.adicionaListaKml();  
3352 - }  
3353 - i3GEO.Interface.googleearth.registraEventos();  
3354 -  
3355 - if (i3GEO.parametros.kmlurl !== "") {  
3356 - i3GEO.Interface.googleearth.adicionaKml(true, i3GEO.parametros.kmlurl, i3GEO.parametros.kmlurl, false);  
3357 - }  
3358 - // executa fun&ccedil;&atilde;o de finaliza&ccedil;&atilde;o, se  
3359 - // houver  
3360 - if (YAHOO.lang.isFunction(i3GEO.finalizaAPI)) {  
3361 - i3GEO.finalizaAPI.call();  
3362 - } else {  
3363 - if (i3GEO.finalizaAPI != "") {  
3364 - eval(i3GEO.finalizaAPI);  
3365 - }  
3366 - }  
3367 - i3GEO.configura.iniciaFerramentas.executa();  
3368 - };  
3369 - i3GEO.php.googleearth(montaMapa);  
3370 - },  
3371 - criaLayers : function() {  
3372 - var nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length - 1, i, camada, indice, layer;  
3373 - for (i = nlayers; i >= 0; i--) {  
3374 - camada = i3GEO.arvoreDeCamadas.CAMADAS[i];  
3375 - indice = i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);  
3376 - layer = i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);  
3377 - // nao mude para ===  
3378 - if (indice == false) {  
3379 - layer = i3GEO.Interface.googleearth.insereLayer(camada.name);  
3380 - }  
3381 - try {  
3382 - if (camada.status != 0) {  
3383 - layer.setVisibility(true);  
3384 - } else {  
3385 - layer.setVisibility(false);  
3386 - }  
3387 - } catch (e) {  
3388 - }  
3389 - }  
3390 - },  
3391 - insereLayer : function(nomeLayer) {  
3392 - var kmlUrl =  
3393 - i3GEO.configura.locaplic + "/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="  
3394 - + i3GEO.configura.sid  
3395 - + "&layer="  
3396 - + nomeLayer  
3397 - + i3GEO.Interface.googleearth.PARAMETROSLAYER  
3398 - + "&r="  
3399 - + Math.random(), linki3geo = i3GeoMap.createLink(''), nl = i3GeoMap.createNetworkLink('');  
3400 - linki3geo.setHref(kmlUrl + i3GEO.Interface.googleearth.posfixo);  
3401 - nl.setLink(linki3geo);  
3402 - nl.setFlyToView(false);  
3403 - nl.setName(nomeLayer);  
3404 - i3GeoMap.getFeatures().appendChild(nl);  
3405 - return nl;  
3406 - },  
3407 - retornaIndiceLayer : function(nomeLayer) {  
3408 - var n = i3GeoMap.getFeatures().getChildNodes().getLength(), indice = 0, i = 0;  
3409 - if (n > 0) {  
3410 - for (i = 0; i < n; i++) {  
3411 - if (i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer) {  
3412 - indice = i;  
3413 - }  
3414 - }  
3415 - return indice;  
3416 - } else {  
3417 - return false;  
3418 - }  
3419 - },  
3420 - aplicaOpacidade : function(opacidade) {  
3421 - var n = i3GeoMap.getFeatures().getChildNodes().getLength(), i;  
3422 - for (i = 0; i < n; i++) {  
3423 - i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade);  
3424 - }  
3425 - },  
3426 - retornaObjetoLayer : function(nomeLayer) {  
3427 - var n = i3GeoMap.getFeatures().getChildNodes().getLength(), indice = false, i;  
3428 - for (i = 0; i < n; i++) {  
3429 - if (i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer) {  
3430 - indice = i3GeoMap.getFeatures().getChildNodes().item(i);  
3431 - }  
3432 - }  
3433 - return indice;  
3434 - },  
3435 - registraEventos : function() {  
3436 - google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function(e) {  
3437 - i3GEO.Interface.googleearth.recalcPar();  
3438 - i3GEO.eventos.cliquePerm.status = false;  
3439 - // guarda a extensao geografica atual  
3440 - i3GEO.navega.registraExt(i3GEO.parametros.mapexten);  
3441 - });  
3442 - google.earth.addEventListener(i3GeoMap.getGlobe(), 'mousemove', function(event) {  
3443 - d = i3GEO.calculo.dd2dms(event.getLongitude(), event.getLatitude());  
3444 - objposicaocursor = {  
3445 - ddx : event.getLongitude(),  
3446 - ddy : event.getLatitude(),  
3447 - dmsx : d[0],  
3448 - dmsy : d[1],  
3449 - imgx : event.getClientX(),  
3450 - imgy : event.getClientY(),  
3451 - telax : event.getClientX() + i3GEO.Interface.googleearth.POSICAOTELA[0],  
3452 - telay : event.getClientY() + i3GEO.Interface.googleearth.POSICAOTELA[1]  
3453 - };  
3454 - i3GEO.eventos.mousemoveMapa();  
3455 - });  
3456 - google.earth.addEventListener(i3GeoMap.getGlobe(), 'click', function(event) {  
3457 - if (i3GEO.Interface.googleearth.aguarde.visibility === "hidden") {  
3458 - i3GEO.eventos.mousecliqueMapa();  
3459 - } else {  
3460 - i3GEO.Interface.googleearth.aguarde.visibility = "hidden";  
3461 - }  
3462 - });  
3463 - },  
3464 - recalcPar : function() {  
3465 - var bounds;  
3466 - bounds = i3GeoMap.getView().getViewportGlobeBounds();  
3467 - i3GEO.parametros.mapexten = bounds.getWest() + " " + bounds.getSouth() + " " + bounds.getEast() + " " + bounds.getNorth();  
3468 - // i3GEO.parametros.mapscale =  
3469 - // i3GEO.Interface.googlemaps.calcescala();  
3470 - },  
3471 - falha : function() {  
3472 - alert("Falhou. Vc precisa do plugin instalado");  
3473 - },  
3474 - ativaBotoes : function() {  
3475 - var cabecalho = function() {  
3476 - i3GEO.barraDeBotoes.ativaIcone("");  
3477 - }, minimiza = function() {  
3478 - i3GEO.janela.minimiza("i3GEOF.ferramentasGE");  
3479 - }, janela =  
3480 - i3GEO.janela  
3481 - .cria("230px", "110px", "", "", "", $trad("u15a"), "i3GEOF.ferramentasGE", false, "hd", cabecalho, minimiza);  
3482 - $i("i3GEOF.ferramentasGE_c").style.zIndex = 100;  
3483 - i3GEO.barraDeBotoes.TEMPLATEBOTAO =  
3484 - '<div style="display:inline;background-color:rgb(250,250,250);"><img src="' + i3GEO.configura.locaplic  
3485 - + '/imagens/branco.gif" id="$$"/></div>&nbsp;';  
3486 - i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2", "", false, "200", "200", janela[2].id);  
3487 - i3GEO.barraDeBotoes.ativaBotoes();  
3488 - i3GEO.Interface.googleearth.aguarde = $i("i3GEOF.ferramentasGE_imagemCabecalho").style;  
3489 - $i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right = "0px";  
3490 - $i("i3GEOF.ferramentasGE").lastChild.style.display = "none";  
3491 - i3GEO.ajuda.abreJanela();  
3492 - },  
3493 - balao : function(texto, completo, ddx, ddy) {  
3494 - var placemark = i3GeoMap.createPlacemark(''), point = i3GeoMap.createPoint(''), b;  
3495 - point.setLatitude(ddy);  
3496 - point.setLongitude(ddx);  
3497 - placemark.setGeometry(point);  
3498 - b = i3GeoMap.createHtmlStringBalloon('');  
3499 - b.setContentString("<div style=text-align:left >" + texto + "</div>");  
3500 - b.setFeature(placemark);  
3501 - i3GeoMap.setBalloon(b);  
3502 - },  
3503 - /**  
3504 - * Function: adicionaKml  
3505 - *  
3506 - * Insere no mapa uma camada KML com base na API do Google Earth  
3507 - *  
3508 - * As camadas adicionadas s&atilde;o crescentadas na &aacute;rvore de camadas  
3509 - *  
3510 - * A lista de nomes dos objetos geoXml criados &eacute; mantida em i3GEO.mapas.GEOXML  
3511 - *  
3512 - * Parametros:  
3513 - *  
3514 - * {Boolean} - define se o mapa ser&aacute; deslocado para encaixar o KML  
3515 - *  
3516 - * {String} - URL do arquivo KML. Se n&atilde;o for definido, a URL ser&aacute; obtida do INPUT com id = i3geo_urlkml (veja  
3517 - * i3GEO.gadgets.mostraInserirKml)  
3518 - *  
3519 - * {string} - titulo que aparecer&aacute; na &aacute;rvore. Se n&atilde;o for definido, ser&aacute; calculado aleatoriamente.  
3520 - *  
3521 - * {boolean} - indica se a camada estar&aacute; ativa ou n&atilde;o. Se n&atilde;o for definido, ser&aacute; considerado como  
3522 - * true  
3523 - */  
3524 - adicionaKml : function(pan, url, titulo, ativo) {  
3525 - var ngeoxml, i;  
3526 - if (!$i("arvoreCamadasKml")) {  
3527 - i3GEO.Interface.googleearth.criaArvoreKML();  
3528 - }  
3529 - ngeoxml = "geoXml_" + i3GEO.mapa.GEOXML.length;  
3530 - if (arguments.length === 1) {  
3531 - i = $i("i3geo_urlkml");  
3532 - if (i) {  
3533 - url = i.value;  
3534 - } else {  
3535 - url = "";  
3536 - }  
3537 - titulo = ngeoxml;  
3538 - ativo = false;  
3539 - }  
3540 - if (arguments.length === 2) {  
3541 - titulo = ngeoxml;  
3542 - ativo = true;  
3543 - }  
3544 - if (arguments.length === 2) {  
3545 - ativo = true;  
3546 - }  
3547 - if (url === "") {  
3548 - return;  
3549 - }  
3550 - i3GEO.mapa.GEOXML.push(ngeoxml);  
3551 - linki3geokml = i3GeoMap.createLink('');  
3552 - if (url.split("http").length === 1) {  
3553 - url = i3GEO.util.protocolo() + "://" + window.location.host + url;  
3554 - }  
3555 - linki3geokml.setHref(url);  
3556 - eval(ngeoxml + " = i3GeoMap.createNetworkLink('')");  
3557 - eval(ngeoxml + ".setLink(linki3geokml)");  
3558 - if (i3GEO.arvoreDeCamadas.MOSTRALISTAKML === false) {  
3559 - i3GEO.arvoreDeCamadas.MOSTRALISTAKML = true;  
3560 - i3GEO.Interface.googleearth.criaArvoreKML();  
3561 - }  
3562 - i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url, titulo, ativo, ngeoxml);  
3563 - },  
3564 - adicionaListaKml : function() {  
3565 - var monta = function(retorno) {  
3566 - var raiz, nraiz, i;  
3567 - raiz = retorno.data.canais;  
3568 - nraiz = raiz.length;  
3569 - for (i = 0; i < nraiz; i++) {  
3570 - i3GEO.Interface.googleearth.adicionaKml(false, raiz[i].link, raiz[i].title, false);  
3571 - }  
3572 - };  
3573 - i3GEO.php.listaRSSwsARRAY(monta, "KML");  
3574 - },  
3575 - /**  
3576 - *  
3577 - * Acrescenta na &aacute;rvore de camadas um novo tema no n&oacute; que mostra os arquivos KML inseridos no mapa  
3578 - *  
3579 - * Os temas s&atilde;o inclu&iacute;dos em um n&oacute; chamado "Google Earth".  
3580 - *  
3581 - * Para obter esse n&oacute; utilize var node = i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idkml","raiz");  
3582 - *  
3583 - * Parametros:  
3584 - *  
3585 - * url {string} - url do arquivo KML  
3586 - *  
3587 - * nomeOverlay {string} - t&iacute;tulo do tema  
3588 - *  
3589 - * ativo {boolean} - indica o estado do checkbox  
3590 - *  
3591 - * id {string} - nome do objeto GGeoXml  
3592 - */  
3593 - adicionaNoArvoreGoogle : function(url, nomeOverlay, ativo, id) {  
3594 - var node, d, nodekml;  
3595 - if (!$i("arvoreCamadasKml")) {  
3596 - i3GEO.Interface.googleearth.criaArvoreKML();  
3597 - }  
3598 - if (arguments.length === 2) {  
3599 - ativo = true;  
3600 - id = nomeOverlay;  
3601 - }  
3602 - if (arguments.length === 2) {  
3603 - id = nomeOverlay;  
3604 - }  
3605 - node = i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml", "raiz");  
3606 - html =  
3607 - "<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='" + id  
3608 - + "'";  
3609 - if (ativo === true) {  
3610 - html += " checked ";  
3611 - }  
3612 - html += "/>";  
3613 - html += "&nbsp;<span style='cursor:move'>" + nomeOverlay + "</span>";  
3614 - d = {  
3615 - html : html  
3616 - };  
3617 - nodekml = new YAHOO.widget.HTMLNode(d, node, true, true);  
3618 - nodekml.enableHighlight = false;  
3619 - nodekml.isleaf = true;  
3620 - i3GEO.Interface.googleearth.ARVORE.draw();  
3621 - i3GEO.Interface.googleearth.ARVORE.collapseAll();  
3622 - node.expand();  
3623 - },  
3624 - criaArvoreKML : function() {  
3625 - var arvore, a, root, titulo, d, node;  
3626 - arvore = $i("arvoreCamadasKml");  
3627 - if (!arvore) {  
3628 - d = document.createElement("div");  
3629 - d.id = "arvoreCamadasKml";  
3630 - d.style.top = "40px";  
3631 - a = $i(i3GEO.arvoreDeCamadas.IDHTML);  
3632 - if (a) {  
3633 - a.parentNode.appendChild(d);  
3634 - } else {  
3635 - return;  
3636 - }  
3637 - }  
3638 - i3GEO.Interface.googleearth.ARVORE = new YAHOO.widget.TreeView("arvoreCamadasKml");  
3639 - root = i3GEO.Interface.googleearth.ARVORE.getRoot();  
3640 - titulo = "<table><tr><td><b>Google Earth Kml</b></td></tr></table>";  
3641 - d = {  
3642 - html : titulo,  
3643 - idkml : "raiz"  
3644 - };  
3645 - node = new YAHOO.widget.HTMLNode(d, root, true, true);  
3646 - node.enableHighlight = false;  
3647 - if (i3GEO.parametros.editor === "sim") {  
3648 - d =  
3649 - new YAHOO.widget.HTMLNode(  
3650 - {  
3651 - html : "<a style='color:red' title='op&ccedil;&atilde;o vis&iacute;vel apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",  
3652 - idmenu : "",  
3653 - enableHighlight : false,  
3654 - expanded : false  
3655 - },  
3656 - node);  
3657 - }  
3658 - },  
3659 - existeLink : function(url) {  
3660 - var existe = false, features = i3GeoMap.getFeatures(), n = features.getChildNodes().getLength(), i;  
3661 - for (i = 0; i < n; i++) {  
3662 - try {  
3663 - if (features.getChildNodes().item(i).getLink().getHref() === url) {  
3664 - existe = true;  
3665 - }  
3666 - } catch (e) {  
3667 - }  
3668 - }  
3669 - return (existe);  
3670 - },  
3671 - ativaDesativaLink : function(url, valor) {  
3672 - var features = i3GeoMap.getFeatures(), n = features.getChildNodes().getLength(), i;  
3673 - for (i = 0; i < n; i++) {  
3674 - try {  
3675 - if (features.getChildNodes().item(i).getLink().getHref() === url) {  
3676 - features.getChildNodes().item(i).setVisibility(valor);  
3677 - }  
3678 - } catch (e) {  
3679 - }  
3680 - }  
3681 - },  
3682 - /**  
3683 - *  
3684 - * Ativa ou desativa uma camada do n&oacute; de layers KML  
3685 - *  
3686 - * Parametro:  
3687 - *  
3688 - * obj {object} - objeto do tipo checkbox que foi ativado/desativado  
3689 - */  
3690 - ativaDesativaCamadaKml : function(obj) {  
3691 - var url = eval(obj.value + ".getLink().getHref()"), existe = i3GEO.Interface.googleearth.existeLink(url);  
3692 - if (!obj.checked) {  
3693 - i3GEO.Interface.googleearth.ativaDesativaLink(url, false);  
3694 - } else {  
3695 - if (existe === false) {  
3696 - eval("i3GeoMap.getFeatures().appendChild(" + obj.value + ")");  
3697 - } else {  
3698 - i3GEO.Interface.googleearth.ativaDesativaLink(url, true);  
3699 - }  
3700 - }  
3701 - },  
3702 - zoom2extent : function(mapexten) {  
3703 - var r = 6378700, lng2, lng1, lat1, lat2, ret = mapexten.split(" "), fov = 32, camera =  
3704 - i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND), dy, dx, d, dist, alt;  
3705 - lng2 = (ret[0] * 1);  
3706 - lng1 = (ret[2] * 1);  
3707 - lat1 = (ret[1] * 1);  
3708 - lat2 = (ret[3] * 1);  
3709 - camera.setLatitude((lat1 + lat2) / 2.0);  
3710 - camera.setLongitude((lng1 + lng2) / 2.0);  
3711 - camera.setHeading(0.0);  
3712 - camera.setTilt(0.0);  
3713 - // determine if the rectangle is portrait or landscape  
3714 - dy = Math.max(lat1, lat2) - Math.min(lat1, lat2);  
3715 - dx = Math.max(lng1, lng2) - Math.min(lng1, lng2);  
3716 - // find the longest side  
3717 - d = Math.max(dy, dx);  
3718 - // convert the longest side degrees to radians  
3719 - d = d * Math.PI / 180.0;  
3720 - // find half the chord length  
3721 - dist = r * Math.tan(d / 2);  
3722 - // get the altitude using the chord length  
3723 - alt = dist / (Math.tan(fov * Math.PI / 180.0));  
3724 - if (alt < 0) {  
3725 - alt = alt * -1;  
3726 - }  
3727 - camera.setAltitude(alt);  
3728 - i3GeoMap.getView().setAbstractView(camera);  
3729 - },  
3730 - alteraParametroLayers : function(parametro, valor) {  
3731 - parametro = parametro.toUpperCase();  
3732 - var reg = new RegExp(parametro + "([=])+([a-zA-Z0-9_]*)");  
3733 - i3GEO.Interface.googleearth.PARAMETROSLAYER = i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg, "");  
3734 - i3GEO.Interface.googleearth.PARAMETROSLAYER += "&" + parametro + "=" + valor;  
3735 - i3GEO.Interface.googleearth.redesenha();  
3736 - }  
3737 } 3025 }
3738 }; 3026 };
@@ -310,10 +310,6 @@ i3GEO.janela = @@ -310,10 +310,6 @@ i3GEO.janela =
310 modal = false; 310 modal = false;
311 } 311 }
312 ifr = false; 312 ifr = false;
313 - if (i3GEO.Interface && i3GEO.Interface != undefined && i3GEO.Interface.ATUAL === "googleearth") {  
314 - i3GEO.janela.TRANSICAOSUAVE = false;  
315 - ifr = true;  
316 - }  
317 fix = "contained"; 313 fix = "contained";
318 if (nx === "" || nx === "center") { 314 if (nx === "" || nx === "center") {
319 fix = true; 315 fix = true;
@@ -454,13 +450,6 @@ i3GEO.janela = @@ -454,13 +450,6 @@ i3GEO.janela =
454 janela.render(); 450 janela.render();
455 janela.bringToTop(); 451 janela.bringToTop();
456 452
457 - // ajusta estilos e outras caracter&iacute;sticas da janela criada  
458 - if (navm && id !== "i3geo_janelaMensagens"  
459 - && i3GEO.Interface  
460 - && i3GEO.Interface != undefined  
461 - && i3GEO.Interface.ATUAL === "googleearth") {  
462 - janela.moveTo(0, 0);  
463 - }  
464 if (ifr === true) { 453 if (ifr === true) {
465 janela.iframe.style.zIndex = 4; 454 janela.iframe.style.zIndex = 4;
466 } 455 }
@@ -771,11 +760,7 @@ i3GEO.janela = @@ -771,11 +760,7 @@ i3GEO.janela =
771 altura = 70; 760 altura = 70;
772 janela.body.style.padding = "5px"; 761 janela.body.style.padding = "5px";
773 janela.body.style.backgroundColor = "yellow"; 762 janela.body.style.backgroundColor = "yellow";
774 - if (i3GEO.Interface && i3GEO.Interface.ATUAL != "googleearth") {  
775 - janela.body.style.height = "0px";  
776 - } else {  
777 - janela.body.style.height = altura + "px";  
778 - } 763 + janela.body.style.height = "0px";
779 janela.body.style.overflow = "hidden"; 764 janela.body.style.overflow = "hidden";
780 janela.body.onclick = function() { 765 janela.body.onclick = function() {
781 var janela = YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg"); 766 var janela = YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");
@@ -790,20 +775,18 @@ i3GEO.janela = @@ -790,20 +775,18 @@ i3GEO.janela =
790 janela.moveTo(pos[0], pos[1]); 775 janela.moveTo(pos[0], pos[1]);
791 } 776 }
792 janela.show(); 777 janela.show();
793 - if (i3GEO.Interface && i3GEO.Interface.ATUAL != "googleearth") {  
794 - attributes = {  
795 - height : {  
796 - to : altura  
797 - }  
798 - };  
799 - anim = new YAHOO.util.Anim(janela.body, attributes, .5, YAHOO.util.Easing.easeNone);  
800 - anim.onComplete.subscribe(function() {  
801 - janela.body.style.overflow = "auto";  
802 - janela.body.style.display = "block";  
803 - $i("i3geoTempoMsg_c").style.zIndex = 100000;  
804 - });  
805 - anim.animate();  
806 - } 778 + attributes = {
  779 + height : {
  780 + to : altura
  781 + }
  782 + };
  783 + anim = new YAHOO.util.Anim(janela.body, attributes, .5, YAHOO.util.Easing.easeNone);
  784 + anim.onComplete.subscribe(function() {
  785 + janela.body.style.overflow = "auto";
  786 + janela.body.style.display = "block";
  787 + $i("i3geoTempoMsg_c").style.zIndex = 100000;
  788 + });
  789 + anim.animate();
807 // YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE 790 // YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE
808 // / 100); 791 // / 100);
809 if (!tempo) { 792 if (!tempo) {
@@ -811,22 +794,18 @@ i3GEO.janela = @@ -811,22 +794,18 @@ i3GEO.janela =
811 } 794 }
812 setTimeout(function() { 795 setTimeout(function() {
813 var attributes, anim, janela = YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg"); 796 var attributes, anim, janela = YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");
814 - if (i3GEO.Interface && i3GEO.Interface.ATUAL != "googleearth") {  
815 - if (janela) {  
816 - janela.body.style.overflow = "hidden";  
817 - attributes = {  
818 - height : {  
819 - to : 0  
820 - }  
821 - };  
822 - anim = new YAHOO.util.Anim(janela.body, attributes, .5, YAHOO.util.Easing.easeNone);  
823 - anim.onComplete.subscribe(function() {  
824 - janela.destroy();  
825 - });  
826 - anim.animate();  
827 - }  
828 - } else {  
829 - janela.destroy(); 797 + if (janela) {
  798 + janela.body.style.overflow = "hidden";
  799 + attributes = {
  800 + height : {
  801 + to : 0
  802 + }
  803 + };
  804 + anim = new YAHOO.util.Anim(janela.body, attributes, .5, YAHOO.util.Easing.easeNone);
  805 + anim.onComplete.subscribe(function() {
  806 + janela.destroy();
  807 + });
  808 + anim.animate();
830 } 809 }
831 }, tempo); 810 }, tempo);
832 811
@@ -1343,11 +1343,6 @@ i3GEO.mapa = @@ -1343,11 +1343,6 @@ i3GEO.mapa =
1343 i3GEO.eventos.removeEventos("MOUSEPARADO", [ 1343 i3GEO.eventos.removeEventos("MOUSEPARADO", [
1344 "verificaTip()" 1344 "verificaTip()"
1345 ]); 1345 ]);
1346 - // na interface googleearth verifica se existe mais eventos no  
1347 - // mouseclick  
1348 - if (i3GEO.Interface.ATUAL === "googleearth" && i3GEO.eventos.MOUSECLIQUE.length > 1) {  
1349 - return;  
1350 - }  
1351 // javascript nao foi carregado 1346 // javascript nao foi carregado
1352 if (typeof (i3GEOF.identifica) === 'undefined') { 1347 if (typeof (i3GEOF.identifica) === 'undefined') {
1353 // javascript que sera carregado 1348 // javascript que sera carregado
@@ -1383,11 +1378,6 @@ i3GEO.mapa = @@ -1383,11 +1378,6 @@ i3GEO.mapa =
1383 } else { 1378 } else {
1384 i3GEO.eventos.cliquePerm.status = false; 1379 i3GEO.eventos.cliquePerm.status = false;
1385 } 1380 }
1386 - // na interface googleearth verifica se existe mais eventos no  
1387 - // mouseclick  
1388 - if (i3GEO.Interface.ATUAL === "googleearth" && i3GEO.eventos.MOUSECLIQUE.length > 1) {  
1389 - return;  
1390 - }  
1391 var ntemas, etiquetas, j, retorna, x = objposicaocursor.ddx, y = objposicaocursor.ddy; 1381 var ntemas, etiquetas, j, retorna, x = objposicaocursor.ddx, y = objposicaocursor.ddy;
1392 if(x === -1 || y === -1){ 1382 if(x === -1 || y === -1){
1393 return; 1383 return;
@@ -1405,9 +1395,6 @@ i3GEO.mapa = @@ -1405,9 +1395,6 @@ i3GEO.mapa =
1405 if (etiquetas === false) { 1395 if (etiquetas === false) {
1406 return; 1396 return;
1407 } 1397 }
1408 - if (i3GEO.Interface.ATUAL === "googleearth") {  
1409 - i3GEO.Interface.googleearth.aguarde.visibility = "visible";  
1410 - }  
1411 retorna = 1398 retorna =
1412 function(retorno) { 1399 function(retorno) {
1413 var textoCompleto = "", textoSimples = "", textoTempCompleto = "", textoTempSimples = "", classeCor, temp, n, mostra, res, temas, ntemas, titulo, tips, j, ntips, r, ds, nds, s, configura = 1400 var textoCompleto = "", textoSimples = "", textoTempCompleto = "", textoTempSimples = "", classeCor, temp, n, mostra, res, temas, ntemas, titulo, tips, j, ntips, r, ds, nds, s, configura =
@@ -178,10 +178,6 @@ i3GEO.php = @@ -178,10 +178,6 @@ i3GEO.php =
178 i3GeoMap.overlayMapTypes.removeAt(indice); 178 i3GeoMap.overlayMapTypes.removeAt(indice);
179 } 179 }
180 } 180 }
181 - if (i3GEO.Interface.ATUAL === "googleearth") {  
182 - indice = i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);  
183 - i3GeoMap.getFeatures().removeChild(indice);  
184 - }  
185 } 181 }
186 funcao.call(funcao, retorno); 182 funcao.call(funcao, retorno);
187 }; 183 };
@@ -622,11 +618,6 @@ i3GEO.php = @@ -622,11 +618,6 @@ i3GEO.php =
622 i3GEO.Interface.googlemaps.zoom2extent(ext); 618 i3GEO.Interface.googlemaps.zoom2extent(ext);
623 } 619 }
624 break; 620 break;
625 - case "googleearth":  
626 - if (atualiza === true) {  
627 - i3GEO.Interface.googleearth.zoom2extent(ext);  
628 - }  
629 - break;  
630 case "openlayers": 621 case "openlayers":
631 i3GEO.Interface.openlayers.zoom2ext(ext); 622 i3GEO.Interface.openlayers.zoom2ext(ext);
632 break; 623 break;
@@ -809,10 +800,6 @@ i3GEO.php = @@ -809,10 +800,6 @@ i3GEO.php =
809 i3GEO.Interface.googlemaps.zoom2extent(retorno.data.variaveis.mapexten); 800 i3GEO.Interface.googlemaps.zoom2extent(retorno.data.variaveis.mapexten);
810 i3GEO.atualizaParametros(retorno.data.variaveis); 801 i3GEO.atualizaParametros(retorno.data.variaveis);
811 break; 802 break;
812 - case "googleearth":  
813 - i3GEO.Interface.googleearth.zoom2extent(retorno.data.variaveis.mapexten);  
814 - i3GEO.atualizaParametros(retorno.data.variaveis);  
815 - break;  
816 case "openlayers": 803 case "openlayers":
817 i3GEO.Interface.openlayers.zoom2ext(retorno.data.variaveis.mapexten); 804 i3GEO.Interface.openlayers.zoom2ext(retorno.data.variaveis.mapexten);
818 i3GEO.atualizaParametros(retorno.data.variaveis); 805 i3GEO.atualizaParametros(retorno.data.variaveis);
@@ -837,10 +824,6 @@ i3GEO.php = @@ -837,10 +824,6 @@ i3GEO.php =
837 i3GEO.atualizaParametros(retorno.data.variaveis); 824 i3GEO.atualizaParametros(retorno.data.variaveis);
838 i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten); 825 i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);
839 break; 826 break;
840 - case "googleearth":  
841 - i3GEO.atualizaParametros(retorno.data.variaveis);  
842 - i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);  
843 - break;  
844 case "openlayers": 827 case "openlayers":
845 i3GEO.atualizaParametros(retorno.data.variaveis); 828 i3GEO.atualizaParametros(retorno.data.variaveis);
846 i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); 829 i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);
@@ -1128,21 +1111,6 @@ i3GEO.php = @@ -1128,21 +1111,6 @@ i3GEO.php =
1128 cpJSON.call(p, "googlemaps", retorno, par); 1111 cpJSON.call(p, "googlemaps", retorno, par);
1129 }, 1112 },
1130 /** 1113 /**
1131 - * googleearth  
1132 - *  
1133 - * Ativa a interface googleearth  
1134 - */  
1135 - googleearth : function(funcao) {  
1136 - i3GEO.php.verifica();  
1137 - var p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php", par = "funcao=googleearth&g_sid=" + i3GEO.configura.sid, retorno =  
1138 - function(retorno) {  
1139 - i3GEO.janela.fechaAguarde("googleearth");  
1140 - funcao.call(funcao, retorno);  
1141 - };  
1142 - i3GEO.janela.abreAguarde("googleearth", $trad("o1"));  
1143 - cpJSON.call(p, "googleearth", retorno, par);  
1144 - },  
1145 - /**  
1146 * openlayers 1114 * openlayers
1147 * 1115 *
1148 * Ativa a interface openlayers 1116 * Ativa a interface openlayers
@@ -1164,11 +1132,6 @@ i3GEO.php = @@ -1164,11 +1132,6 @@ i3GEO.php =
1164 i3GEO.php.verifica(); 1132 i3GEO.php.verifica();
1165 var p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php", par = 1133 var p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php", par =
1166 "funcao=corpo&tipoimagem=" + tipoimagem + "&g_sid=" + i3GEO.configura.sid + "&interface=" + i3GEO.Interface.ATUAL; 1134 "funcao=corpo&tipoimagem=" + tipoimagem + "&g_sid=" + i3GEO.configura.sid + "&interface=" + i3GEO.Interface.ATUAL;
1167 - // recalcula a extens&atilde;o geogr&aacute;fica do parametro i3GEO.parametros.mapexten  
1168 - if (i3GEO.Interface.ATUAL === "googleearth") {  
1169 - i3GEO.Interface.googleearth.recalcPar();  
1170 - par += "&mapexten=" + i3GEO.parametros.mapexten;  
1171 - }  
1172 cpJSON.call(p, "corpo", funcao, par); 1135 cpJSON.call(p, "corpo", funcao, par);
1173 }, 1136 },
1174 /** 1137 /**
js/plugini3geo.js
@@ -452,11 +452,6 @@ i3GEO.pluginI3geo = @@ -452,11 +452,6 @@ i3GEO.pluginI3geo =
452 + "&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config"; 452 + "&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config";
453 i3GEO.util.scriptTag(p, criaLayer, nomeScript); 453 i3GEO.util.scriptTag(p, criaLayer, nomeScript);
454 } 454 }
455 - },  
456 - googleearth : {  
457 - inicia : function() {  
458 - alert("Plugin nao disponivel");  
459 - }  
460 } 455 }
461 }, 456 },
462 /** 457 /**