Mik*_*lin 5 javascript google-maps google-api google-apps google-apps-script
有没有办法禁止谷歌地图在放大时进入 3D 模式?
我想保持这样,只是放大: 这里
但是当我当前放大时,它会 3d 渲染建筑物: 这里
这是卫星视图中的45 度图像。您可以tilt: 0在MapOptions初始化地图时进行设置,以避免地图在放大得很近时使用该图像。这是一个简单的 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.com/maps/api/js?key=YOUR_KEY&callback=initMap"
async defer></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2763 次 |
| 最近记录: |