javascript - infobox.prototype = new google.maps.overlayview() error, google is not defined -
hi got "google not defined" error in infobox.js, , show error in
infobox.prototype = new google.maps.overlayview()
here code in html, hope include library right.
<!doctype html> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="map"></div> <script async defer src="https://maps.googleapis.com/maps/api/js?key=aizasyb9mpf-bwjn8ym13plnrdhsnhymrrvouiw&callback=initmap"> </script> <script src="library/infobox.js" type="text/javascript"></script> <script src="script.js"></script> </body> </html>
i called google map api , infobox.js in script.js file. in advance!
when call overlayview constructor google map still not loaded. call without async, defer , callback:
<script src="https://maps.googleapis.com/maps/api/js?key=aizasyb9mpf-bwjn8ym13plnrdhsnhymrrvouiw"></script>
and it's case sensitive, therefore: infobox.prototype = new google.maps.overlayview()
Comments
Post a Comment