0
爲什麼從Google文檔中繪製地圖需要+ 50秒,我只有兩列和40行: 列是CITY,NAME。有些城市是重複的。根據螢火蟲,網絡連接只需2-3秒。所有的城市都在1個國家,我可以以某種方式優化這個嗎?爲什麼從Google文檔中繪製地圖需要+ 50秒
我的代碼是:
google.load('visualization', '1',
{'packages': ['table', 'map']});
google.setOnLoadCallback(initialize);
function initialize() {
// The URL here is the URL of the spreadsheet.
// This is where the data is.
var query = new google.visualization.Query(
'http://spreadsheets.google.com/tq?key=xx');
query.send(draw);
}
function draw(response) {
if (response.isError()) {
alert('Error in query');
}
var geoView = new google.visualization.DataView(response.getDataTable());
//geoView.setColumns([0, 1,2]);
var table =
new google.visualization.Table(document.getElementById('table_div'));
table.draw(response.getDataTable(), {showRowNumber: false});
var map =
new google.visualization.Map(document.getElementById('map_div'));
map.draw(geoView, {showTip: true});