require.js 错误(topojson 未加载)

require.js error (topojson not loading)

任何人都可以帮助我 understand/fix 这个错误吗?

未捕获的 ReferenceError:未定义 topojson

我是requireJS的新手,不是很了解。

提前致谢!

require.config({
  paths: {
   d3: "//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min",
   geo: "//d3js.org/d3.geo.projection.v0.min",
   topo: "//d3js.org/topojson.v1.min"
 },
 shim: {
  geo: {
   deps: ["d3"]
  },
  topo:{
   deps: ["d3","geo"]
  }
 }

 
});

require(["d3","geo","topo"],function(){
 $(document).ready(RecruitingData.ondomready);
 $(document).bind('framework.resize',RecruitingData.scalescharts());
 $(document).bind('framework.resize',RecruitingData.scalescharts1()); 
 $(document).bind('framework.resize',RecruitingData.linechart()); 
 $(document).bind('framework.resize',RecruitingData.mapchart()); 
})

我对 require.js 一无所知,但查看 api,您缺少 require 回调的参数:

require(["d3","geo","topo"],function(d3,geo,topojson){
    // you can now use topojson!
});

例子here.