2011-04-11 42 views

回答

2

有一對夫婦的方式來回答取決於你的問題你打算什麼:

答:GeoTools僅僅是一個工具包;它不提供添加航點的交互式地圖。 gt-graph模塊沒有可視教程,顯示如何添加航點。

答:GT圖模塊確實顯示如何找到2(或更多)位置之間的最短路徑;如果你考慮你設置的那些位置航點。

//calculate the paths 
for (Iterator d = destinations.iterator(); d.hasNext();) { 
    Node destination = (Node) d.next(); 
    Path path = pf.getPath(destination); 

    //do something with the path 
} 

要在上下文中查看這些源代碼的文檔頁面是在這裏: