Here\'s my conundrum: I have a page that uses Google Maps V3 and jQuery. It all worked well locally in FF5, Chrome and Safari.
Once I uploaded to a web site, I get
I had the same error "google is not defined" while using Gmap3. The problem was that I was including 'gmap3' before including 'google', so I reversed the order:
<script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script src="/assets/gmap3.js?body=1" type="text/javascript"></script>
I don't know for sure but here are my best suggestions.
You're using jQuery. So instead of setting the event you should really be using $(function() {... }); to do your initialization. The reason to use this is that it ensures that all the scripts on the page have loaded and you're not limited to just one init function like you are with the onload body tag.
Also, be sure your Javascript code is after the Google include. Otherwise your code might execute before the Google objects are created.
I would also suggest taking a look at this page about event order.
http://dean.edwards.name/weblog/2005/09/busted/