我如何在油脂猴子中使用最新的Google可视化API?

问题描述

| 试图让谷歌可视化API在油脂猴子(Firefox)中工作,我试图只使用:
  // @require          http://www.google.com/jsapi
但随后出现错误:google.visualization未定义 添加后:
//  google.load(\'visualization\',\'1\',{packages: [\'table\']});
我收到错误:未定义$ 我需要错东西吗?请帮忙。 在此先感谢您提供有用的答案!     

解决方法

        我对Google Maps API也有类似的问题。 就我而言,我不得不将API附加到页面上
API_js_callback = \"http://maps.google.com/maps/api/js?sensor=false&region=BR&callback=initialize\";

var script = document.createElement(\'script\');
    script.src = API_js_callback;
    var head = document.getElementsByTagName(\"head\")[0];
    (head || document.body).appendChild(script);
google
必须称为
unsafeWindow.google
,所以我也加上了
google = unsafeWindow.google
initialize = setTimeout(function () {
    google = unsafeWindow.google;
    directionsService = new google.maps.DirectionsService();
    directionsDisplay = new google.maps.DirectionsRenderer();
    .
    .
    .
请在此处查看完整的代码和说明:如何将Google Maps API与油腻的猴子一起使用以读取地址表并跟踪路线?     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...