function GeEarthApiFacade(_1){
var ge=null;
var _3=1;
var _4="Exception in TumblerAdapter.";
var _5=Array();
var _6=null;
var _7=null;
this.initCB=function(_8){
ge=_8;
try{
ge.getWindow().setVisibility(true);
}
catch(e){
}
};
this.setVisible=function(_9){
try{
ge.getWindow().setVisibility(_9);
}
catch(e){
}
};
this.failedCB=function(_a){
var _b=new snPluginLog("session",0,false,"null","null");
_b.sendMessage();
alert("Google Earth Plugin konnte nicht initialisiert werden, sorry!");
};
this.set3dLayerVisible=function(_c){
try{
ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS,_c);
}
catch(e){
snConsole.debug("3D Layer could not be activated");
}
};
this.setRoadsLayerVisible=function(_d){
ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS,_d);
};
this.setBorderLayerVisible=function(_e){
ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS,_e);
};
this.enableTerrain=function(_f){
ge.getLayerRoot().enableLayerById(ge.LAYER_TERRAIN,_f);
};
this.getGeInstance=function(){
return ge;
};
this.getViewParams=function(){
return this.getLookAt();
};
this.setViewParams=function(_10){
la=this.getLookAt();
la.setLatitude(_10.latitude);
la.setLongitude(_10.longitude);
la.setAltitude(_10.altitude);
la.setAltitudeMode(_10.altitudeMode);
la.setRange(_10.range);
la.setTilt(_10.tilt);
la.setHeading(_10.heading);
this.setLookAt(la);
};
this.addWindowEvent=function(_11,_12){
this.removeWindowEvent();
_6=_12;
_7=_11;
google.earth.addEventListener(ge.getWindow(),_11,_12);
};
this.removeWindowEvent=function(){
if(_7!==null){
google.earth.removeEventListener(ge.getWindow(),_7,_6);
_7=null;
_6=null;
}
};
this.getGeInstance=function(){
return ge;
};
this.getLookAt=function(){
var _13=null;
try{
_13=ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
}
catch(e){
}
return _13;
};
this.getCamera=function(){
var _14=null;
try{
_14=ge.getView().copyAsCamera(ge.ALTITUDE_RELATIVE_TO_GROUND);
}
catch(e){
}
return _14;
};
this.getCameraAbs=function(){
var _15=null;
try{
console.debug("Absolute:"+ge.ALTITUDE_ABSOLUTE);
console.debug("Relative:"+ge.ALTITUDE_RELATIVE_TO_GROUND);
_15=ge.getView().copyAsCamera(ge.ALTITUDE_ABSOLUTE);
}
catch(e){
}
return _15;
};
this.getGroundAltitude=function(lat,lon){
return ge.getGroundAltitude(lat,lon);
};
this.debugLookAt=function(la){
if(la!=null){
}
};
this.setViewParams=function(_19){
};
this.setLookAt=function(_1a){
ge.getView().setAbstractView(_1a);
};
this.addRenderCallback=function(cb){
google.earth.addEventListener(ge,"frameend",function(){
cb;
});
};
this.setFlyToSpeed=function(_1c){
if(isNaN(_1c)){
ge.getOptions().setFlyToSpeed(_3);
}else{
if(_1c>=5){
ge.getOptions().setFlyToSpeed(ge.SPEED_TELEPORT);
}else{
if(_1c<=0){
ge.getOptions().setFlyToSpeed(0.1);
}else{
ge.getOptions().setFlyToSpeed(_1c);
}
}
}
};
this.setFlyToSpeedDefault=function(){
ge.getOptions().setFlyToSpeed(_3);
};
this.isReady=function(){
try{
ge.getLookAt();
return true;
}
catch(e){
return false;
}
};
this.featureExist=function(_1d){
if(document.getElementById(_1d)){
return true;
}else{
return false;
}
};
this.streamingProgressPercentage=function(){
};
this.loadKml=function(_1e){
var str="";
try{
str=ge.parseKml(_1e);
}
catch(e){
}
return str;
};
this.setLayer=function(_20,_21){
};
this.getParamValue=function(_22){
};
this.testAddPlacemark=function(id,_24,lat,lon,alt,_28,url){
var _2a=ge.createIcon("");
_2a.setHref(url);
var _2b=ge.createStyle("");
_2b.getIconStyle().setIcon(_2a);
var _2c=ge.createIcon("");
_2c.setHref(url);
var _2d=ge.createStyle("");
_2d.getIconStyle().setIcon(_2c);
var _2e=ge.createStyleMap("");
_2e.setNormalStyle(_2b);
_2e.setHighlightStyle(_2d);
var _2f=ge.createPlacemark(id);
_2f.setStyleSelector(_2e);
_2f.setName(_24);
var _30=ge.createPoint("");
_2f.setGeometry(_30);
_30.setLatitude(lat);
_30.setLongitude(lon);
_30.setAltitude(alt);
ge.getGlobe().getFeatures().appendChild(_2f);
return _2f;
};
this.insertKmlIntoTumbler=function(_31,_32,evt){
try{
ModelLink=host+_32[0].uid_poi+"_-_"+_32[0].name+"/files/"+_32[0].link;
var _34=new PlacemarkObj(_32[0].name,ModelLink);
}
catch(e){
}
};
this.writeKml=function(_35,kml){
};
this.saveImage=function(_37){
};
this.getPointOnTerrain=function(X,Y){
};
this.getViewExtents=function(){
};
this.findMap=function(_3a){
};
this.setFeature=function(_3b,_3c){
};
this.printAllFeatures=function(_3d){
if(_3d.hasChildNodes()){
var _3e=_3d.getChildNodes();
for(var i=0;i<_3e.getLength();i++){
var _40=_3e.item(i);
var _41=_40.getName();
switch(_40.getType()){
case "KmlDocument":
case "KmlFolder":
this.printAllFeatures(_40.getFeatures());
break;
default:
break;
}
}
}
};
this.getFeaturesByName=function(_42,_43){
if(_42.hasChildNodes()){
var _44=_42.getChildNodes();
for(var i=0;i<_44.getLength();i++){
var _46=_44.item(i);
var _47=_46.getName();
if(_47==_43){
return _46;
}
switch(_46.getType()){
case "KmlDocument":
case "KmlFolder":
recFeature=this.getFeaturesByName(_46.getFeatures(),_43);
if(recFeature!=undefined){
return recFeature;
}
default:
break;
}
}
}
};
this.checkPreload=function(uid){
if(isNaN(uid)){
return false;
}
if(_5[uid]==true){
return false;
}else{
_5[uid]=true;
return true;
}
};
this.removeFeatureByName=function(_49){
var _4a=ge.getGlobe().getFeatures();
_4b(_49,_4a);
};
var _4b=function(_4c,_4d){
if(_4d.hasChildNodes()){
var _4e=_4d.getChildNodes();
for(var i=0;i<_4e.getLength();i++){
var _50=_4e.item(i);
var _51=_50.getName();
if(_51==_4c){
_50.setVisibility(false);
_4d.removeChild(_50);
return;
}
switch(_50.getType()){
case "KmlDocument":
case "KmlFolder":
_4b(_4c,_50.getFeatures());
break;
default:
break;
}
}
}
};
this.clearGeContent=function(){
var _52=ge.getGlobe().getFeatures();
_53(_52);
};
var _53=function(_54){
if(_54.hasChildNodes()){
var _55=_54.getChildNodes();
for(var i=0;i<_55.getLength();i++){
var _57=_55.item(i);
switch(_57.getType()){
case "KmlDocument":
case "KmlFolder":
_53(_57.getFeatures());
break;
default:
break;
}
_57.setVisibility(false);
_54.removeChild(_57);
}
}
return;
};
this.getGroundAltitude=function(lat,lon){
return ge.getGlobe().getGroundAltitude(lat,lon);
};
this.getPlugVersion=function(){
return ge.getPluginVersion();
};
this.getApiVersion=function(){
return ge.getApiVersion();
};
};


