6

I've noticed that the new Google Streetview uses a url of the following structure:

https://www.google.com/maps/place/London/@51.508506,-0.125532,3a,90y,72h,90t/data=!3m4!1e1!3m2!1s-KZZeMFtZx0aq3L0MLqE-A!2e0!4m2!3m1!1s0x47d8a00baf21de75:0x52963a5addd52a99

Specifically, there is a string like this @51.508506,-0.125532,3a,90y,72h,90t

I understand lat/lon/heading (I think) but I'm unclear on zoom and tilt. I think it could be structured like this:

@51.508506 -> lon
-0.125532 -> lat 
3a -> zoom? 
90y -> tilt 
72h -> heading (measured from North)
90t -> ?

Are there any references to these parameters, anywhere? I can't quite figure out the zoom parameter, as well as the 90t

1
  • 90t is horizontal tilt (of camera) +/-90t to 180t can be used (180 is straight up) -90 will be upsidedown
    – Mapperz
    Commented Feb 17, 2014 at 20:54

3 Answers 3

3

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 enter image description here

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

enter image description here

I'm not sure what the other attributes pertain to, but I'd like to know.

3

Here is the the relevant section on Street View URL structure from the Google API

From the API:

Required parameters

Either:

  • location can be either a text string (such as Chagrin Falls, OH) or a lat/lng value (40.457375,-80.009353). The Street View Image API will snap to the panorama photographed closest to this location. Because Street View imagery is periodically refreshed, and photographs may be taken from slightly different positions each time, it's possible that your location may snap to a different panorama when imagery is updated.

Or:

  • pano is a specific panorama ID. These are generally stable.

As well as both of:

  • size specifies the output size of the image in pixels. Size is specified as {width}x{height} - for example, size=600x400 returns an image 600 pixels wide, and 400 high.
  • sensor indicates whether or not the request came from a device using a location sensor (e.g. a GPS) to determine the location sent in this request. This value must be either true or false. (deprecated)

Maps API for Business users must include valid client and signature parameters with their requests. Please refer to the Maps API for Business Web Services chapter for more information.

Optional parameters

  • heading indicates the compass heading of the camera. Accepted values are from 0 to 360 (both values indicating North, with 90 indicating East, and 180 South). If no heading is specified, a value will be calculated that directs the camera towards the specified location, from the point at which the closest photograph was taken.
  • fov (default is 90) determines the horizontal field of view of the image. The field of view is expressed in degrees, with a maximum allowed value of 120. When dealing with a fixed-size viewport, as with a Street View image of a set size, field of view in essence represents zoom, with smaller numbers indicating a higher level of zoom.
  • pitch (default is 0) specifies the up or down angle of the camera relative to the Street View vehicle. This is often, but not always, flat horizontal. Positive values angle the camera up (with 90 degrees indicating straight up); negative values angle the camera down (with -90 indicating straight down).
  • key (optional) identifies your application for quota purposes, and enables reports in the APIs Console. For information about obtaining a unique key for your application, please read the API Key section of this document.
1
  • Thanks for the link and description. That all makes sense for construction of the older style streetview URLs, but the link that I pasted above uses a different structure, AFAIK
    – djq
    Commented Feb 17, 2014 at 19:00
0

The 3a parameter corresponds to the estimated altitude of the camera above the ground. When Street View is opened, we usually see the 3a. The a is probably an abbreviation for altitude, and 3 means the 3m camera elevation above the ground. It could make sense, as the GSV camera is quite high above the car itself. enter image description here

This parameter is rather useful for Google Chrome 3D view instead of Street View, where it remains generic.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.