开发者

listen to navigation control events in google earth plugin

开发者 https://www.devze.com 2023-02-06 13:48 出处:网络
Is there a way to listen to the navigation contol\'s click events.Iam aware that you can listen to \'viewchage\' event but I want 开发者_如何学Goto know when the user clicks on the nav controls.

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

  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.

0

精彩评论

暂无评论...
验证码 换一张
取 消