Map D3.js Dijkstra路径查找器

Map D3.js Dijkstra路径查找器,map,d3.js,dijkstra,directions,Map,D3.js,Dijkstra,Directions,我想通过geoJSON路径创建一个d3地图路径查找器 g.selectAll("path") .data(geojson.features) .enter().append("path") .attr("class", "streets") .attr("id", function(d){return d.properties.name;}) .attr("d", path) .on("mouseover", function(){text.tex

我想通过geoJSON路径创建一个d3地图路径查找器

g.selectAll("path")
  .data(geojson.features)
  .enter().append("path")
    .attr("class", "streets")
    .attr("id", function(d){return d.properties.name;})
    .attr("d", path)
        .on("mouseover", function(){text.text(this.id);})
        .on("mouseout", function(){text.text("");});
是否可以使用Dijkstra算法在地图上的两点之间找到最佳路径? 这是我的测试地图

我在d3中找到了一个有效的寻径器

第一步我必须保存路径连接,对吗? 它会有多快

谢谢你的帮助