convert zoom to fov for static streetview

396 views
Skip to first unread message

JD Gauchat

unread,
Nov 1, 2011, 5:57:52 PM11/1/11
to google-maps...@googlegroups.com
Hi. I have a little problem here. When I get the information from a streetview, I get the variable ZOOM. But when I need to generate a static image of that same streetview I have to use the variable FOV, which has a totally different value. How can I convert values from ZOOM to FOV and the other way around?

Thanks
JD

dave

unread,
Nov 22, 2011, 8:14:03 PM11/22/11
to google-maps...@googlegroups.com
Has anyone figured this out yet?

dave

unread,
Nov 22, 2011, 8:37:11 PM11/22/11
to google-maps...@googlegroups.com
To answer my own question, I did some experimenting and this seems to work:

var zoom = panorama.getPov().zoom;
var fov = 180/Math.pow(2,zoom);

Julien His

unread,
May 29, 2015, 1:24:26 AM5/29/15
to google-maps...@googlegroups.com
Hi, 
for others who stll not find any solution, give mine. I check fov is from 12 to 120 and zoom is from 0 to 5, ( maybe some pictures can go below to 12, but mine didn't). 
And so my convert is:
Math.abs(zoom/5*108-120) 

cheers,
Reply all
Reply to author
Forward
0 new messages