I want to show map of my university but it load for 1 sec and then tell
MissingKeyMapError
and
Sorry! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details.
I use Google Maps JavaScript API and Web browser (javaScript).Hear is my code :
<script src='https://maps.googleapis.com/maps/api/js?key=AIzaSyDNi7fQreXQ_AvjDEbMBGtBo2XoP5QkxRs'></script>
<div style='overflow:hidden;height:440px;width:700px;'>
<div id='gmap_canvas' style='height:440px;width:700px;'></div>
<style>#gmap_canvas img {
max-width: none !important;
background: none !important
} </style>
</div>
<script type='text/javascript'>
function init_map() {
var myOptions = {
zoom: 14,
center: new google.maps.LatLng(22.3475365, 91.81233240000006),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('gmap_canvas'), myOptions);
marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(22.3475365, 91.81233240000006)
});
infowindow = new google.maps.InfoWindow({content: '<strong>University of Chittagong</strong><br>Chittagong , Bangladesh<br>'});
google.maps.event.addListener(marker, 'click', function () {
infowindow.open(map, marker);
});
infowindow.open(map, marker);
}
google.maps.event.addDomListener(window, 'load', init_map);
</script>
</head>
This is my full code . Please help me for my project.