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 badges1 Answer
Reset to default 7That 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
评论列表(0条)