获取Google StreetView API的POV [英] Getting the POV for Google StreetView API

查看:105
本文介绍了获取Google StreetView API的POV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在使用嵌入Google街景视图全景

a>,我希望获得特定地址的POV(更具体的标题)。



Google通过 maps.google.com ,在给定地址的情况下,它会将您放到街景视图中,并且它将面临正确的方式。然而,我似乎无法找到/查找文档,以通过API找到POV标题。



我可以使街景视图嵌入到正常工作状态与一个 LatLng ,但相机通常面临错误的方向。任何想法?



编辑:清晰度

我想设置POV,但我不知道将它设置为什么值...

解决方案

所需地址的latLng和latLng全景位置(拍摄图像的街景车的位置)并不相同。据我所知,API不会将地址latlng的标题设置为正确的方向,您必须自己设置它。



这就是我所做的它使用StreetViewService查找可用的最近全景照片,然后使用computeHeading方法计算Pov标题这里


I am currently using the Google Street View Panorama embed and I want to get the POV (more specifically heading) for a particular address.

Google does this via maps.google.com, where, given an address, it'll drop you into street view and it will face the right way. However, I can't seem to figure out / find documentation for a way to find the POV heading via the API.

I can get the Street View embed to work fine with a LatLng, but the camera is usually facing the wrong direction. Any ideas?

edit: clarity

I want to set the POV, but I don't know what value to set it to...

解决方案

The latLng of the required address and the latLng of the panorama location (the position of the streetview car from where images are shot) are not the same. As far as I know, the API does not set the heading in the right direction of the address latlng, you will have to set it yourself.

This is how I did it, I used the StreetViewService to find the nearest panorama shot available and then calculated the Pov heading using the computeHeading method here

这篇关于获取Google StreetView API的POV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆