10
我已經創建了一個從mbtile轉換爲geojson的地圖,投影爲WGS84。我加載它像:d3.js在d3.geo.path中添加一個圓圈
var map = svg.append("g").attr("class", "map");
var path = d3.geo.path().projection(d3.geo.albers().origin([3.4,46.8]).scale(12000).translate([590, 570]));
d3.json('myjsonfile.json', function(json) {
map.selectAll('path').data(json.features).enter().append('path').attr('d', path)
});
現在我想用它(緯度,經度)在我的SVG座標添加SVG元素(點,圓,點(我不知道)) 。
我不知道該怎麼做。