Map Component?

22 views
Skip to first unread message

jlmi...@kahalawai.com

unread,
Feb 20, 2014, 8:33:22 PM2/20/14
to mont...@googlegroups.com
Hi,

I'm trying to make a basic Google Maps component.  I put the link to the Google Maps source in the head section of my component and I can see that it gets placed in the head section of the Montage "page".  I put the map initialization code inside the component section of the component's body.

But when the app loads I get an error in the console:

[Error] TypeError: 'undefined' is not an object (evaluating 'google.maps.event.addDomListener')
global code (localhost, line 20)
replaceChild
value
_prepareForDraw
value
value
_drawIfNeeded
_drawIfNeeded
_drawIfNeeded
_drawIfNeeded
drawIfNeeded
_drawTree

It seems that for some reason the Google Maps script never gets executed.

Any idea on how I can fix this?

Thank in advance.

jlmi...@kahalawai.com

unread,
Feb 21, 2014, 2:32:36 PM2/21/14
to mont...@googlegroups.com
OK.  I got it.  Luckily, I have a long drive to work where I can ponder these things.

I put the link to Google Map in index.html and then instead of using the Google Map's DOM ready function I just wrapped the initialization code in an immediate function.
Reply all
Reply to author
Forward
0 new messages