谷歌地图Javascript API没有加载最接近的缩放级别?

pyt*_*981 18 google-maps google-maps-api-3

今天我注意到在特定区域中移除了最接近的可用缩放级别的卫星图像(它可能会影响其他区域,但我只关注一个明显受影响的区域).两天前有20级,现在只有19级.

MaxZoomService仍然表示此位置的最近可用缩放是20.但是当地图处于19级时,按+缩放按钮不会将缩放增加到20级.

是否有理由为什么我说它可用时不能放大到20级?

一些理论解释(均未经证实)包括:

  1. 最近删除了缩放级别20,但MaxZoomService尚未更新并显示旧值
  2. 20级在这个位置暂时被打破并且很快就会恢复(例如,他们可能正在重新处理此级别的图像拼贴?)

(我不认为自上而下与倾斜的可用深度存在混淆,因为两者都锁定在第19级).

更新:

  • 先前加载的20级地图图块仍然存在于旧URL中,它们只是未加载到Javascript API Map中.也许这解释说这只是列出可用图像层的服务的临时问题?
  • 似乎是全球性的问题,而不是一个孤立的地理区域
  • 更改为早期版本的Google Maps Javascript API(例如,添加?v = 3.29)似乎无法解决问题

查看实时示例:https://jsfiddle.net/3qojzt76/

<!DOCTYPE html>
<html>
  <head>
    <title>Simple Map</title>
    <meta name="viewport" content="initial-scale=1.0">
    <meta charset="utf-8">
    <style>
      /* Always set the map height explicitly to define the size of the div
       * element that contains the map. */
      #map {
        height: 100%;
      }
      /* Optional: Makes the sample page fill the window. */
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
  </head>
  <body>
    <div id="map"></div>
    <script>
      var map;
      
      var latlng = {lat: 37.8768101, lng: -122.2813413}
      
      function initMap() {
        map = new google.maps.Map(document.getElementById('map'), {
          mapTypeId: google.maps.MapTypeId.SATELLITE,
          tilt: 0,
          center: latlng,
          zoom: 19
        });
        
        var mapZoomService = new google.maps.MaxZoomService()
        
        mapZoomService.getMaxZoomAtLatLng(latlng, function(MaxZoomResult){
            
            if(google.maps.MaxZoomStatus.OK){
                alert('map.getZoom(): '+map.getZoom()+', MaxZoomResult.zoom: ' + MaxZoomResult.zoom)
            }else{
                alert('Error: in google.maps.MaxZoomService().getMaxZoomAtLatLng()')
            }
        })
        
      }
    </script>
    <script src="https://maps.googleapis.com/maps/api/js?key=&callback=initMap"
    async defer></script>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)

pyt*_*981 11

这是谷歌地图Javascript API的一个错误,已由Google解决,根据https://issuetracker.google.com/issues/71715009