I'm working on a google map script which is throwing up this error. The issue is in this line:
var map = new google.maps.Map(document.getElementById('google-map'), { Corresponding HTML snippet is:
<!-- Google Maps --> <div id="google-map"></div> I've seen few questions which propose solutions to this problem but I havent really understood most of them: asynchronously loading the script or having a developer API key.
I'm just looking for a solution to what the issue really is and preferably a logical explanation to what the problem is.
Edit 1: The link the API is missing. I have added that and the error has gone but still the map doesnt show up. ( Please note that I've used PHP to divide the code into segments. )