有没有一种简单的方法可以让 iOS 中的 Google 街景 View GMSPanormaView
的相机通过来自其运动传感器的数据跟随设备的方向?
如果没有,有没有人已经做过并且可以分享一个从 CoreMotion
获取数据的代码片段,也许可以操纵它来创建 GMSPanoramaCamera
,并将它传递给 GMSPanoramaView
与 animateToCamera:animationDuration:
?
任何相关的 Android 代码也很有用。
最佳答案
检查 Maps SDK for iOS:Internal: Street View ,设备方向/陀螺仪传感器没有内置功能/实现。
根据 Ziem's回答你可以尝试自己实现这个(创建函数)。他还给出了研究以下方面的指示:
引用:
Using a site they have successfully create a function that will let you browse the Google streetview panoramas with your smartphone/tablet like you were inside it, just by moving your phone like a window to the world.
关于ios - 带有设备方向/陀螺仪传感器的 iOS 版谷歌街景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38475523/