Javascript 通过ajax更新数据后无法使Google Arms Globe正常工作

Javascript 通过ajax更新数据后无法使Google Arms Globe正常工作,javascript,jquery,ajax,Javascript,Jquery,Ajax,我最近下载并使用它在全球显示国家数据。但我想每5分钟刷新一次数据。以下是我尝试更新数据的方式: //确保首先加载地图图像!! mapIndexedImage=新图像(); mapIndexedImage.src='images/map_index.png'; mapIndexedImage.onload=函数(){ mapOutlineImage=新图像(); mapOutlineImage.src='images/map_outline.png'; mapOutlineImage.onloa

我最近下载并使用它在全球显示国家数据。但我想每5分钟刷新一次数据。以下是我尝试更新数据的方式:

//确保首先加载地图图像!!
mapIndexedImage=新图像();
mapIndexedImage.src='images/map_index.png';
mapIndexedImage.onload=函数(){
mapOutlineImage=新图像();
mapOutlineImage.src='images/map_outline.png';
mapOutlineImage.onload=函数(){
loadCountryCodes(
函数(){
载荷销(
函数(){
loadContentData(
函数(){
初始化场景();
制作动画();
}
);														
}
);
}
);
};			
};	

//设置间隔(mapIndexedImage.onload,300000)仅供参考,5分钟是300000毫秒。我的错,在用较短的时间测试后忘记更改它。很可能你需要在地球重新启动之前优雅地卸载它。否则你需要创建一个不同的函数来“更新”,而不是每5分钟加载一次地球仪。但是,在地球复活之前,我怎样才能从技术上卸下它呢?最糟糕的是,地球仪需要随数据一起更新,因为地球仪随数据的不同而不同。我曾尝试将
setInterval()
放在(包装的)
loadContentData()
函数之前,但这甚至没有得到新数据。你有没有可能让JSFIDLE工作起来,而我可能会弄乱它?