この時点で何時間もこの問題に悩まされていて、問題を理解できません。
私は自分のデータセットでhttp://bost.ocks.org/mike/map/をフォローしています。
エラー: Uncaught TypeError: 未定義のプロパティ 'type' を読み取れません - topojson.v0.min.js:1
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<style>
path {
fill: #ccc;
stroke: #fff;
stroke-width: .5px;
}
path:hover {
fill: red;
}
</style>
</head>
<body>
<script src="../static/js/d3.min.js"></script>
<script src="../static/js/topojson.v0.min.js"></script>
<script>
var width = 900,
height = 900;
var path = d3.geo.path();
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
d3.json("../static/json/newjerseymun.json", function(nj) {
svg.append("path")
.datum(topojson.object(nj, nj.objects.subunits))
.attr("d", d3.geo.path().projection(d3.geo.mercator()));
});
</script>
</body>
これは私のjsonファイルの冒頭のサンプルです: http://pastebin.com/g0Lut36V