I'm trying to insert a google map tp my html code but it keeps on giving me this error: "myMap is not a function", here is my code:
function myMap() {
var mapOptions = {
center: new google.maps.LatLng(51.5, -0.12),
zoom: 10,
mapTypeId: google.maps.MapTypeId.HYBRID
}
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
}
#map{
width: 100%;
height: 250px;
}
<div id="map"></div>
<script src="https://maps.googleapis.com/maps/api/js?key=APIKEY4&callback=myMap"></script>