且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Google没有使用Google可视化API进行定义;可能是jQuery的错

更新时间:2023-02-04 12:25:12

Removing $(document).ready should fix your problem. I tried your code and after commenting out $(document).ready, it worked:

//$(document).load(function() {
    google.load('visualization', '1', {packages:['intensitymap']});
    google.setOnLoadCallback(drawChart);
//});

Now as for why this is the case, I do not know... In any case, you shouldn't need to wait for document.ready to call google.load; google.load will ensure that by the time your callback drawChart is called, it will be safe to execute.

相关阅读

技术问答最新文章