是否可以计算街景图像 API 用于特定LatLng
的标题?我想在使用街景图像 API 的同时找出标题。我想确定北、南、东和西在生成的图像中的位置。
我知道街景图像 API 将相机瞄准"正确的方向"(因此,自动将航向指定的LatLng
方向旋转),这就是我试图弄清楚的航向。
你想在
StreetViewPanorama
类上使用getPhotographerPov
:
- https://developers.google.com/maps/documentation/javascript/3.exp/reference#StreetViewPanorama
这有一个heading
属性。
例如
var heading = yourPanorama.getPhotographerPov().heading;