D3和GeoJSON - 奇怪的线条?

时间:2014-11-01 13:55:10

标签: d3.js geojson

为什么我的GeoJSON在下面的代码中使用D3进行渲染? (应该是乌干达的地图) enter image description here

GeoJSON片段

"type": "FeatureCollection",
"features": [{
    "type": "Feature",
    "properties": {
        "D_06_ID": 1,
    },
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [472470.4185696139, 183515.90337615015]

代码

var projection = d3.geo.mercator()
        .scale(60)

var path = d3.geo.path().projection(projection);

svg.selectAll(".subunit")
        .data(data.features)
        .enter().append("path")
        .attr("d", path);

0 个答案:

没有答案