Loading Google Maps initialize() script from a seperate file

29 views
Skip to first unread message

Stacey

unread,
Nov 8, 2011, 6:32:08 AM11/8/11
to google-map...@googlegroups.com
Hey guys,

Having a problem with working with the Google Maps API.

I'm currently developing an application on a site that doesn't support inline Javascript. Therefore, I'm trying to load the script (which loads the map into the webpage) from a separate file called map.js. However, when I do this, the map is not loading, despite writing window.onload = load in the map.js script. 

Is there anything that I'm doing wrong?   

Rossko

unread,
Nov 8, 2011, 4:48:07 PM11/8/11
to Google Maps JavaScript API v3
> Is there anything that I'm doing wrong?

There must be. Difficult to guess what though.

Perhaps when you use
window.onload = load
you don't have a load() function? (You did mention initialize() in
your post title)
Perhaps some other script comes along and overwrites your
window.onload?

Stacey

unread,
Nov 9, 2011, 7:47:35 AM11/9/11
to google-map...@googlegroups.com
Thanks Rossko...

I'll give this a try... 

I'll let you know if it works...

Stacey

unread,
Nov 10, 2011, 3:49:24 AM11/10/11
to google-map...@googlegroups.com
Sorry but no success... 
Just so you know, the site is a page on a custom coded ASP.NET CMS.

I'll have a chat with the administrator on the site and see if he helps! Thanks for your help!

Rossko

unread,
Nov 10, 2011, 4:51:50 AM11/10/11
to Google Maps JavaScript API v3
If you want someone to actually look at your problem, instead of
guessing, you could let them have a look at the patient. Link to your
problem page?
Reply all
Reply to author
Forward
0 new messages