谷歌街景图像API:计算(自动设置)给定LatLng的航向



是否可以计算街景图像 API 用于特定LatLng的标题?我想在使用街景图像 API 的同时找出标题。我想确定北、南、东和西在生成的图像中的位置。

我知道街景图像 API 将相机瞄准"正确的方向"(因此,自动将航向指定的LatLng方向旋转),这就是我试图弄清楚的航向。

你想在

StreetViewPanorama类上使用getPhotographerPov

  • https://developers.google.com/maps/documentation/javascript/3.exp/reference#StreetViewPanorama

这有一个heading属性。

例如

var heading = yourPanorama.getPhotographerPov().heading;

最新更新