Short question:
Is there a way to represent the 3D earth globe with google maps web API?
On google maps, we can now visualize the earth as a globe in 3D.
Here is an example:
I am developing an HTML project with google maps API and I would like to use this earth representation on my website.
However, I do not find any topic about this subject.
Is there a way to represent the 3D earth globe with google maps API as on the google maps web site3D?
Here is an example of my map (it is of course an extract of my code to clarify the question):
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});
}
/* 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;
}
<meta name=viewport content=initial-scale=1.0>
<meta charset=utf-8>
<div id=map></div>
<script src=https://maps.googleapis.com/maps/api/js?callback=initMap
async defer></script>
Here is a picture of my map on my website:
This map only represents the earth as a planisphere. How may I have the same result as on the google maps web site?
Notice:
I found this post in twitter witch introduces the feature on the google maps web site.