删除Google街景全景效果 [英] Remove Google Street View Panorama Effect

查看:155
本文介绍了删除Google街景全景效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google Maps JavaScript API v3添加了Google街景视图。您可以在此处看到它。大部分地图所做的都很好。唯一的问题是,街景视图似乎在奇怪的球形效果中显示位置。我只是希望街景视图与这里只有位置的直接图像,没有任何全景效果。

I have a Google Street View that I have added using the Google Maps JavaScript API v3. You can see it here. Most of what the map does is fine. The only problem is that the Street View seems to be displaying the location in a weird spherical effect. I just want the street view to be the same as it is on here with just the straight image of the location without any panorama effect.

我使用的代码在这里:

The code I have used is here:

<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDvvLfsqnDzgL4oe6HhKgVpmlosjKGME8E"></script>

<script>
function initialize() {
  var fenway = new google.maps.LatLng(51.453484, -2.600000);
  var panoramaOptions = {
    position: fenway,
    pov: {
      heading: 225,
      pitch: 20
    },
linksControl: false,
scrollwheel: false,
clickToGo: true
  };
  var panorama = new google.maps.StreetViewPanorama(document.getElementById('pano'), panoramaOptions);
}

google.maps.event.addDomListener(window, 'load', initialize);
</script>

    <div id="pano" style="width: 1920px; height: 560px;"></div>

请告诉我,我是否遗漏了一些东西。

Please tell me if I am missing something.

推荐答案

感谢您回答我的问题。 现在问题已解决。事实证明这是一个Firefox特定的问题。

Thanks for answering my question. The issue has now been solved. It turns out it is a Firefox-specific issue.

我现在从链接中引用user3109401的帖子中的解决方案。

I'm now quoting the solution from user3109401's post from the link.


可以在PanoramaOptions中设置未记录的属性模式。
您可以使用'html4','html5'和'webgl'。
如果我将模式设置为'html5',这将不会产生鱼眼效果。 (但tourdash使用'webgl'代替)

There's a undocumented attribute "mode" can be set in PanoramaOptions. You can use 'html4', 'html5' and 'webgl'. It will be no fish-eye effect if I set the mode to 'html5'. (But tourdash uses 'webgl' instead)



var panoramaOptions = {
    pano : panoId,
    pov: {
      heading: heading,
      pitch: pitch
    },
    enableCloseButton:false,
    addressControl:false,
    panControl:false,
    visible: true,
    clickToGo:false,
    addressControl:false,
    mode : "html5",
    zoomControlOptions:{
        position : google.maps.ControlPosition.TOP_LEFT
    }
};

这篇关于删除Google街景全景效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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