1

When looking the examples of the Geotools, i cant find the examples about adding waypoint into Map of GeoTools.

So how can i add the waypoint into Geotools ?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
ibrahimyilmaz
  • 18,331
  • 13
  • 61
  • 80

1 Answers1

2

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:

Jody Garnett
  • 503
  • 3
  • 10