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.
The Earth Engine API is available in Python and JavaScript, making it easy to harness the power of Google's cloud for your own geospatial analysis.
The Maps JavaScript API uses a pay-as-you-go pricing model. Maps JavaScript API requests generate calls to two different SKUs depending on the type of request: map loads or panoramas.
I believe this feature is not available in the API yet.
I can see a feature request in Google issue tracker that looks like your question:
https://issuetracker.google.com/issues/111576221
I would suggest staring the feature request to add your vote and subscribe to further notifications. Hopefully one day Google will implement this feature in the API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With