删除 Google 街景全景效果

Remove Google Street View Panorama Effect

我使用 Google 地图 JavaScript API v3 添加了 Google 街景。你可以看到它 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 只有该位置的直图,没有任何全景效果。

我用过的代码在这里:

<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>

如果我遗漏了什么,请告诉我。

感谢您回答我的问题。 The issue has now been solved。事实证明这是一个特定于 Firefox 的问题。

我现在从 link.

中引用 user3109401 的 post 的解决方案

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
    }
};