EnhanceJS + Google Maps

7 views
Skip to first unread message

nicklansdell

unread,
Sep 6, 2010, 11:23:37 AM9/6/10
to EnhanceJS
Hi Scott,

Have you encountered any problems with Google Maps when used in
conjunction with Enhance JS? I cannot seem to get the two to work
together. If I load the Google Maps script through Enhance JS the site
will not work. What happens is I get a brief flash of the site then a
blank white page with the Firefox status bar saying Read
maps.gstatic.com and the load bar freezing half way. Looking at the
page in Firebug also does not help as there is no information to see.

My Enhance config looks like this:

enhance({
loadStyles: [
{media: 'screen', excludemedia: 'screen and (max-device-
width: 480px)', href: 'css/screen.css'},
{media: 'screen and (max-device-width: 480px)', href: 'css/
handheld.css'}
],
loadScripts: [
{src: 'http://html5shiv.googlecode.com/svn/trunk/html5.js',
iecondition: 'lte IE 9'},
'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/
jquery.min.js',
'http://maps.google.com/maps/api/js?sensor=false',
'http://cdn.jquerytools.org/1.2.3/all/jquery.tools.min.js',
{media: 'screen', excludemedia: 'screen and (max-device-width:
480px)', src: 'js/plugins.js'},
{media: 'screen', excludemedia: 'screen and (max-device-width:
480px)', src: 'js/screen.js'},
{media: 'screen and (max-device-width: 480px)', src: 'js/
handheld.js'},
]
});

I also tried loading the Google Maps script conventionally in the head
section of my document after the Enhance JS link. This results in the
Enhance JS toggle links being placed outside of the specified
containing div, however the site functions perfectly apart from this
glitch. It does of course defeat the object of trying to load
Javascript through Enhance.

Any help you can offer would be greatly appreciated. I can post a link
if it helps.

Many thanks,

Nick.
Reply all
Reply to author
Forward
0 new messages