-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught InvalidValueError: initMap is not a function #14
Comments
Read about namespace in the Stack Overflow link provided above, and error seems to go away when I moved script for jquery before the google maps script (see below). From:
To:
Refreshed many times and no issues. Monitor this issue for now, as need to eventually move script code to separate js file and may come across this error. Might also have something to do with the async defer code in the script, that parts of page needs to load before the map but something could be interfering? |
Upon implementing Bootstrap, this error came up again. Need to review where to place the JS script code for Google Maps, so that map loads properly. |
maybe try to put all the google api scripts into even your initMap function |
It might help to move the callback to the global scope. That seems to have helped me. |
Can you fix this problem? |
It seems to have worked for me. It's just one line to change. I can
submit a PR when I get home in a few days.
…-Keith
On Jan 12, 2017 11:10 AM, "jguzmanf88" ***@***.***> wrote:
Can you fix this problem?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJp4t0WKBHayrhCQCHQBowAKEJ95qKxpks5rRnqtgaJpZM4Ieulk>
.
|
Hey guys, sorry for the late reply! I haven't had this error come up anymore and forgot to close the issue. I believe that the error was caused by me not loading the libraries/dependencies first before calling on my JS script that contained the initMap function. So it was definitely a namespace issue on my end. Will be revising my Jinja template to make sure that future JS scripts are in the proper namespace. |
had the same issue and same solution, thank you. moved scripts to last thing before |
While working on feature (ref: Issue #6 ), sometimes when loading user profile html, the map doesn't load and I get this error:
Uncaught InvalidValueError: initMap is not a function
.If I refresh the page, the map loads, but sometimes it still spits out this error. Very strange.
The text was updated successfully, but these errors were encountered: