By side view I mean images where the camera is facing perpendicular to the street and facing the sidewalk that runs along the street. An example would be like this image:
http://cdn.timesofisrael.com/uploads/2015/12/Screen-Shot-2015-12-02-at-1.59.53-AM.png
For now I have been measuring the heading parameter explicitly with a compass for each street and that has allowed me to get side view images but this is not scaleable. Does Google Street View have some way to set this "side view" boolean in some way or is there existing implementations that can dynamically return the desired heading for a position to achieve side view? It seems like this would be a common use case/requirment so there must be a way to do this that isn't manually setting the heading by hand for each address.
Here is my code so far, you can see i am setting a "heading" parameter to the street view request (this is a number between 0 and 360), but i don't want to have to do this manually every time..
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)