当我加载json时,此代码不能与d3.js一起使用然后只显示black sceen而不是任何out请帮助我,如果有任何想法请通过my code检查整个代码
<script>
d3.json("nysd.geojson",
function (json) {
//dimensions
var w = 2000;
var h = 2000;
var svg = d3.select("#chart").append("svg")
.attr("width", w)
.attr("height", h);
//create geo.path object, set the projection to merator bring it to the svg-viewport
var path = d3.geo.path()
.projection(d3.geo.mercator()
.scale(20000)
.translate([0, 3800]));
//draw svg lines of the boundries
svg.append("g")
.attr("class", "black")
.selectAll("path")
.data(json.features)
.enter()
.append("path")
.attr("d", path);
});
</script>