谷歌地球API JavaScript控制
我有一个 HTML 文件,其中相机从太空飞到街景,我只需要向前移动,以随机方向到达下一个街景并继续移动。就像按住向上箭头一样。请问有人知道怎么做吗?非常感谢!
I have an HTML file in which the camera flies from space to a street view and I only need to move forward, in a random direction to the next streetview and keep moving. Just like keeping the up arrow pressed. Does anyone know how to do it, please? Thank you very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是不可能的,Google Earth Api(迄今为止)没有公开任何除启用/禁用之外的控制街景模式的方法。所有移动都是通过用户输入而不是编程控制。
也就是说,也许可以通过使用 jQuery 之类的东西模拟按键来解决这个问题。
是否可以通过编程方式模拟按键事件?
I don't think this is possible, the Google Earth Api (to date) does not expose any methods to control the street-view mode other that enabling/disabling. All movement is via user input rather than programmatic control.
That said, it may just be possible to kludge this by simulating key presses using something like jQuery.
Is it possible to simulate key press events programmatically?