listen to navigation control events in google earth plugin

292 views Asked by At

Is there a way to listen to the navigation contol's click events. I am aware that you can listen to 'viewchage' event but I want to know when the user clicks on the nav controls.

I have a anmation playing on the plugin and I want to add the tilt and pan values to the playing camera values when the user clicks on the nav controls.

1

There are 1 answers

0
Fraser On

Sorry, the GENavigationControl does not expose any events so I am afraid this is not possible.

You could create your own controls and the events to handle your functionality...but this would be far from trivial.

Also, I am pretty sure you can't modify the camera values in the plugin whilst a tour is playing without exiting it.

Essentially there are three types of control over the camera/nativation

  1. A tour object controls the camera/nativation (kml)

  2. You control the camera/nativation programmatically (javascript api)

  3. The user controls the camera/nativation (controls, mouse, keys)

Trying to use any of these at the same time will just produce unpredictable jerky results as each method 'fights' for control of the view.