function geTransitionIface(){
var _1="iface";
var _2;
var _3;
var _4;
var _5;
var _6;
var _7=0.5;
this.camSpeed;
this.bean;
var _8=function(){
};
this.getMedia=function(){
return this.bean.media;
};
this.getNextPoint=function(){
return false;
};
this.getName=function(){
return this.bean.name;
};
this.getDescription=function(){
return this.bean.description;
};
this.getSpeed=function(){
return this.camSpeed;
};
this.setBean=function(_9){
this.bean=_9;
};
this.getBeanProperty=function(_a){
return eval("this.bean."+_a+";");
};
this.getTransparam=function(){
return this.bean.transitionparam;
};
this.setTransparam=function(_b){
_6=_b;
this.bean.transitionparam=_b;
};
this.getDuration=function(){
return this.bean.duration;
};
this.setDuration=function(_c){
_4=_c;
this.bean.duration=_c;
};
this.getFocusPoint=function(){
var fp=bean.lalat+" "+bean.lalon+" "+bean.laalt+" "+bean.laaltmode;
return fp;
};
this.setTiming=function(_e){
};
this.getLookAt=function(la){
var myG=geApi.getGeInstance();
var _11=myG.createLookAt("");
_11.set(parseFloat(this.bean.lalat),parseFloat(this.bean.lalon),parseFloat(this.bean.laalt),myG.ALTITUDE_RELATIVE_TO_GROUND,parseFloat(this.bean.laheading),parseFloat(this.bean.latilt),parseFloat(this.bean.larange));
return _11;
};
this.resetTransition=function(){
snConsole.debug("Reset");
};
_8();
};
function geBuiltInMovement(){
type="ge";
this.beginTime;
this.endTime;
this.camSpeed=0.5;
this.firstTime=true;
this.getNextPoint=function(_12){
var _13=new Date();
if(this.firstTime){
this.firstTime=false;
la=this.getLookAt();
return la;
}else{
if(_13.getTime()<this.endTime){
return true;
}else{
return false;
}
}
};
this.getType=function(){
return "ge";
};
this.setTiming=function(_14){
now=new Date();
this.firstTime=true;
this.beginTime=now.getTime();
this.endTime=this.beginTime+(this.bean.duration*1000);
this.camSpeed=_15(this.bean.transitionparam);
};
var _15=function(_16){
var p=parseFloat(_16);
if(p>0||p<5){
return p;
}else{
return default_camSpeed;
}
};
};
geBuiltInMovement.prototype=new geTransitionIface();
function geBuiltInStreetViewMovement(){
type="geSv";
this.beginTime;
this.endTime;
this.camSpeed=0.5;
this.firstTime=true;
this.getNextPoint=function(_18){
var _19=new Date();
if(this.firstTime){
this.firstTime=false;
la=this.getLookAt();
var _1a=ge.createViewerOptions("");
var _1b=ge.getView().copyAsCamera(ge.ALTITUDE_RELATIVE_TO_GROUND);
_1b.setLatitude(la.getLatitude());
_1b.setLongitude(la.getLongitude());
_1b.setAltitude(la.getAltitude());
_1b.setHeading(la.getHeading());
_1b.setTilt(97.86528580528682);
_1b.setRoll(0);
la.setViewerOptions(_1a);
_1a.setOption(ge.OPTION_STREET_VIEW,ge.OPTION_STATE_ENABLED);
return la;
}else{
if(_19.getTime()<this.endTime){
return true;
}else{
return false;
}
}
};
this.getType=function(){
return "ge";
};
this.setTiming=function(_1c){
now=new Date();
this.firstTime=true;
this.beginTime=now.getTime();
this.endTime=this.beginTime+(this.bean.duration*1000);
this.camSpeed=_1d(this.bean.transitionparam);
};
var _1d=function(_1e){
var p=parseFloat(_1e);
if(p>0||p<5){
return p;
}else{
return default_camSpeed;
}
};
};
geBuiltInStreetViewMovement.prototype=new geTransitionIface();
var screenOverlay;
function geCutBlackTrans(){
kmlName="blackCut";
kmlFileName="/3dModels/blackOverlay.kml";
type="geCutBlackTrans";
this.beginTime;
this.stepWidth;
this.Tpause=600;
var _20=0;
var _21;
this.isInitialized=false;
this.getType=function(){
return "geCutBlackTrans";
};
this.initBlackCut=function(){
if(this.isInitialized){
return;
}
var ge=geApi.getGeInstance();
screenOverlay=ge.createScreenOverlay("");
screenOverlay.setIcon(ge.createIcon(""));
screenOverlay.getIcon().setHref("http://www.snoovel.com/fileadmin/snoovel/gfx/black_pixel.gif");
screenOverlay.getOverlayXY().setXUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setYUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setX(0);
screenOverlay.getOverlayXY().setY(0);
screenOverlay.getOverlayXY().setXUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setYUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setX(1);
screenOverlay.getOverlayXY().setY(1);
screenOverlay.getSize().setXUnits(ge.UNITS_PIXELS);
screenOverlay.getSize().setYUnits(ge.UNITS_PIXELS);
screenOverlay.getSize().setX(5000);
screenOverlay.getSize().setY(5000);
screenOverlay.setVisibility(false);
ge.getFeatures().appendChild(screenOverlay);
this.isInitialized=true;
};
this.setActive=function(){
this.initBlackCut();
screenOverlay.setVisibility(true);
};
this.setInactive=function(){
this.initBlackCut();
screenOverlay.setVisibility(false);
};
this.loadKml=function(_23){
};
this.getNextPoint=function(_24){
this.initBlackCut();
if(_20==0){
this.setActive();
_20=1;
return true;
}else{
if(_20==1){
if(_24>parseInt(this.cutTime)){
_20=2;
return this.getLookAt();
}else{
return true;
}
}else{
if(_20==2){
_20=3;
this.setInactive();
return true;
}else{
if(_20==3){
if(_24>parseInt(this.endTime)){
return false;
}else{
return true;
}
}else{
}
}
}
}
};
this.setTiming=function(_25){
this.initBlackCut();
now=new Date();
this.beginTime=now.getTime();
this.endTime=this.beginTime+(parseInt(this.bean.duration)*1000);
this.cutTime=this.beginTime+(parseInt(this.Tpause));
this.camSpeed=5;
geApi.setFlyToSpeed(this.camSpeed);
_20=0;
var _26=geApi.getGeInstance();
var _27=_26.getGlobe().getFeatures();
_21=geApi.getFeaturesByName(_27,"blackCut");
transtest=_21;
if(_21==false){
}
};
this.unload=function(){
this.setInactive();
};
init=function(){
type="geCutBlackTrans";
};
};
geCutBlackTrans.prototype=new geTransitionIface();
function geMoveToTrans(){
};
function geMathUtility(){
this.ER=6371010;
this.distCosineLaw=function(p1,p2){
var d=this.distAlternative(p1,p2);
return d;
};
this.distAlternative=function(p1,p2){
p1lat=toRad(parseFloat(p1.latitude));
p1lon=toRad(parseFloat(p1.longitude));
p2lat=toRad(parseFloat(p2.latitude));
p2lon=toRad(parseFloat(p2.longitude));
var _2d=Math.pow(Math.sin((p1lat-p2lat)/2),2);
var _2e=Math.cos(p1lat)*Math.cos(p2lat)*Math.pow((Math.sin((p1lon-p2lon)/2)),2);
return 2*Math.asin(Math.sqrt(_2d+_2e));
};
this.kurswinkel=function(p1,p2){
p2lon=toRad(p2.longitude);
p2lat=toRad(p2.latitude);
p1lon=toRad(p1.longitude);
p1lat=toRad(p1.latitude);
var y=Math.sin(p2lon-p1lon)*Math.cos(p2lat);
var x=Math.cos(p1lat)*Math.sin(p2lat)-Math.sin(p1lat)*Math.cos(p2lat)*Math.cos(p2lon-p1lon);
var _33=Math.atan2(y,x);
_33=(parseFloat(_33)+2*Math.PI)%(2*Math.PI);
return toDeg(_33);
};
this.toRad=function(_34){
var rad=_34*Math.PI/180;
return rad;
};
this.toDeg=function(_36){
var deg=(_36*180)/Math.PI;
return deg;
};
this.altHop=function(_38,_39){
var _3a=0;
var x=parseFloat(_38)/parseFloat(_39);
_3a=Math.pow(Math.sin(x*Math.PI),2)/2.375*x;
return _3a;
};
this.translateAltitudeMode=function(_3c){
var _3d=false;
var _3e=typeof (_3c);
if(_3e=="string"){
if(_3c=="clampToGround"){
_3d=0;
}else{
if(_3c=="relativeToGround"){
_3d=1;
}else{
if(_3c=="absolute"){
_3d=2;
}
}
}
}else{
if(_3e=="number"){
if(_3c==0){
_3d="clampToGround";
}else{
if(_3c==1){
_3d="relativeToGround";
}else{
if(_3c==2){
_3d="absolute";
}
}
}
}
}
return _3d;
};
};
function geFlyFromIpTo(){
kmlName="blackCut";
kmlFileName="/3dModels/blackOverlay.kml";
type="geFlyFromIpTo";
var _3f;
var _40=0;
this.firstTime=true;
var _41;
if(google.loader.ClientLocation){
_3f=new google.maps.LatLng(google.loader.ClientLocation.latitude,google.loader.ClientLocation.longitude);
}
this.getNextPoint=function(_42){
this.initBlackCut();
var _43=new Date();
if(_40==0){
this.setActive();
_40=1;
return true;
}else{
if(_40==1){
if(_42>parseInt(this.cutTime)){
_40=2;
return this.getLocation();
}else{
return true;
}
}else{
if(_40==2){
_40=3;
this.setInactive();
_41=((new Date()).getTime()+2000);
return true;
}else{
if(_40==3){
if(_42<_41){
return true;
}else{
this.camSpeed=Number(this.getBeanProperty("transitionparam"));
la=this.getLookAt();
_40=4;
return la;
}
}else{
if(_40==4){
if(_42>parseInt(this.endTime)){
return false;
}else{
return true;
}
}else{
}
}
}
}
}
};
this.getLocation=function(la){
var myG=geApi.getGeInstance();
var _46=myG.createLookAt("");
_46.set(_3f.lat(),_3f.lng(),0,myG.ALTITUDE_RELATIVE_TO_GROUND,0,0,5000);
return _46;
};
};
geFlyFromIpTo.prototype=new geCutBlackTrans();
alternate=0;
function transitionFactory(){
this.getTransition=function(_47,_48){
if(_47=="flyTo"){
var t=new flyTo();
}else{
if(_47=="flyToCam"){
var t=new flyToCam();
}else{
if(_47=="flyAroundRight"){
var t=new flyAroundRight();
}else{
if(_47=="flyAroundLeft"){
var t=new flyAroundLeft();
}else{
if(_47=="blackCut"){
var t=new geCutBlackTrans();
}else{
if(_47=="geFlyFromIpTo"){
var t=new geFlyFromIpTo();
}else{
if(_47=="ge"){
var t=new geBuiltInMovement();
}else{
if(_47=="geSv"){
var t=new geBuiltInStreetViewMovement();
}else{
var t=new geBuiltInMovement();
}
}
}
}
}
}
}
}
t.setBean(_48);
return t;
};
};
function LoadingModelsTrans(){
var _4a=true;
this.getNextPoint=function(){
return _4a;
};
this.stop=function(){
_4a=false;
snConsole.debug("Stop LoadingModelTrans...");
};
};


