更改Google Street View API的图像日期 [英] Change Image Date of Google Street View API

查看:62
本文介绍了更改Google Street View API的图像日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一种通过访问图像日期来在特定时间段内加载Google Maps Street View的方法.在Google地图上,它可以让您追溯到2007年.我如何让Google从另一年而不是当年加载地图?

I am trying to find a way to load the Google Maps Street View for a specific time period by accessing the image date. On google maps it lets you go back as far as 2007. How can I make google load the map from another year instead of the current year?

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

Here's what I have but it's only loading the current map.

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

}

推荐答案

当前,Google Maps Platform尚无法访问特定时间范围内某个地方的Google Maps Street View全景图.

Currently, accessing the Google Maps Street View panorama of a place for a specific time period is not yet available from the Google Maps Platform.

但是,我们在Google Issue Tracker中确实有对此功能的要求.为了表达您的兴趣并订阅其最新更新,建议您为该条目加上星号: https://issuetracker.google.com/35826204

But, we do have an existing feature request for this in our Google Issue Tracker. To express your interest and to subscribe you to its latest updates, I suggest that you star this entry: https://issuetracker.google.com/35826204

这篇关于更改Google Street View API的图像日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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