listen to navigation control events in google earth plugin
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 开发者_如何学Goto 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.
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
A tour object controls the camera/nativation (kml)
You control the camera/nativation programmatically (javascript api)
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.
精彩评论