Skip to content
Advertisement

Google Maps: Uncaught ReferenceError: google is not defined

I am receiving this error when I try to load an HTML page with my map:

Uncaught ReferenceError: google is not defined

I thought it was the order in which I was loading the Google maps API, but I have it at the beginning.

My HTML looks like this:

JavaScript

The mapCode.js that my html code calls looks like this. DO I have thing in the wrong order, is it not loading the google API in time before loading the map?:

JavaScript

Advertisement

Answer

I think one error is that you need to change

JavaScript

into

JavaScript

you have no initMap function, but i assume you want to call initialize().

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement