Google 地图 API v3 - 在 StreetView 中显示图像捕获日期

Google Maps API v3 - Display Image capture date in StreetView

当你访问maps.google.com时,右下角有一条信息说图像已被捕获: screenshot google maps

但是在我的网站上,当我使用 Google 地图 API 时,该信息根本就没有显示。我也找不到任何设置。 有谁知道如何显示该信息?

编辑: 我不使用 google.maps.StreetViewPanorama,而是使用 google.maps.Map,用户可以在其中切换到街景模式。

谢谢!

创建街景视图时,请在选项中指定 imageDateControl 属性。默认情况下它是禁用的;你必须启用它。

类似于:

var panorama = new google.maps.StreetViewPanorama(
  document.getElementById('pano'), {
    position: yourLocation,
    imageDateControl: true
  });

参见:

我能够通过从地图获取 StreetView 对象来设置选项:

this.map = new google.maps.Map(this.divContainer, defaultMapOptions);
this.map.getStreetView().setOptions(defaultStreetViewOptions);