【问题标题】:Change Image Date of Google Street View API更改 Google Street View API 的图像日期
【发布时间】:2016-02-15 19:00:13
【问题描述】:

我正在尝试通过访问图像日期来找到一种在特定时间段内加载 Google 地图街景的方法。在谷歌地图上,它可以让你追溯到 2007 年。我怎样才能让谷歌从另一年而不是当年加载地图?

这是我所拥有的,但它只是加载当前地图。

HTML

<body>
   <div id="streetview2011" class="street-view"></div>

   <script src="../js/lib/street-view.js"></script>
   <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDP87Ddl6sW6C-CXeoHlRxszGBfo1mlMT8&callback=initPano" async defer></script>
</body>

Javascript

function initPano() {

  var panorama2011 = new google.maps.StreetViewPanorama(
      document.getElementById('streetview2011'), {
        position: {lat: 39.963325, lng: -75.202340},
        imageDate: '2011-07',
        addressControlOptions: {
          position: google.maps.ControlPosition.BOTTOM_CENTER
        },
        imageDateControl: true,
        linksControl: false,
        panControl: false,
        enableCloseButton: false
  });

}

【问题讨论】:

  • 就文档而言,目前无法使用 Street View API 从特定日期获取视图。见Street View API

标签: javascript jquery google-maps google-api google-street-view


【解决方案1】:

目前,Google Maps Platform 尚无法访问特定时间段内某个地点的 Google Maps Street View 全景图。

但是,我们在 Google 问题跟踪器中确实有一个现有的功能请求。为了表达您的兴趣并订阅它的最新更新,我建议您为这篇文章加注星标:https://issuetracker.google.com/35826204

【讨论】:

    猜你喜欢
    • 2018-07-24
    • 1970-01-01
    • 1970-01-01
    • 2018-06-16
    • 1970-01-01
    • 1970-01-01
    • 2011-04-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多