I am getting errors on my site just trying to implement the basic "Hello world" application:
<div id="map"></div>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
$(document).ready(function () {
map = new google.maps.Map(document.getElementById("map"), myOptions);
});
The error I get is:
'Uncaught ReferenceError: google is not defined'
How do I fix this problem?
Your source is wrong, I also suggest specifing the exact version you want to load:
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3&sensor=true"></script>
That should help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With