谷歌地球API JavaScript控制

发布于 2024-12-17 15:46:24 字数 86 浏览 4 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岛歌少女 2024-12-24 15:46:24

我认为这是不可能的,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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文