街景陀螺仪功能

StreetView gyroscope functionality

在官方 Google 地图应用程序中,当用户旋转设备时,街景视图也会旋转。我进行了研究,但没有找到如何在街景的 Google 地图 v2 API 中启用陀螺仪功能。我可以自己实现这个,但也许有这样的功能,我只是没有找到它?

StreetView 中没有任何内置功能可以启用此功能。如果您想自己做,可以查看以下链接:

看起来 Google 最近更新了他们的 API 以在街景视角中包含基于加速度计的跟踪。在 phone 上尝试 this example

来自 Motion tracking on mobile devices 上的文档:

On devices that support device orientation events, the API offers users the ability to change the Street View point of view based on the movement of the device. Users can look around by moving their devices. This is called motion tracking or device rotation tracking.

更多信息(例如如何禁用它)在 link 中。