KmlLookAt.getHeading() reporting broken while zooming out after being tilted

31 views
Skip to first unread message

James Lamanna

unread,
Feb 22, 2013, 2:30:46 PM2/22/13
to google-earth-...@googlegroups.com
Hi,
KmlLookAt.getHeading() has data problems while zooming out when you are tilted.
To reproduce:

1) Zoom into the Globe and tilt so that you are almost looking at the horizon.
2) Now start to zoom out directly from this position.

getHeading() will remain fairly constant until you reach some point where it will flip around and be almost 90deg off of where it should be.

Sample code:

google.earth.addEventListener(ge.getView(), 'viewchange', onViewChange);

function onViewChange() {
      console.log('heading ' + ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_SEA_FLOOR).getHeading());
}
Reply all
Reply to author
Forward
0 new messages