我正在尝试加载GeoJSON文件,并使用D3作为基础绘制一些图形V5。
问题在于浏览器正在跳过包含在d3.json()
我试着插入断点来测试,但是浏览器跳过了它们,我不知道为什么。
下面的代码片段。
d3.json("/trip_animate/tripData.geojson", function(data) {
console.log("It just works"); // This never logs to console.
//...all the rest
}
发布于 2018-06-11 14:46:14
代码变成:
d3.json("/trip_animate/tripData.geojson")
.then(function(data){
// Code from your callback goes here...
});
https://stackoverflow.com/questions/-100004831
复制相似问题