0

I am using this code from google map API's and entered the API key, but still get the above mentioned error

@{
    Layout = null;
}
<style>
   #map {
        height: 400px;
        width: 200px;
}
</style>
<div id="map"></div>
<script>
    function initMap() {
       var map = new google.maps.Map(document.getElementById('map'), {
       center: { lat: 10.523900, lng: 76.212250 },
       zoom: 8
        });
      }
</script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAi6Ztik8PTvZFBFieP0k7aVWGMdNGHJ9c&callback=initMap"></script>
Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

1 Answers1

0

Update: It looks like your code is fine. I think this is an issue with the way you configure your site setting in google developer console - have a look at SO post.

It entails making sure you enter your domain wildcard properly (http://www.example.com/*) and enabling the required APIs (Maps JavaScript API).

Patee Gutee
  • 292
  • 2
  • 19