Google Maps Javascript - Disable 3d view when zoomed in - Stack Overflow

Is there a way to disable google maps from going to 3d mode when zooming in?I would like to keep it lik

Is there a way to disable google maps from going to 3d mode when zooming in?

I would like to keep it like this, just zoomed in: here

But when I zoom in currently, it 3d renders the buildsings: here

Is there a way to disable google maps from going to 3d mode when zooming in?

I would like to keep it like this, just zoomed in: here

But when I zoom in currently, it 3d renders the buildsings: here

Share Improve this question asked Jun 15, 2018 at 19:41 Mikhail BatkalinMikhail Batkalin 631 silver badge4 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

That is the 45-degree imagery in Satellite view. You can set tilt: 0 in the MapOptions when initializing the map to avoid the map using that imagery when zoomed in very close. Here's a simple sample JSBin

<!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;
      function initMap() {
        map = new google.maps.Map(document.getElementById('map'), {
          center: new google.maps.LatLng(37.422009,-122.084302),
          tilt: 0,
          mapTypeId: "satellite",
          zoom: 19
        });
      }
    </script>
    <script src="https://maps.googleapis./maps/api/js?key=YOUR_KEY&callback=initMap"
    async defer></script>
  </body>
</html>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744904967a4600198.html

相关推荐

  • Google Maps Javascript - Disable 3d view when zoomed in - Stack Overflow

    Is there a way to disable google maps from going to 3d mode when zooming in?I would like to keep it lik

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信