开发者

How to add waypoint item in GeoTools

When looking the examples of th开发者_高级运维e Geotools, i cant find the examples about adding waypoint into Map of GeoTools.

So how can i add the waypoint into Geotools ?


There are a couple of ways to answer your question depending on what you intended:

A: GeoTools is just a toolkit; it does not provide an interactive map for adding a waypoint. There is no visual tutorial for the gt-graph module showing how to add a waypoint.

A: The gt-graph module does show how to find the shortest path between 2 (or more) locations; if you consider those locations waypoints you are set.

//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
}

To see this source code in context the documentation page is here:

  • http://docs.geotools.org/latest/userguide/extension/graph/index.html
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜