我正在处理这个,在圆形元素超出90度的截断角度后,我无法剪切红色圆形。 另外,是否有一种方法可以将投影应用于红色圆形,以使其相对于正交角度看起来像在地球表面? 目前它们只是相对于屏幕的2D圆。
我正在处理这个,在圆形元素超出90度的截断角度后,我无法剪切红色圆形。 另外,是否有一种方法可以将投影应用于红色圆形,以使其相对于正交角度看起来像在地球表面? 目前它们只是相对于屏幕的2D圆。
不必使用<circle>
元素,可以使用GeoJSON点几何体:
{type: "Point", coordinates: [λ, φ]}
var path = d3.geo.path().projection(…);
data.forEach(function(d) {
svg.append("path")
.datum({type: "Point", coordinates: [d.Lon, d.Lat]})
.attr("d", path.pointRadius(d.Magnitude));
});
var path = d3.geo.path()
.projection(…)
.pointRadius(function(d) { return d.radius; });
svg.selectAll("path.point")
.data(data)
.enter().append("path")
.datum(function(d) {
return {type: "Point", coordinates: [d.Lon, d.Lat], radius: d.Magnitude};
})
.attr("class", "point")
.attr("d", path);
var path = d3.geo.path().projection(…),
circle = d3.geo.circle();
svg.selectAll("path.point")
.data(data)
.enter().append("path")
.datum(function(d) {
return circle
.origin([d.Lon, d.Lat])
.angle(d.Magnitude)();
})
.attr("class", "point")
.attr("d", path);
d3.geo.circle
的角度/半径?原点呢? - Fresheyeball