Google maps 在街景API中向前和向后移动
我正在为一个虚拟现实项目整合Unity,我想知道如果我们在街上移动,是否有可能找到下一个经度和纬度 如果您在谷歌地图中使用街道视图,您可以单击箭头在街道上向前或向后移动 当你点击箭头时,你基本上会移动到一个新的经度和纬度 我想知道是否可以使用Street View API添加类似的操作 下面是我用来加载街景API的代码的一部分:Google maps 在街景API中向前和向后移动,google-maps,google-maps-api-3,unity3d,unityscript,google-street-view,Google Maps,Google Maps Api 3,Unity3d,Unityscript,Google Street View,我正在为一个虚拟现实项目整合Unity,我想知道如果我们在街上移动,是否有可能找到下一个经度和纬度 如果您在谷歌地图中使用街道视图,您可以单击箭头在街道上向前或向后移动 当你点击箭头时,你基本上会移动到一个新的经度和纬度 我想知道是否可以使用Street View API添加类似的操作 下面是我用来加载街景API的代码的一部分: string url = "http://maps.googleapis.com/maps/api/streetview?" + "size="
string url = "http://maps.googleapis.com/maps/api/streetview?"
+ "size=" + width + "x" + height
+ "&location=" + latitude + "," + longitude
+ "&heading=" + (heading + sideHeading) % 360.0 + "&pitch=" + (pitch + sidePitch) % 360.0
+ "&fov=90.0&sensor=false";
if (key != "")
url += "&key=" + key;
WWW www = new WWW(url);
yield return www;
if (!string.IsNullOrEmpty(www.error))
Debug.Log("Panorama " + name + ": " + www.error);
else
print("Panorama " + name + " loaded url " + url);
renderer.material.mainTexture = www.texture;
因此,当您单击向上箭头时,可以在街景上移动。返回到相邻全景的“链接”。