I've been working on this myself. Through trial and error I figured out the following:
@51.508506, -0.125532 -> location
3a -> zoom?
90y -> Field of View
72h -> Heading (measured from North)
90t -> Pitch
data -> unknown
Therefore from this street view you will get this:
https://maps.googleapis.com/maps/api/streetview?size=200x200&location=51.507114,-0.12743&fov=75&heading=329&pitch=1
The big question is what does the data
attribute equate to. Or how we can (if possible) translate it into a pano
attribute (because you cannot get a Photo Sphere image without it)
Edit: I recently asked this question in a similar vein on Stack Overflow and answered my own question.
I think I figured out the pano
attribute.
From said answer:
The data
attribute is the interesting one. This blog article helped me figure it out.
Each segment of the attribute is preceded by "!", a number from 1 - 5 (or more presumably), and a letter (m, e, etc).
For some reason the fourth element (3rd, when counting from 0) is the pano
attribute.
Therefore, this street view of the Acropolis can be parsed into this url for an image:
https://maps.googleapis.com/maps/api/streetview?size=200x200&location=37.971822,23.726532&fov=75&heading=163.13&pitch=7.599999999999994&pano=fPhZjlaq_sAAAAQYNw-Ypw
I'm not sure what the other attributes pertain to, but I'd like to know.