0
Guys I can’t set up the Google Maps API, I’ve put my Keys and everything but it won’t.
<!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: {lat: -23.574423, lng: -46.623515},
zoom: 8
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=KEY&callback=initMap"
async defer></script>
</body>
</html>
Matheus, some questions (they may be very naive). 1. You changed the word
KEY
by your key inside the import file? 2. Are you showing any errors in the console? (it might be a great ally to solve) 3. You have given access to any request (referring to platforms) within the GCP interface?– João Pedro Schmitz
@I’m the one who changed the key for the word.
– NoobSaibot
Ah, ok. I did not view the content of the edition. Thank you for warning.
– João Pedro Schmitz
And what’s the mistake?
– Leandro Angelo