有没有办法只使用 Google 街景 API 而 return "side view"?

Is there a way to use the Google Street View API and only return "side view"?

我所说的侧视图是指相机垂直于街道并面向沿着街道的人行道的图像。一个例子就像这张图片:

http://cdn.timesofisrael.com/uploads/2015/12/Screen-Shot-2015-12-02-at-1.59.53-AM.png

现在我一直在用罗盘明确测量每条街道的航向参数,这让我可以获得侧视图图像,但这不是可扩展的。 Google Street View 是否有办法以某种方式设置此 "side view" 布尔值,或者是否存在可以动态 return 某个位置的所需航向以实现侧视图的现有实现?这似乎是一个常见的用法 case/requirment 所以必须有一种方法可以做到这一点,而不是手动为每个地址手动设置标题。

到目前为止,这是我的代码,你可以看到我正在为街景请求设置一个 "heading" 参数(这是一个介于 0 和 360 之间的数字),但我不想必须每次都手动执行此操作..

import urllib, os

myloc = "/Users/me/Desktop" 
key = "&key=" + "MYKEY" 

def GetStreet(Add,SaveLoc):
  base = "https://maps.googleapis.com/maps/api/streetview?size=1200x800&heading=3&location="
  MyUrl = base + Add + key
  fi = Add + ".jpg"
  urllib.urlretrieve(MyUrl, os.path.join(SaveLoc,fi))


Tests = []

for sampleAddress in range(488, 1501, 30):
  Tests.append(str(sampleAddress) + " Eighth Avenue, San Diego, CA 92101")

for i in Tests:
  GetStreet(Add=i,SaveLoc=myloc)

您可以从 Google 地图 Javascript API v3 StreetViewPov[=13] 中获取有关相机指向的位置(汽车行驶的方向)的信息=]

StreetViewPov object specification
google.maps.StreetViewPov object specification
A point of view object which specifies the camera's orientation at the Street View panorama's position. The point of view is defined as heading and pitch.

Properties

heading | Type: number
The camera heading in degrees relative to true north. True north is 0°, east is 90°, south is 180°, west is 270°.
pitch | Type: number
The camera pitch in degrees, relative to the street view vehicle. Ranges from 90° (directly upwards) to -90° (directly downwards).

(遗憾的是,此信息在街景图像中不可用 API metadata