Chcę uruchomić mapę google o kodzie
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Street View</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#street-view {
height: 100%;
}
</style>
</head>
<body>
<div id="street-view"></div>
<script>
var panorama;
function initialize() {
panorama = new google.maps.StreetViewPanorama(
document.getElementById('street-view'),
{
position: {lat: 37.869260, lng: -122.254811},
pov: {heading: 165, pitch: 0},
zoom: 1
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDErBfovbvey2weZU1RHUS0KQ08sUyuzhQ&signed_in=true&callback=initialize">
</script>
</body>
</html>
mapa się uruchamia ale pokazuje się alert o treści:
This page was unable to display a Google Maps element. The provided Google API key is invalid or this site is not authorized to use it. Error Code: InvalidKeyOrUnauthorizedURLMapError
Coś z kluczem mi nie działa ale nie wiem jak to zrobić, wydaje mi się że wygnerowałem klucz w lini:
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDErBfovbvey2weZU1RHUS0KQ08sUyuzhQ&signed_in=true&callback=initialize">