diff --git a/js/analise.js b/js/analise.js
index ef0203a..f8e9da8 100644
--- a/js/analise.js
+++ b/js/analise.js
@@ -1011,158 +1011,6 @@ i3GEO.analise =
mostra.innerHTML = texto;
}
}
- },
- googleearth : {
- pontosdistobj : {
- xpt : [],
- ypt : [],
- dist : [],
- distV : [],
- xtela : [],
- ytela : [],
- ximg : [],
- yimg : [],
- linhas : [],
- linhastemp : []
- },
- inicia : function() {
- i3GEO.eventos.adicionaEventos("MOUSECLIQUE", [
- "i3GEO.analise.medeDistancia.googleearth.clique()"
- ]);
- i3GEO.eventos.adicionaEventos("MOUSEMOVE", [
- "i3GEO.analise.medeDistancia.googleearth.movimento()"
- ]);
- i3GEO.eventos.adicionaEventos("NAVEGAMAPA", [
- "i3GEO.analise.medeDistancia.fechaJanela()"
- ]);
- },
- clique : function() {
- var pontosdistobj = i3GEO.analise.medeDistancia.googleearth.pontosdistobj, n, d, dd;
- n = pontosdistobj.xpt.length;
- pontosdistobj.xpt[n] = objposicaocursor.ddx;
- pontosdistobj.ypt[n] = objposicaocursor.ddy;
- pontosdistobj.xtela[n] = objposicaocursor.telax;
- pontosdistobj.ytela[n] = objposicaocursor.telay;
- pontosdistobj.ximg[n] = objposicaocursor.imgx;
- pontosdistobj.yimg[n] = objposicaocursor.imgy;
- pontosdistobj.dist[n] = 0;
- if (n > 0) {
- d =
- i3GEO.calculo.distancia(
- pontosdistobj.xpt[n - 1],
- pontosdistobj.ypt[n - 1],
- objposicaocursor.ddx,
- objposicaocursor.ddy);
- pontosdistobj.dist[n] = d + pontosdistobj.dist[n - 1];
- if ($i("pararraios") && $i("pararraios").checked === true) {
- dd =
- Math.sqrt(((Math.pow((pontosdistobj.xpt[n] - pontosdistobj.xpt[n - 1]), 2)) + (Math.pow(
- (pontosdistobj.ypt[n] - pontosdistobj.ypt[n - 1]),
- 2))));
- i3GEO.desenho.googleearth
- .insereCirculo(pontosdistobj.xpt[n], pontosdistobj.ypt[n], dd, "", "divGeometriasTemp");
- }
- if ($i("parartextos") && $i("parartextos").checked === true) {
- i3GEO.desenho.googleearth.insereMarca(
- d + " km",
- objposicaocursor.ddx,
- objposicaocursor.ddy,
- "",
- "divGeometriasTemp");
- }
- // cria a linha ligando os dois ultimos pontos
- i3GEO.desenho.googleearth.insereLinha(
- pontosdistobj.xpt[n - 1],
- pontosdistobj.ypt[n - 1],
- pontosdistobj.xpt[n],
- pontosdistobj.ypt[n],
- "",
- "divGeometriasTemp");
- }
- },
- movimento : function() {
- var n, d, r, da, pontosdistobj = i3GEO.analise.medeDistancia.googleearth.pontosdistobj, calculo = i3GEO.calculo;
- n = pontosdistobj.xpt.length;
- if (n > 0) {
- d =
- calculo.distancia(
- pontosdistobj.xpt[n - 1],
- pontosdistobj.ypt[n - 1],
- objposicaocursor.ddx,
- objposicaocursor.ddy);
- r = calculo.direcao(pontosdistobj.xpt[n - 1], pontosdistobj.ypt[n - 1], objposicaocursor.ddx, objposicaocursor.ddy);
- r = calculo.dd2dms(r, r);
- r = r[0];
- d = d * 1;
- da = d + pontosdistobj.dist[n - 1];
- i3GEO.analise.medeDistancia.googleearth.mostraParcial(d, da, r);
- }
- },
- /**
- * Fecha a janela que mostra os dados Pergunta ao usuario se os graficos devem ser removidos Os graficos sao marcados com o
- * atributo "origem" Os raios e pontos sao sempre removidos
- */
- fechaJanela : function() {
- temp = window.confirm($trad("x94"));
- if (temp) {
- i3GEO.desenho.googleearth.removePlacemark("divGeometriasTemp");
- }
- i3GEO.eventos.removeEventos("MOUSECLIQUE", [
- "i3GEO.analise.medeDistancia.googleearth.clique()"
- ]);
- i3GEO.eventos.removeEventos("MOUSEMOVE", [
- "i3GEO.analise.medeDistancia.movimento.googleearth()"
- ]);
- i3GEO.eventos.removeEventos("NAVEGAMAPA", [
- "i3GEO.analise.medeDistancia.fechaJanela()"
- ]);
- },
- /**
- * Mostra a totalizacao das linhas ja digitalizadas
- */
- mostraTotal : function(trecho, total) {
- var mostra = $i("mostradistancia_calculo"), texto;
- if (mostra) {
- texto =
- "" + $trad("x96")
- + ": "
- + total.toFixed(3)
- + " km"
- + "
"
- + $trad("x96")
- + ": "
- + (total * 1000).toFixed(2)
- + " m"
- + "
"
- + $trad("x25")
- + ": "
- + i3GEO.calculo.metododistancia;
- mostra.innerHTML = texto;
- }
- },
- /**
- * Mostra o valor do trecho entre o ultimo ponto clicado e a posicao do mouse
- */
- mostraParcial : function(trecho, parcial, direcao) {
- var mostra = $i("mostradistancia_calculo_movel"), texto;
- if (mostra) {
- texto =
- "" + $trad("x95")
- + ": "
- + trecho.toFixed(3)
- + " km"
- + "
"
- + $trad("x97")
- + ": "
- + (parcial + trecho).toFixed(3)
- + " km"
- + "
"
- + $trad("x23")
- + " (DMS): "
- + direcao;
- mostra.innerHTML = texto;
- }
- }
}
},
/**
@@ -1761,7 +1609,6 @@ i3GEO.analise =
mostra.innerHTML = texto;
}
}
- },
- googleearth : {}
+ }
}
};
\ No newline at end of file
diff --git a/js/arvoredecamadas.js b/js/arvoredecamadas.js
index 6350574..8f02da0 100644
--- a/js/arvoredecamadas.js
+++ b/js/arvoredecamadas.js
@@ -1874,23 +1874,11 @@ i3GEO.arvoreDeCamadas =
}
if (tipo === "ligartodos") {
t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");
- if (i3GEO.util.in_array(i3GEO.Interface.ATUAL, [
- "googleearth",
- "openlayers",
- "googlemaps"
- ])) {
- return;
- }
+ return;
}
if (tipo === "desligartodos") {
t = i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");
- if (i3GEO.util.in_array(i3GEO.Interface.ATUAL, [
- "googleearth",
- "openlayers",
- "googlemaps"
- ])) {
- return;
- }
+ return;
}
//
// zera o contador de tempo
@@ -1956,23 +1944,11 @@ i3GEO.arvoreDeCamadas =
todos.push(c.value);
if (tipo === "marca") {
c.checked = true;
- if (i3GEO.util.in_array(ATUAL, [
- "googleearth",
- "openlayers",
- "googlemaps"
- ])) {
- i3GEO.Interface[ATUAL].ligaDesliga(c);
- }
+ i3GEO.Interface[ATUAL].ligaDesliga(c);
}
if (tipo === "desmarca") {
c.checked = false;
- if (i3GEO.util.in_array(ATUAL, [
- "googleearth",
- "openlayers",
- "googlemaps"
- ])) {
- i3GEO.Interface[ATUAL].ligaDesliga(c);
- }
+ i3GEO.Interface[ATUAL].ligaDesliga(c);
}
}
}
diff --git a/js/barradebotoes.js b/js/barradebotoes.js
index acb81bb..9fbb933 100755
--- a/js/barradebotoes.js
+++ b/js/barradebotoes.js
@@ -1601,10 +1601,6 @@ i3GEO.barraDeBotoes =
i3GEO.barraDeBotoes.escondeJanelaAjuda();
return;
}
- if (i3GEO.Interface.ATUAL === "googleearth") {
- objeto.title = mensagem;
- return;
- }
if (!divmensagem && this.TIPOAJUDA !== "balao") {
divmensagem = document.createElement("div");
divmensagem.id = "divMensagemBarraDeBotoes";
diff --git a/js/configura.js b/js/configura.js
index cc75196..e7f2f89 100755
--- a/js/configura.js
+++ b/js/configura.js
@@ -415,11 +415,6 @@ i3GEO.configura =
id : "omenudataInterface4",
text : "Google Maps",
url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_gm.phtml?'+i3GEO.configura.sid"
- },
- {
- id : "omenudataInterface5",
- text : "Google Earth",
- url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"
}
]
]
@@ -1395,7 +1390,7 @@ i3GEO.configura =
i3GEO.util.mudaCursor(i3GEO.configura.cursores, temp, i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic);
}
i3GEO.barraDeBotoes.ativaIcone("identifica");
- if (i3GEO.Interface.ATUAL === "googleearth" || i3GEO.eventos.cliquePerm.ativo === false) {
+ if (i3GEO.eventos.cliquePerm.ativo === false) {
// caso seja um clique para desativar
if (i3GEO.eventos.MOUSECLIQUE.toString().search(i3GEO.configura.funcaoIdentifica) >= 0) {
i3GEO.eventos.MOUSECLIQUE.remove(i3GEO.configura.funcaoIdentifica);
@@ -1431,7 +1426,7 @@ i3GEO.configura =
i3GEO.util.mudaCursor(i3GEO.configura.cursores, temp, i3GEO.Interface.IDMAPA, i3GEO.configura.locaplic);
}
i3GEO.barraDeBotoes.ativaIcone("identificaBalao");
- if (i3GEO.Interface.ATUAL === "googleearth" || i3GEO.eventos.cliquePerm.ativo === false) {
+ if (i3GEO.eventos.cliquePerm.ativo === false) {
// na opcao de identificacao so e permitido um evento
i3GEO.eventos.MOUSECLIQUE = [
i3GEO.configura.funcaoTip
diff --git a/js/desenho.js b/js/desenho.js
index ec19b6b..b7681c6 100755
--- a/js/desenho.js
+++ b/js/desenho.js
@@ -170,11 +170,7 @@ i3GEO.desenho =
* {string} - expessura do contorno
*/
addBox : function(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth) {
- if (i3GEO.Interface.ATUAL != "googleearth") {
- return i3GEO.desenho[i3GEO.Interface.ATUAL].addBox(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth);
- } else {
- return false;
- }
+ return i3GEO.desenho[i3GEO.Interface.ATUAL].addBox(xmin, ymin, xmax, ymax, namespace, strokeColor, strokeWidth);
},
/**
* Function: moveBox
@@ -194,11 +190,7 @@ i3GEO.desenho =
* {numeric} - novo ymax
*/
moveBox : function(box, xmin, ymin, xmax, ymax) {
- if (i3GEO.Interface.ATUAL != "googleearth") {
- return i3GEO.desenho[i3GEO.Interface.ATUAL].moveBox(box, xmin, ymin, xmax, ymax);
- } else {
- return false;
- }
+ return i3GEO.desenho[i3GEO.Interface.ATUAL].moveBox(box, xmin, ymin, xmax, ymax);
},
/**
* Function: removeBox
@@ -239,11 +231,7 @@ i3GEO.desenho =
*
*/
addPin : function(x, y, w, h, imagem, namespace, centro, funcaoclick) {
- if (i3GEO.Interface.ATUAL != "googleearth") {
- return i3GEO.desenho[i3GEO.Interface.ATUAL].addPin(x, y, w, h, imagem, namespace, centro);
- } else {
- return false;
- }
+ return i3GEO.desenho[i3GEO.Interface.ATUAL].addPin(x, y, w, h, imagem, namespace, centro);
},
/**
* Function: removePins
@@ -255,9 +243,7 @@ i3GEO.desenho =
* {string} - namespace que identifica o grupo de marcas que serao removidas
*/
removePins : function(namespace) {
- if (i3GEO.Interface.ATUAL != "googleearth") {
- i3GEO.desenho[i3GEO.Interface.ATUAL].removePins(namespace);
- }
+ i3GEO.desenho[i3GEO.Interface.ATUAL].removePins(namespace);
},
/**
* Function: movePin
@@ -273,9 +259,7 @@ i3GEO.desenho =
* {numeric} - novo y
*/
movePin : function(pin, x, y) {
- if (i3GEO.Interface.ATUAL != "googleearth") {
- i3GEO.desenho[i3GEO.Interface.ATUAL].movePin(pin, x, y);
- }
+ i3GEO.desenho[i3GEO.Interface.ATUAL].movePin(pin, x, y);
},
/**
* Section: i3GEO.desenho.openlayers
@@ -650,87 +634,6 @@ i3GEO.desenho =
}
}
}
- },
- /**
- * Section: i3GEO.desenho.googleearth
- *
- * Funções utilizadas quando o mapa baseia-se na interface GoogleEarth
- */
- googleearth : {
- insereMarca : function(description, ddx, ddy, name, snippet) {
- if (typeof (console) !== 'undefined')
- console.info("i3GEO.Interface.googleearth.insereMarca()");
-
- var placemark = i3GeoMap.createPlacemark(''), point = i3GeoMap.createPoint('');
- placemark.setName(name);
- point.setLatitude(ddy);
- point.setLongitude(ddx);
- placemark.setGeometry(point);
- if (description !== "") {
- placemark.setDescription(description);
- }
- placemark.setSnippet(snippet);
- i3GeoMap.getFeatures().appendChild(placemark);
- },
- //
- // código obtido em
- // http://code.google.com/intl/pt-BR/apis/earth/documentation/geometries.html
- //
- insereCirculo : function(centerLng, centerLat, radius, name, snippet) {
- function makeCircle(centerLat, centerLng, radius) {
- var ring = i3GeoMap.createLinearRing(''), steps = 25, i, pi2 = Math.PI * 2, lat, lng;
- for (i = 0; i < steps; i++) {
- lat = centerLat + radius * Math.cos(i / steps * pi2);
- lng = centerLng + radius * Math.sin(i / steps * pi2);
- ring.getCoordinates().pushLatLngAlt(lat, lng, 0);
- }
- return ring;
- }
- var polygonPlacemark = i3GeoMap.createPlacemark(''), poly = i3GeoMap.createPolygon(''), polyStyle;
- poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);
- polygonPlacemark.setGeometry(poly);
- polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat, centerLng, radius));
- polygonPlacemark.setName(name);
- polygonPlacemark.setSnippet(snippet);
- polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));
- polyStyle = polygonPlacemark.getStyleSelector().getPolyStyle();
- polyStyle.setFill(0);
- i3GeoMap.getFeatures().appendChild(polygonPlacemark);
- },
- insereLinha : function(xi, yi, xf, yf, name, snippet) {
- var lineStringPlacemark = i3GeoMap.createPlacemark(''), lineString, lineStyle;
- lineStringPlacemark.setName(name);
- lineString = i3GeoMap.createLineString('');
- lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);
- lineStringPlacemark.setGeometry(lineString);
- lineString.getCoordinates().pushLatLngAlt(yi, xi, 0);
- lineString.getCoordinates().pushLatLngAlt(yf, xf, 0);
-
- lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));
- lineStringPlacemark.setSnippet(snippet);
- lineStyle = lineStringPlacemark.getStyleSelector().getLineStyle();
- lineStyle.setWidth(3);
-
- i3GeoMap.getFeatures().appendChild(lineStringPlacemark);
- },
- removePlacemark : function(nome) {
- var features = i3GeoMap.getFeatures(), n = features.getChildNodes().getLength(), i, nfeatures = [];
- for (i = 0; i < n; i++) {
- try {
- if (features.getChildNodes().item(i).getName() === nome || features.getChildNodes().item(i).getDescription() === nome
- || features.getChildNodes().item(i).getSnippet() === nome) {
- // features.getChildNodes().item(i).setVisibility(false);
- nfeatures.push(features.getChildNodes().item(i));
- // features.removeChild(features.getChildNodes().item(i));
- }
- } catch (e) {
- }
- }
- n = nfeatures.length;
- for (i = 0; i < n; i++) {
- features.removeChild(nfeatures[i]);
- }
- }
}
};
// YAHOO.log("carregou classe desenho", "Classes i3geo");
diff --git a/js/eventos.js b/js/eventos.js
index aba5459..3d29384 100644
--- a/js/eventos.js
+++ b/js/eventos.js
@@ -435,7 +435,7 @@ i3GEO.eventos =
posicaoMouseMapa : function(e) {
// Utilizado pelo mapa de referencia
// os eventos da interface googlemaps são definidos em i3GEO.Interface
- // se a interface for googleearth, googlemaps ou openlayers, os eventos são controlados
+ // se a interface for googlemaps ou openlayers, os eventos são controlados
// pelas respectivas apis
// caso contrário, o i3geo irá controlar os cálculos
//
diff --git a/js/gadgets.js b/js/gadgets.js
index e0addb8..bceb118 100644
--- a/js/gadgets.js
+++ b/js/gadgets.js
@@ -676,9 +676,6 @@ i3GEO.gadgets =
ins += '';
ins += '';
objid.innerHTML = ins;
- if (i3GEO.Interface.ATUAL === "googleearth") {
- i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe = true;
- }
i3GEOoMenuBarLocal = new YAHOO.widget.MenuBar(id, i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);
onMenuBarBeforeRender = function(p_sType, p_sArgs) {
var nomeMenu = "", nomeSub, subs = i3GEO.configura.oMenuData.submenus, conta = 0;
@@ -736,9 +733,6 @@ i3GEO.gadgets =
case "googlemaps":
temp = "omenudataInterface4";
break;
- case "googleearth":
- temp = "omenudataInterface5";
- break;
}
if (temp != "" && $i(temp)) {
i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked", true);
@@ -775,11 +769,6 @@ i3GEO.gadgets =
"omenudataArquivos3", "omenudataJanelas1", "omenudataJanelas3"
];
break;
- case "googleearth":
- temp = [
- "omenudataFerramentas7b", "omenudataArquivos3", "omenudataJanelas3", "omenudataFerramentas2a"
- ];
- break;
}
;
n = temp.length;
diff --git a/js/ini_i3geo.js b/js/ini_i3geo.js
index 648a96f..411bf47 100644
--- a/js/ini_i3geo.js
+++ b/js/ini_i3geo.js
@@ -446,10 +446,6 @@ var i3GEO = {
temp = i3GEO.util.base64decode(preferencias.preferenciasbase64);
i3GEO.mapa.aplicaPreferencias(temp);
}
-
- if (i3GEO.Interface.ATUAL === "googleearth") {
- i3GEO.configura.guardaExtensao = false;
- }
// obtem o cookie com a ultima extensao geografica
if (i3GEO.configura.guardaExtensao === true) {
if (i3GEO.Interface.openlayers.googleLike === true) {
@@ -979,9 +975,6 @@ var i3GEO = {
case "googlemaps":
i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);
break;
- case "googleearth":
- i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);
- break;
case "openlayers":
i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);
i3geoOL.updateSize();
diff --git a/js/interface.js b/js/interface.js
index c913b3e..61636be 100755
--- a/js/interface.js
+++ b/js/interface.js
@@ -196,7 +196,7 @@ i3GEO.Interface =
*
* Valores:
*
- * openlayers|googlemaps|googleearth
+ * openlayers|googlemaps
*
* Default:
*
@@ -414,9 +414,6 @@ i3GEO.Interface =
if (i3GEO.Interface.ATUAL === "googlemaps") {
i3GEO.Interface.googlemaps.adicionaKml("foo");
}
- if (i3GEO.Interface.ATUAL === "googleearth") {
- i3GEO.Interface.googleearth.adicionaKml("foo");
- }
if (i3GEO.Interface.ATUAL === "openlayers") {
i3GEO.Interface.openlayers.adicionaKml("foo");
}
@@ -3025,714 +3022,5 @@ i3GEO.Interface =
i3GEO.Interface.googlemaps.PARAMETROSLAYER += "&" + parametro + "=" + valor;
i3GEO.Interface.googlemaps.redesenha();
}
- },
- /**
- * Section: i3GEO.Interface.GoogleEarth
- *
- * Interface com motor de navegação baseado na API Google Earth
- *
- * Namespace:
- *
- * i3GEO.Interface.googleearth
- *
- * Utilizado quando
- *
- * i3GEO.Interface.ATUAL = "googleearth"
- *
- * Cria o objeto i3GeoMap que pode receber os métodos da API.
- */
- googleearth : {
- /**
- * Variable: PARAMETROSLAYER
- *
- * Parametros adicionais que são inseridos na URL que define cada layer
- *
- * Tipo:
- *
- * {string}
- */
- PARAMETROSLAYER : "&TIPOIMAGEM=" + i3GEO.configura.tipoimagem,
- /**
- * String acrescentada a url de cada tile para garantir a remoção do cache local
- *
- * Tipo:
- *
- * {string}
- */
- posfixo : "",
- /**
- * Propriedade: GADGETS
- *
- * Lista dos controles específicos da API do Google Earth que serão inseridos ou não no mapa
- *
- * Tipo:
- *
- * {object}
- *
- * Default:
- *
- * (start code)
- *
- * i3GEO.Interface.googleearth.GADGETS = { setMouseNavigationEnabled : true, setStatusBarVisibility : true,
- * setOverviewMapVisibility : true, setScaleLegendVisibility : true, setAtmosphereVisibility : true, setGridVisibility : false,
- * getSun : false, LAYER_BORDERS : true, LAYER_BUILDINGS : false, LAYER_ROADS : false, LAYER_TERRAIN : true } (end)
- */
- GADGETS : {
- setMouseNavigationEnabled : true,
- setStatusBarVisibility : true,
- setOverviewMapVisibility : true,
- setScaleLegendVisibility : true,
- setAtmosphereVisibility : true,
- setGridVisibility : false,
- getSun : false,
- LAYER_BORDERS : true,
- LAYER_BUILDINGS : false,
- LAYER_ROADS : false,
- LAYER_TERRAIN : true
- },
- POSICAOTELA : [
- 0, 0
- ],
- aguarde : "",
- ligaDesliga : function(obj) {
- var layer = i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value), temp = function() {
- i3GEO.mapa.legendaHTML.atualiza();
- }, desligar = "", ligar = "";
- if (obj.checked) {
- i3GEO.arvoreDeCamadas.alteraPropCamadas("status", "2", obj.value);
- ligar = obj.value;
- } else {
- i3GEO.arvoreDeCamadas.alteraPropCamadas("status", "0", obj.value);
- desligar = obj.value;
- }
- layer.setVisibility(obj.checked);
- if (desligar !== "" || ligar !== "") {
- i3GEO.php.ligatemas(temp, desligar, ligar);
- }
- },
- atualizaTema : function(retorno, tema) {
- var layer = i3GEO.Interface.googleearth.retornaObjetoLayer(tema), hr = layer.getLink().getHref(), objtemas;
- // layer.getLink().setRefreshMode(2);
- // layer.getLink().setRefreshInterval(1);
- hr = hr.replace("&&&&&&&&&&&&&&&&&&&", "");
- layer.getLink().setHref(hr + "&");
- if (retorno === "") {
- return;
- }
- objtemas = i3GEO.arvoreDeCamadas.converteChaveValor2normal(retorno.data.temas);
- i3GEO.Interface.googleearth.recalcPar();
- try {
- i3GEO.arvoreDeCamadas.atualiza(objtemas);
- } catch (e) {
- i3GEO.arvoreDeCamadas.atualiza();
- }
- i3GEO.janela.fechaAguarde();
- },
- redesenha : function() {
- i3GEO.Interface.googleearth.posfixo += "&";
- var nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length, i, camada, indice;
- for (i = 0; i < nlayers; i++) {
- camada = i3GEO.arvoreDeCamadas.CAMADAS[i];
- indice = i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);
- if (indice !== false) {
- try {
- i3GeoMap.getFeatures().removeChild(indice);
- } catch (e) {
- }
- }
- }
- i3GEO.Interface.googleearth.criaLayers();
- },
- cria : function(w, h) {
- var i, i3GeoMap3d, texto;
- i3GEO.configura.listaDePropriedadesDoMapa = {
- "propriedades" : [
- {
- text : "p2",
- url : "javascript:i3GEO.mapa.dialogo.tipoimagem()"
- }, {
- text : "p3",
- url : "javascript:i3GEO.mapa.dialogo.opcoesLegenda()"
- }, {
- text : "p4",
- url : "javascript:i3GEO.mapa.dialogo.opcoesEscala()"
- }, {
- text : "p8",
- url : "javascript:i3GEO.mapa.dialogo.queryMap()"
- }, {
- text : "p9",
- url : "javascript:i3GEO.mapa.dialogo.corFundo()"
- }, {
- text : "p10",
- url : "javascript:i3GEO.mapa.dialogo.gradeCoord()"
- }
- ]
- };
- texto = " " + $trad("ge1");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge2");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge3");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge4");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge5");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge6");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge7");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge8");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge9");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge10");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
-
- texto = " " + $trad("ge11");
- i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({
- text : texto,
- url : ""
- });
- i3GEO.util.arvore("" + $trad("p13") + "", "listaPropriedades", i3GEO.configura.listaDePropriedadesDoMapa);
-
- i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli = false;
- i3GEO.barraDeBotoes.INCLUIBOTAO.pan = false;
- i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot = false;
- i3GEO.barraDeBotoes.INCLUIBOTAO.zoomproximo = false;
- i3GEO.barraDeBotoes.INCLUIBOTAO.zoomanterior = false;
- i3GEO.Interface.IDMAPA = "i3GeoMap3d";
- if (i3GEO.arvoreDeCamadas.ATIVATEMA === "") {
- i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.googleearth.ligaDesliga(this)";
- }
- i = $i(i3GEO.Interface.IDCORPO);
- if (i) {
- i3GeoMap3d = document.createElement("div");
- i3GeoMap3d.style.width = w + "px";
- i3GeoMap3d.style.height = h + "px";// + 45;
- i.style.height = h;// + 45;
- i3GeoMap3d.id = "i3GeoMap3d";
- i3GeoMap3d.style.zIndex = 0;
- i.appendChild(i3GeoMap3d);
- }
- google.load("earth", "1");
- },
- inicia : function() {
- google.earth.createInstance("i3GeoMap3d", i3GEO.Interface.googleearth.iniciaGE, i3GEO.Interface.googleearth.falha);
- },
- iniciaGE : function(object) {
- var montaMapa = function(retorno) {
- i3GeoMap = object;
- i3GeoMap.getWindow().setVisibility(true);
- i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);
- i3GEO.Interface.googleearth.criaLayers();
-
- var options = i3GeoMap.getOptions(), layerRoot = i3GeoMap.getLayerRoot();
-
- options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);
- options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);
- options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);
- options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);
- options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);
- options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);
-
- layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);
- layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);
- layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);
- layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);
- i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);
- i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);
-
- i3GEO.Interface.googleearth.POSICAOTELA = YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));
- //
- // i3GEO.arvoreDeCamadas.CAMADAS é definido na
- // inicialização (classe_i3geo)
- //
- i3GEO.arvoreDeCamadas.cria("", i3GEO.arvoreDeCamadas.CAMADAS, i3GEO.configura.sid, i3GEO.configura.locaplic);
- i3GEO.gadgets.mostraMenuSuspenso();
- i3GEO.gadgets.mostraMenuLista();
- i3GEO.Interface.googleearth.ativaBotoes();
- i3GEO.gadgets.mostraInserirKml("inserirKml");
- if (i3GEO.arvoreDeCamadas.MOSTRALISTAKML === true) {
- i3GEO.Interface.googleearth.adicionaListaKml();
- }
- i3GEO.Interface.googleearth.registraEventos();
-
- if (i3GEO.parametros.kmlurl !== "") {
- i3GEO.Interface.googleearth.adicionaKml(true, i3GEO.parametros.kmlurl, i3GEO.parametros.kmlurl, false);
- }
- // executa função de finalização, se
- // houver
- if (YAHOO.lang.isFunction(i3GEO.finalizaAPI)) {
- i3GEO.finalizaAPI.call();
- } else {
- if (i3GEO.finalizaAPI != "") {
- eval(i3GEO.finalizaAPI);
- }
- }
- i3GEO.configura.iniciaFerramentas.executa();
- };
- i3GEO.php.googleearth(montaMapa);
- },
- criaLayers : function() {
- var nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length - 1, i, camada, indice, layer;
- for (i = nlayers; i >= 0; i--) {
- camada = i3GEO.arvoreDeCamadas.CAMADAS[i];
- indice = i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);
- layer = i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);
- // nao mude para ===
- if (indice == false) {
- layer = i3GEO.Interface.googleearth.insereLayer(camada.name);
- }
- try {
- if (camada.status != 0) {
- layer.setVisibility(true);
- } else {
- layer.setVisibility(false);
- }
- } catch (e) {
- }
- }
- },
- insereLayer : function(nomeLayer) {
- var kmlUrl =
- i3GEO.configura.locaplic + "/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="
- + i3GEO.configura.sid
- + "&layer="
- + nomeLayer
- + i3GEO.Interface.googleearth.PARAMETROSLAYER
- + "&r="
- + Math.random(), linki3geo = i3GeoMap.createLink(''), nl = i3GeoMap.createNetworkLink('');
- linki3geo.setHref(kmlUrl + i3GEO.Interface.googleearth.posfixo);
- nl.setLink(linki3geo);
- nl.setFlyToView(false);
- nl.setName(nomeLayer);
- i3GeoMap.getFeatures().appendChild(nl);
- return nl;
- },
- retornaIndiceLayer : function(nomeLayer) {
- var n = i3GeoMap.getFeatures().getChildNodes().getLength(), indice = 0, i = 0;
- if (n > 0) {
- for (i = 0; i < n; i++) {
- if (i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer) {
- indice = i;
- }
- }
- return indice;
- } else {
- return false;
- }
- },
- aplicaOpacidade : function(opacidade) {
- var n = i3GeoMap.getFeatures().getChildNodes().getLength(), i;
- for (i = 0; i < n; i++) {
- i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade);
- }
- },
- retornaObjetoLayer : function(nomeLayer) {
- var n = i3GeoMap.getFeatures().getChildNodes().getLength(), indice = false, i;
- for (i = 0; i < n; i++) {
- if (i3GeoMap.getFeatures().getChildNodes().item(i).getName() === nomeLayer) {
- indice = i3GeoMap.getFeatures().getChildNodes().item(i);
- }
- }
- return indice;
- },
- registraEventos : function() {
- google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function(e) {
- i3GEO.Interface.googleearth.recalcPar();
- i3GEO.eventos.cliquePerm.status = false;
- // guarda a extensao geografica atual
- i3GEO.navega.registraExt(i3GEO.parametros.mapexten);
- });
- google.earth.addEventListener(i3GeoMap.getGlobe(), 'mousemove', function(event) {
- d = i3GEO.calculo.dd2dms(event.getLongitude(), event.getLatitude());
- objposicaocursor = {
- ddx : event.getLongitude(),
- ddy : event.getLatitude(),
- dmsx : d[0],
- dmsy : d[1],
- imgx : event.getClientX(),
- imgy : event.getClientY(),
- telax : event.getClientX() + i3GEO.Interface.googleearth.POSICAOTELA[0],
- telay : event.getClientY() + i3GEO.Interface.googleearth.POSICAOTELA[1]
- };
- i3GEO.eventos.mousemoveMapa();
- });
- google.earth.addEventListener(i3GeoMap.getGlobe(), 'click', function(event) {
- if (i3GEO.Interface.googleearth.aguarde.visibility === "hidden") {
- i3GEO.eventos.mousecliqueMapa();
- } else {
- i3GEO.Interface.googleearth.aguarde.visibility = "hidden";
- }
- });
- },
- recalcPar : function() {
- var bounds;
- bounds = i3GeoMap.getView().getViewportGlobeBounds();
- i3GEO.parametros.mapexten = bounds.getWest() + " " + bounds.getSouth() + " " + bounds.getEast() + " " + bounds.getNorth();
- // i3GEO.parametros.mapscale =
- // i3GEO.Interface.googlemaps.calcescala();
- },
- falha : function() {
- alert("Falhou. Vc precisa do plugin instalado");
- },
- ativaBotoes : function() {
- var cabecalho = function() {
- i3GEO.barraDeBotoes.ativaIcone("");
- }, minimiza = function() {
- i3GEO.janela.minimiza("i3GEOF.ferramentasGE");
- }, janela =
- i3GEO.janela
- .cria("230px", "110px", "", "", "", $trad("u15a"), "i3GEOF.ferramentasGE", false, "hd", cabecalho, minimiza);
- $i("i3GEOF.ferramentasGE_c").style.zIndex = 100;
- i3GEO.barraDeBotoes.TEMPLATEBOTAO =
- '
Google Earth Kml |