我怎样才能确定一个街景全景地图正在使用的视野 [英] how can I determine the Field of View a street view panorama map is using

查看:127
本文介绍了我怎样才能确定一个街景全景地图正在使用的视野的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到每个街景视图的视野(FOV)度在不同浏览器之间的缩放级别不同

我相信记录在FOV中的街景缩放级别

p>

  0:180,1:90,2:45,3:22.5,4:11:25 

我在街景全景中使用v3 Maps API,并在周围的镀铬区获取FOV的缩放级别。

  0:127,1:90,2:53,3:28,4:14 

在Firefox和IE6中,这些放大到FOV的视图与IE7和IE8中的相同:



>

  0:180,1:90,2:45,3:22.5,4:11:25 




  • 是否记录在案?

  • 如何执行街景FOV
    在浏览器中保持一致或计算该缩放
    等级的FOV值?

    解决方案目前,有一个表 here 将zoom和FOV关联起来:

    0 => 180 1 => 90 2 => 45 3 => 22.5 4 => 11.5



    您可以在JavaScript中将缩放转换为FOV,如下所示:



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

    I notice the Field of View (FOV) degree per street view zoom level is different between browsers

    I believe the documented street view zoom level to FOV is

    0: 180, 1: 90, 2: 45, 3: 22.5, 4: 11:25
    

    I am using the v3 Maps API with street view panorama and get zoom levels to FOV in chrome around

    0: 127, 1: 90, 2: 53, 3: 28, 4: 14
    

    These zoom to FOV are the same in IE7 and IE8

    in Firefox and IE6 they are:

    0: 180, 1: 90, 2: 45, 3: 22.5, 4: 11:25 
    

    • Is this documented?
    • How can I enforce the street view FOV consistently across browsers or calculate the FOV value for that zoom level?

    解决方案

    Currently, there is a table here relating zoom and FOV that says:

    0=>180 1=>90 2=>45 3=>22.5 4=>11.5

    You can convert from zoom to FOV in javascript like this:

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

    这篇关于我怎样才能确定一个街景全景地图正在使用的视野的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆